From e7193f5f11d22041654ba55b262e5135e31bef7d Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Sun, 8 Jan 2023 13:58:15 +0000 Subject: [PATCH] Removed stream usage from ClanHallData. --- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- .../l2jmobius/gameserver/data/xml/ClanHallData.java | 13 +++++++++++-- 26 files changed, 286 insertions(+), 52 deletions(-) diff --git a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_01.0_Ertheia/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_02.5_Underground/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_03.0_Helios/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_04.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_05.0_Salvation/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_05.5_EtinasFate/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_06.0_Fafurion/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_07.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_08.2_Homunculus/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_09.2_ReturnOfTheQueenAnt/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_10.2_MasterClass/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_10.3_MasterClass/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_Classic_1.0/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_Classic_1.5_AgeOfSplendor/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_Classic_2.5_Zaken/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_Classic_2.7_Antharas/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_Classic_2.8_SevenSigns/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_Classic_2.9.5_Saviors/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_Classic_2.9.5_Saviors/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_Classic_2.9.5_Saviors/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_Classic_2.9.5_Saviors/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_Classic_2.9_SecretOfEmpire/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_Classic_Interlude/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_Essence_4.2_DwellingOfSpirits/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_Essence_5.2_FrostLord/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_Essence_6.2_Vanguard/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /** diff --git a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java index c3977185b4..50a926dd66 100644 --- a/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java +++ b/L2J_Mobius_Essence_6.3_Crusader/java/org/l2jmobius/gameserver/data/xml/ClanHallData.java @@ -19,12 +19,12 @@ package org.l2jmobius.gameserver.data.xml; import java.io.File; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Logger; -import java.util.stream.Collectors; import org.w3c.dom.Document; import org.w3c.dom.NamedNodeMap; @@ -212,7 +212,16 @@ public class ClanHallData implements IXmlReader public List getFreeAuctionableHall() { - return _clanHalls.values().stream().filter(ch -> (ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)).sorted(Comparator.comparingInt(ClanHall::getResidenceId)).collect(Collectors.toList()); + final List freeAuctionableHalls = new ArrayList<>(); + for (ClanHall ch : _clanHalls.values()) + { + if ((ch.getType() == ClanHallType.AUCTIONABLE) && (ch.getOwner() == null)) + { + freeAuctionableHalls.add(ch); + } + } + Collections.sort(freeAuctionableHalls, Comparator.comparingInt(ClanHall::getResidenceId)); + return freeAuctionableHalls; } /**