From e79f56788d153b17365cd8d4d8217c0fefb165f7 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Mon, 7 May 2018 20:00:11 +0000 Subject: [PATCH] Removed another duplicate contains method. --- .../gameserver/data/xml/impl/NpcData.java | 3 +-- .../com/l2jmobius/gameserver/util/Util.java | 18 ------------------ 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/data/xml/impl/NpcData.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/data/xml/impl/NpcData.java index 9047f4092c..e1d4cf76fa 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/data/xml/impl/NpcData.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/data/xml/impl/NpcData.java @@ -47,7 +47,6 @@ import com.l2jmobius.gameserver.model.holders.DropHolder; import com.l2jmobius.gameserver.model.holders.MinionHolder; import com.l2jmobius.gameserver.model.holders.SkillHolder; import com.l2jmobius.gameserver.model.skills.Skill; -import com.l2jmobius.gameserver.util.Util; /** * NPC data parser. @@ -771,7 +770,7 @@ public class NpcData implements IGameXmlReader */ public List getAllNpcOfClassType(String... classTypes) { - return getTemplates(template -> Util.contains(classTypes, template.getType(), true)); + return getTemplates(template -> CommonUtil.contains(classTypes, template.getType(), true)); } public void loadNpcsSkillLearn() diff --git a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/util/Util.java b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/util/Util.java index ee8279e98e..e9d4c34b78 100644 --- a/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/util/Util.java +++ b/L2J_Mobius_CT_2.6_HighFive/java/com/l2jmobius/gameserver/util/Util.java @@ -991,24 +991,6 @@ public final class Util return false; } - /** - * @param array - the array to look into - * @param obj - the object to search for - * @param ignoreCase - * @return {@code true} if the {@code array} contains the {@code obj}, {@code false} otherwise. - */ - public static boolean contains(String[] array, String obj, boolean ignoreCase) - { - for (String element : array) - { - if (element.equals(obj) || (ignoreCase && element.equalsIgnoreCase(obj))) - { - return true; - } - } - return false; - } - public static int parseNextInt(StringTokenizer st, int defaultVal) { try