From 4f1ad7b57634ebbde1bc87dd2769c0a36d93b8d2 Mon Sep 17 00:00:00 2001 From: "Breno A." Date: Sun, 9 Jun 2024 09:39:21 -0300 Subject: [PATCH] perf: Call to 'asList()' with only one argument --- src/main/java/emu/grasscutter/data/binout/AbilityMixinData.java | 2 +- src/main/java/emu/grasscutter/game/world/Scene.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/emu/grasscutter/data/binout/AbilityMixinData.java b/src/main/java/emu/grasscutter/data/binout/AbilityMixinData.java index 649478655..6b4eb450f 100644 --- a/src/main/java/emu/grasscutter/data/binout/AbilityMixinData.java +++ b/src/main/java/emu/grasscutter/data/binout/AbilityMixinData.java @@ -27,7 +27,7 @@ public class AbilityMixinData implements Serializable { List list = (new Gson()).fromJson(modifierName, listType); return list; } else { - return Arrays.asList(modifierName.getAsString()); + return Collections.singletonList(modifierName.getAsString()); } } } diff --git a/src/main/java/emu/grasscutter/game/world/Scene.java b/src/main/java/emu/grasscutter/game/world/Scene.java index 993b2d42a..53f028746 100644 --- a/src/main/java/emu/grasscutter/game/world/Scene.java +++ b/src/main/java/emu/grasscutter/game/world/Scene.java @@ -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 List> chopped(List list, final int L) {