mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-15 01:08:35 +00:00
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:
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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()) {
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user