Code cleaning

Most notable change: Remove redundant type parameters and replaced with <>. This is a small step to bring us closer to upstream parity.
This commit is contained in:
matt
2019-02-15 21:46:10 -05:00
parent 3236bdd78e
commit 85bfd16d7c
82 changed files with 1417 additions and 1406 deletions

View File

@ -228,7 +228,7 @@ public class SetQueue {
}
public Collection<FaweQueue> getAllQueues() {
ArrayList<FaweQueue> list = new ArrayList<FaweQueue>(activeQueues.size() + inactiveQueues.size());
ArrayList<FaweQueue> list = new ArrayList<>(activeQueues.size() + inactiveQueues.size());
list.addAll(inactiveQueues);
list.addAll(activeQueues);
return list;

View File

@ -167,7 +167,7 @@ public class ShapeInterpolator {
bezierCoordinates[0] = curX = movX = coordinates[0];
bezierCoordinates[1] = curY = movY = coordinates[1];
float newX, newY;
final Vector<Point2D.Float> savedPathEndPoints = new Vector<Point2D.Float>();
final Vector<Point2D.Float> savedPathEndPoints = new Vector<>();
numCoordinates = 2;
while (!pi.isDone()) {
switch (pi.currentSegment(coordinates)) {
@ -735,4 +735,4 @@ public class ShapeInterpolator {
return res;
}
}
}
}

View File

@ -148,7 +148,7 @@ public class StringMan {
}
public static List<String> split(String input, char delim) {
List<String> result = new ArrayList<String>();
List<String> result = new ArrayList<>();
int start = 0;
int bracket = 0;
boolean inQuotes = false;

View File

@ -583,7 +583,7 @@ public class TextureUtil implements TextureHolder{
// Get all the groups in the current jar
// The vanilla textures are in `assets/minecraft`
// A jar may contain textures for multiple mods
Set<String> mods = new HashSet<String>();
Set<String> mods = new HashSet<>();
{
Enumeration<? extends ZipEntry> entries = zipFile.entries();
while (entries.hasMoreElements()) {

View File

@ -57,7 +57,7 @@ public class UsageMessage extends Message {
text(BBC.HELP_HEADER_SUBCOMMANDS.f());
String prefix = !commandString.isEmpty() ? commandString + " " : "";
List<CommandMapping> list = new ArrayList<CommandMapping>(dispatcher.getCommands());
List<CommandMapping> list = new ArrayList<>(dispatcher.getCommands());
Collections.sort(list, new PrimaryAliasComparator(CommandManager.COMMAND_CLEAN_PATTERN));
for (CommandMapping mapping : list) {

View File

@ -308,7 +308,7 @@ public class TaskBuilder extends Metadatable {
continue;
case SYNC_PARALLEL:
case ASYNC_PARALLEL:
final ArrayList<RunnableTask> parallel = new ArrayList<RunnableTask>();
final ArrayList<RunnableTask> parallel = new ArrayList<>();
parallel.add(task);
RunnableTask next = tasks.peek();
while (next != null && next.type == task.type) {
@ -571,4 +571,4 @@ public class TaskBuilder extends Metadatable {
DELAY,
ABORT
}
}
}