perf: Call to 'asList()' with only one argument

This commit is contained in:
Breno A. 2024-06-09 09:39:21 -03:00
parent 6e3b3b20a0
commit 4f1ad7b576
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ public class AbilityMixinData implements Serializable {
List<String> list = (new Gson()).fromJson(modifierName, listType);
return list;
} else {
return Arrays.asList(modifierName.getAsString());
return Collections.singletonList(modifierName.getAsString());
}
}
}

View File

@ -392,7 +392,7 @@ public class Scene {
}
public void updateEntity(GameEntity entity, VisionType type) {
this.broadcastPacket(new PacketSceneEntityUpdateNotify(Arrays.asList(entity), type));
this.broadcastPacket(new PacketSceneEntityUpdateNotify(Collections.singletonList(entity), type));
}
private static <T> List<List<T>> chopped(List<T> list, final int L) {