/**
	 * This method is used to limit the given Warehouse List to:
	 *
Amulett

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createAmulettList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem() && (item.getItemName().toUpperCase().startsWith("AMULET")) || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

/**
	 * This method is used to limit the given Warehouse List to:
	 *
Amulett

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createAmulettList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<L2WarehouseItem>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem() && (item.getItemName().toUpperCase().startsWith("AMULET")) || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

Replace Generic With Diamond FastList<L2WarehouseItem> with FastList<> in method private createAmulettList(_items L2ItemInstance[]) : List<L2WarehouseItem> from class com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList


/**
	 * This method is used to limit the given Warehouse List to:
	 *
Spellbook & Dwarven Drafts

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createSpellbookList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem() && (!item.getItemName().toUpperCase().startsWith("AMULET")) || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

/**
	 * This method is used to limit the given Warehouse List to:
	 *
Spellbook & Dwarven Drafts

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createSpellbookList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<L2WarehouseItem>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem() && (!item.getItemName().toUpperCase().startsWith("AMULET")) || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

Replace Generic With Diamond FastList<L2WarehouseItem> with FastList<> in method private createSpellbookList(_items L2ItemInstance[]) : List<L2WarehouseItem> from class com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList


/**
	 * This method is used to limit the given Warehouse List to:
	 *
Consumables (Potions, Shots, ...)

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createConsumableList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem() && (item.getEtcItem().getItemType() == L2EtcItemType.SCROLL || item.getEtcItem().getItemType() == L2EtcItemType.SHOT) || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

/**
	 * This method is used to limit the given Warehouse List to:
	 *
Consumables (Potions, Shots, ...)

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createConsumableList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<L2WarehouseItem>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem() && (item.getEtcItem().getItemType() == L2EtcItemType.SCROLL || item.getEtcItem().getItemType() == L2EtcItemType.SHOT) || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

Replace Generic With Diamond FastList<L2WarehouseItem> with FastList<> in method private createConsumableList(_items L2ItemInstance[]) : List<L2WarehouseItem> from class com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList


/**
	 * This method is used to limit the given Warehouse List to:
	 *
Shots

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createShotList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem() && item.getEtcItem().getItemType() == L2EtcItemType.SHOT || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

/**
	 * This method is used to limit the given Warehouse List to:
	 *
Shots

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createShotList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<L2WarehouseItem>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem() && item.getEtcItem().getItemType() == L2EtcItemType.SHOT || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

Replace Generic With Diamond FastList<L2WarehouseItem> with FastList<> in method private createShotList(_items L2ItemInstance[]) : List<L2WarehouseItem> from class com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList


/**
	 * This method is used to limit the given Warehouse List to:
	 *
Scrolls/Potions

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createScrollList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem() && item.getEtcItem().getItemType() == L2EtcItemType.SCROLL || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

/**
	 * This method is used to limit the given Warehouse List to:
	 *
Scrolls/Potions

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createScrollList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<L2WarehouseItem>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem() && item.getEtcItem().getItemType() == L2EtcItemType.SCROLL || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

Replace Generic With Diamond FastList<L2WarehouseItem> with FastList<> in method private createScrollList(_items L2ItemInstance[]) : List<L2WarehouseItem> from class com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList


/**
	 * This method is used to limit the given Warehouse List to:
	 *
Seeds

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createSeedList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem() && item.getEtcItem().getItemType() == L2EtcItemType.SEED || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

/**
	 * This method is used to limit the given Warehouse List to:
	 *
Seeds

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createSeedList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<L2WarehouseItem>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem() && item.getEtcItem().getItemType() == L2EtcItemType.SEED || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

Replace Generic With Diamond FastList<L2WarehouseItem> with FastList<> in method private createSeedList(_items L2ItemInstance[]) : List<L2WarehouseItem> from class com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList


/**
	 * This method is used to limit the given Warehouse List to:
	 *
Everything which is no Weapon/Armor, Material, Recipe, Spellbook, Scroll or Shot

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createOtherList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem()
					&& (item.getEtcItem().getItemType() != L2EtcItemType.MATERIAL && item.getEtcItem().getItemType() != L2EtcItemType.RECIPE
							&& item.getEtcItem().getItemType() != L2EtcItemType.SCROLL && item.getEtcItem().getItemType() != L2EtcItemType.SHOT) || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

/**
	 * This method is used to limit the given Warehouse List to:
	 *
Everything which is no Weapon/Armor, Material, Recipe, Spellbook, Scroll or Shot

	 *
Money

	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createOtherList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<L2WarehouseItem>();
		for (L2ItemInstance item : _items)
		{
			if (item.isEtcItem()
					&& (item.getEtcItem().getItemType() != L2EtcItemType.MATERIAL && item.getEtcItem().getItemType() != L2EtcItemType.RECIPE
							&& item.getEtcItem().getItemType() != L2EtcItemType.SCROLL && item.getEtcItem().getItemType() != L2EtcItemType.SHOT) || item.getItem().getType2() == L2Item.TYPE2_MONEY)
			{
				if (_list.size() < MAX_SORT_LIST_ITEMS)
					_list.add(new L2WarehouseItem(item));
				else
					continue;
			}
		}
		return _list;
	}

Replace Generic With Diamond FastList<L2WarehouseItem> with FastList<> in method private createOtherList(_items L2ItemInstance[]) : List<L2WarehouseItem> from class com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList


/**
	 * This method is used to limit the given Warehouse List to:
	 *
no limit

	 * This may sound strange but we return the given Array as a List<L2WarehouseItem>
	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createAllList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<>();
		for (L2ItemInstance item : _items)
		{
			if (_list.size() < MAX_SORT_LIST_ITEMS)
				_list.add(new L2WarehouseItem(item));
			else
				continue;
		}
		return _list;
	}

/**
	 * This method is used to limit the given Warehouse List to:
	 *
no limit

	 * This may sound strange but we return the given Array as a List<L2WarehouseItem>
	 * @param _items complete Warehouse List
	 * @return limited Item List
	 */
	private List<L2WarehouseItem> createAllList(L2ItemInstance[] _items)
	{
		List<L2WarehouseItem> _list = new FastList<L2WarehouseItem>();
		for (L2ItemInstance item : _items)
		{
			if (_list.size() < MAX_SORT_LIST_ITEMS)
				_list.add(new L2WarehouseItem(item));
			else
				continue;
		}
		return _list;
	}

Replace Generic With Diamond FastList<L2WarehouseItem> with FastList<> in method private createAllList(_items L2ItemInstance[]) : List<L2WarehouseItem> from class com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList


	/**
	 * If you have access to object itself use {@link StatusUpdate#StatusUpdate(L2Object)}.
	 * @param objectId
	 */
	public StatusUpdate(int objectId)
	{
		_attributes = new ArrayList<>();
		_objectId = objectId;
		L2Object obj = L2World.getInstance().findObject(objectId);
		if (obj != null && obj instanceof L2Attackable)
		{
			_maxHp = ((L2Character) obj).getMaxVisibleHp();
		}
	}

	/**
	 * If you have access to object itself use {@link StatusUpdate#StatusUpdate(L2Object)}.
	 * @param objectId
	 */
	public StatusUpdate(int objectId)
	{
		_attributes = new ArrayList<Attribute>();
		_objectId = objectId;
		L2Object obj = L2World.getInstance().findObject(objectId);
		if (obj != null && obj instanceof L2Attackable)
		{
			_maxHp = ((L2Character) obj).getMaxVisibleHp();
		}
	}

Replace Generic With Diamond ArrayList<Attribute> with ArrayList<> in method public StatusUpdate(objectId int) from class com.l2jserver.gameserver.network.serverpackets.StatusUpdate


	/**
	 * Create {@link StatusUpdate} packet for given {@link L2Object}.
	 * @param object
	 */
	public StatusUpdate(L2Object object)
	{
		_attributes = new ArrayList<>();
		_objectId = object.getObjectId();
		if (object instanceof L2Attackable)
			_maxHp = ((L2Character) object).getMaxVisibleHp();
	}

	/**
	 * Create {@link StatusUpdate} packet for given {@link L2Object}.
	 * @param object
	 */
	public StatusUpdate(L2Object object)
	{
		_attributes = new ArrayList<Attribute>();
		_objectId = object.getObjectId();
		if (object instanceof L2Attackable)
			_maxHp = ((L2Character) object).getMaxVisibleHp();
	}

Replace Generic With Diamond ArrayList<Attribute> with ArrayList<> in method public StatusUpdate(object L2Object) from class com.l2jserver.gameserver.network.serverpackets.StatusUpdate


	public WareHouseDepositList(L2PcInstance player, int type)
	{
		_whType = type;
		_playerAdena = player.getAdena();
		_items = new FastList<>();

		final boolean isPrivate = _whType == PRIVATE;
		for (L2ItemInstance temp : player.getInventory().getAvailableItems(true, isPrivate, false))
		{
			if (temp != null && temp.isDepositable(isPrivate))
				_items.add(temp);
		}
	}

	public WareHouseDepositList(L2PcInstance player, int type)
	{
		_whType = type;
		_playerAdena = player.getAdena();
		_items = new FastList<L2ItemInstance>();

		final boolean isPrivate = _whType == PRIVATE;
		for (L2ItemInstance temp : player.getInventory().getAvailableItems(true, isPrivate, false))
		{
			if (temp != null && temp.isDepositable(isPrivate))
				_items.add(temp);
		}
	}

Replace Generic With Diamond FastList<L2ItemInstance> with FastList<> in method public WareHouseDepositList(player L2PcInstance, type int) from class com.l2jserver.gameserver.network.serverpackets.WareHouseDepositList


		public BufferInfo(int size, int cnt)
		{
			mapSize = size;
			count = cnt;
			bufs = new ArrayList<>(count);
		}

		public BufferInfo(int size, int cnt)
		{
			mapSize = size;
			count = cnt;
			bufs = new ArrayList<CellNodeBuffer>(count);
		}

Replace Generic With Diamond ArrayList<CellNodeBuffer> with ArrayList<> in method public BufferInfo(size int, cnt int) from class com.l2jserver.gameserver.pathfinding.cellnodes.CellPathFinding.BufferInfo


	private void LoadPathNodeFile(byte rx, byte ry)
	{
		if ((rx < Config.WORLD_X_MIN) || (rx > Config.WORLD_X_MAX) || (ry < Config.WORLD_Y_MIN) || (ry > Config.WORLD_Y_MAX))
		{
			_log.warning("Failed to Load PathNode File: invalid region " + rx + "," + ry + "\n");
			return;
		}
		String fname = "./data/pathnode/" + rx + "_" + ry + ".pn";
		short regionoffset = getRegionOffset(rx, ry);
		_log.info("PathFinding Engine: - Loading: " + fname + " -> region offset: " + regionoffset + "X: " + rx + " Y: " + ry);
		File Pn = new File(fname);
		int node = 0, size, index = 0;

		// Create a read-only memory-mapped file
		try (RandomAccessFile raf = new RandomAccessFile(Pn, "r"); FileChannel roChannel = raf.getChannel())
		{
			size = (int) roChannel.size();
			MappedByteBuffer nodes;
			if (Config.FORCE_GEODATA)
			{
				// it is not guarantee, because the underlying operating system may have paged out some of the buffer's data
				nodes = roChannel.map(FileChannel.MapMode.READ_ONLY, 0, size).load();
			}
			else
			{
				nodes = roChannel.map(FileChannel.MapMode.READ_ONLY, 0, size);
			}

			// Indexing pathnode files, so we will know where each block starts
			IntBuffer indexs = IntBuffer.allocate(65536);

			while (node < 65536)
			{
				byte layer = nodes.get(index);
				indexs.put(node++, index);
				index += (layer * 10) + 1;
			}
			_pathNodesIndex.put(regionoffset, indexs);
			_pathNodes.put(regionoffset, nodes);
		}
		catch (Exception e)
		{
			_log.log(Level.WARNING, "Failed to Load PathNode File: " + fname + " : " + e.getMessage(), e);
		}
	}

	private void LoadPathNodeFile(byte rx, byte ry)
	{
		if (rx < Config.WORLD_X_MIN || rx > Config.WORLD_X_MAX || ry < Config.WORLD_Y_MIN || ry > Config.WORLD_Y_MAX)
		{
			_log.warning("Failed to Load PathNode File: invalid region " + rx +","+ ry + "\n");
			return;
		}
		String fname = "./data/pathnode/" + rx + "_" + ry + ".pn";
		short regionoffset = getRegionOffset(rx, ry);
		_log.info("PathFinding Engine: - Loading: " + fname + " -> region offset: " + regionoffset + "X: " + rx + " Y: " + ry);
		File Pn = new File(fname);
		int node = 0, size, index = 0;
		FileChannel roChannel = null;
		try
		{
			// Create a read-only memory-mapped file
			roChannel = new RandomAccessFile(Pn, "r").getChannel();
			size = (int) roChannel.size();
			MappedByteBuffer nodes;
			if (Config.FORCE_GEODATA) //Force O/S to Loads this buffer's content into physical memory.
				//it is not guarantee, because the underlying operating system may have paged out some of the buffer's data
				nodes = roChannel.map(FileChannel.MapMode.READ_ONLY, 0, size).load();
			else
				nodes = roChannel.map(FileChannel.MapMode.READ_ONLY, 0, size);

			// Indexing pathnode files, so we will know where each block starts
			IntBuffer indexs = IntBuffer.allocate(65536);

			while (node < 65536)
			{
				byte layer = nodes.get(index);
				indexs.put(node++, index);
				index += layer * 10 + 1;
			}
			_pathNodesIndex.put(regionoffset, indexs);
			_pathNodes.put(regionoffset, nodes);
		}
		catch (Exception e)
		{
			_log.log(Level.WARNING, "Failed to Load PathNode File: " + fname + " : " + e.getMessage(), e);
		}
		finally
		{
			try
			{
				roChannel.close();
			}
			catch (Exception e)
			{
			}
		}

	}

Try With Resources try(RandomAccessFile raf=new RandomAccessFile(Pn,"r"); FileChannel roChannel=raf.getChannel()) in method private LoadPathNodeFile(rx byte, ry byte) : void from class com.l2jserver.gameserver.pathfinding.geonodes.GeoPathFinding


	protected GeoPathFinding()
	{
		final File file = new File("./data/pathnode/pn_index.txt");
		try (FileReader fr = new FileReader(file);
			BufferedReader br = new BufferedReader(fr);
			LineNumberReader lnr = new LineNumberReader(br))
		{
			_log.info("PathFinding Engine: - Loading Path Nodes...");
			String line;
			while ((line = lnr.readLine()) != null)
			{
				if (line.trim().length() == 0)
				{
					continue;
				}
				StringTokenizer st = new StringTokenizer(line, "_");
				byte rx = Byte.parseByte(st.nextToken());
				byte ry = Byte.parseByte(st.nextToken());
				LoadPathNodeFile(rx, ry);
			}
		}
		catch (Exception e)
		{
			_log.log(Level.WARNING, "", e);
			throw new Error("Failed to Read pn_index File.");
		}
	}

	private GeoPathFinding()
	{
		LineNumberReader lnr = null;
		try
		{
			_log.info("PathFinding Engine: - Loading Path Nodes...");
			File Data = new File("./data/pathnode/pn_index.txt");
			if (!Data.exists())
				return;

			lnr = new LineNumberReader(new BufferedReader(new FileReader(Data)));
		}
		catch (Exception e)
		{
			_log.log(Level.WARNING, "", e);
			throw new Error("Failed to Load pn_index File.");
		}
		String line;
		try
		{
			while ((line = lnr.readLine()) != null)
			{
				if (line.trim().length() == 0)
					continue;
				StringTokenizer st = new StringTokenizer(line, "_");
				byte rx = Byte.parseByte(st.nextToken());
				byte ry = Byte.parseByte(st.nextToken());
				LoadPathNodeFile(rx, ry);
			}
		}
		catch (Exception e)
		{
			_log.log(Level.WARNING, "", e);
			throw new Error("Failed to Read pn_index File.");
		}
		finally
		{
			try
			{
				lnr.close();
			}
			catch (Exception e)
			{
			}
		}
	}

Try With Resources try(FileReader fr=new FileReader(file); BufferedReader br=new BufferedReader(fr); LineNumberReader lnr=new LineNumberReader(br)) in method protected GeoPathFinding() from class com.l2jserver.gameserver.pathfinding.geonodes.GeoPathFinding


	public void reportScriptFileError(File script, ScriptException e)
	{
		String dir = script.getParent();
		String name = script.getName() + ".error.log";
		if (dir != null)
		{
			final File file = new File(dir + "/" + name);
			try (FileOutputStream fos = new FileOutputStream(file))
			{
				String errorHeader = "Error on: " + file.getCanonicalPath() + "\r\nLine: " + e.getLineNumber() + " - Column: " + e.getColumnNumber() + "\r\n\r\n";
				fos.write(errorHeader.getBytes());
				fos.write(e.getMessage().getBytes());
				_log.warning("Failed executing script: " + script.getAbsolutePath() + ". See " + file.getName() + " for details.");
			}
			catch (IOException ioe)
			{
				_log.log(Level.WARNING, "Failed executing script: " + script.getAbsolutePath() + "\r\n" + e.getMessage() + "Additionally failed when trying to write an error report on script directory. Reason: " + ioe.getMessage(), ioe);
			}
		}
		else
		{
			_log.log(Level.WARNING, "Failed executing script: " + script.getAbsolutePath() + "\r\n" + e.getMessage() + "Additionally failed when trying to write an error report on script directory.", e);
		}
	}

	public void reportScriptFileError(File script, ScriptException e)
	{
		String dir = script.getParent();
		String name = script.getName() + ".error.log";
		if (dir != null)
		{
			File file = new File(dir + "/" + name);
			FileOutputStream fos = null;
			try
			{
				if (!file.exists())
				{
					file.createNewFile();
				}

				fos = new FileOutputStream(file);
				String errorHeader = "Error on: " + file.getCanonicalPath() + "\r\nLine: " + e.getLineNumber() + " - Column: "
				+ e.getColumnNumber() + "\r\n\r\n";
				fos.write(errorHeader.getBytes());
				fos.write(e.getMessage().getBytes());
				_log.warning("Failed executing script: " + script.getAbsolutePath() + ". See " + file.getName() + " for details.");
			}
			catch (IOException ioe)
			{
				_log.log(Level.WARNING, "Failed executing script: " + script.getAbsolutePath() + "\r\n" + e.getMessage()
						+ "Additionally failed when trying to write an error report on script directory. Reason: " + ioe.getMessage(), ioe);
			}
			finally
			{
				try
				{
					fos.close();
				}
				catch (Exception e1)
				{
				}
			}
		}
		else
		{
			_log.log(Level.WARNING, "Failed executing script: " + script.getAbsolutePath() + "\r\n" + e.getMessage()
					+ "Additionally failed when trying to write an error report on script directory.", e);
		}
	}

Try With Resources try(FileOutputStream fos=new FileOutputStream(file)) in method public reportScriptFileError(script File, e ScriptException) : void from class com.l2jserver.gameserver.scripting.L2ScriptEngineManager


	/**
	 * Load game server names.
	 */
	private void loadGameServerNames()
	{
		final File xml = new File(Config.DATAPACK_ROOT, "data/servername.xml");
		try (InputStream in = new FileInputStream(xml);)
		{
			final XMLStreamReaderImpl xpp = new XMLStreamReaderImpl();
			xpp.setInput(new UTF8StreamReader().setInput(in));
			for (int e = xpp.getEventType(); e != XMLStreamConstants.END_DOCUMENT; e = xpp.next())
			{
				if (e == XMLStreamConstants.START_ELEMENT)
				{
					if (xpp.getLocalName().toString().equals("server"))
					{
						Integer id = Integer.valueOf(xpp.getAttributeValue(null, "id").toString());
						String name = xpp.getAttributeValue(null, "name").toString();
						_serverNames.put(id, name);
					}
				}
			}
			xpp.close();
		}
		catch (Exception e)
		{
			_log.info(getClass().getSimpleName() + ": Cannot load " + xml.getAbsolutePath() + "!");
		}
	}

	private void loadServerNames()
	{
		InputStream in = null;
		try
		{
			in = new FileInputStream(new File(Config.DATAPACK_ROOT, "data/servername.xml"));
			XMLStreamReaderImpl xpp = new XMLStreamReaderImpl();
			xpp.setInput(new UTF8StreamReader().setInput(in));
			for (int e = xpp.getEventType(); e != XMLStreamConstants.END_DOCUMENT; e = xpp.next())
			{
				if (e == XMLStreamConstants.START_ELEMENT)
				{
					if (xpp.getLocalName().toString().equals("server"))
					{
						Integer id = Integer.valueOf(xpp.getAttributeValue(null, "id").toString());
						String name = xpp.getAttributeValue(null, "name").toString();
						_serverNames.put(id, name);
					}
				}
			}
		}
		catch (FileNotFoundException e)
		{
			_log.warning("servername.xml could not be loaded: file not found");
		}
		catch (XMLStreamException xppe)
		{
			xppe.printStackTrace();
		}
		finally
		{
			try
			{
				in.close();
			}
			catch (Exception e)
			{
			}
		}
	}

Try With Resources try(InputStream in=new FileInputStream(xml)) in method private loadGameServerNames() : void from class com.l2jserver.loginserver.GameServerTable


	private void loadBanFile()
	{
		final File bannedFile = new File("./banned_ip.cfg");
		if (bannedFile.exists() && bannedFile.isFile())
		{
			String line;
			String[] parts;
			try (FileInputStream fis = new FileInputStream(bannedFile); InputStreamReader is = new InputStreamReader(fis); LineNumberReader reader = new LineNumberReader(is))
			{
				while ((line = reader.readLine()) != null)
				{
					line = line.trim();
					// check if this line isn't a comment line
					if ((line.length() > 0) && (line.charAt(0) != '#'))
					{
						// split comments if any
						parts = line.split("#", 2);

						// discard comments in the line, if any
						line = parts[0];

						parts = line.split(" ");

						String address = parts[0];

						long duration = 0;

						if (parts.length > 1)
						{
							try
							{
								duration = Long.parseLong(parts[1]);
							}
							catch (NumberFormatException e)
							{
								_log.warning("Skipped: Incorrect ban duration (" + parts[1] + ") on (" + bannedFile.getName() + "). Line: " + reader.getLineNumber());
								continue;
							}
						}

						try
						{
							LoginController.getInstance().addBanForAddress(address, duration);
						}
						catch (UnknownHostException e)
						{
							_log.warning("Skipped: Invalid address (" + parts[0] + ") on (" + bannedFile.getName() + "). Line: " + reader.getLineNumber());
						}
					}
				}
			}
			catch (IOException e)
			{
				_log.log(Level.WARNING, "Error while reading the bans file (" + bannedFile.getName() + "). Details: " + e.getMessage(), e);
			}
			_log.info("Loaded " + LoginController.getInstance().getBannedIps().size() + " IP Bans.");
		}
		else
		{
			_log.warning("IP Bans file (" + bannedFile.getName() + ") is missing or is a directory, skipped.");
		}

		if (Config.LOGIN_SERVER_SCHEDULE_RESTART)
		{
			_log.info("Scheduled LS restart after " + Config.LOGIN_SERVER_SCHEDULE_RESTART_TIME + " hours");
			_restartLoginServer = new LoginServerRestart();
			_restartLoginServer.setDaemon(true);
			_restartLoginServer.start();
		}
	}

	private void loadBanFile()
	{
		File bannedFile = new File("./banned_ip.cfg");
		if (bannedFile.exists() && bannedFile.isFile())
		{
			FileInputStream fis = null;
			try
			{
				fis = new FileInputStream(bannedFile);
			}
			catch (FileNotFoundException e)
			{
				_log.log(Level.WARNING, "Failed to load banned IPs file (" + bannedFile.getName() + ") for reading. Reason: " + e.getMessage(), e);
				return;
			}

			LineNumberReader reader = null;
			String line;
			String[] parts;
			try
			{
				reader = new LineNumberReader(new InputStreamReader(fis));

				while ((line = reader.readLine()) != null)
				{
					line = line.trim();
					// check if this line isnt a comment line
					if (line.length() > 0 && line.charAt(0) != '#')
					{
						// split comments if any
						parts = line.split("#", 2);

						// discard comments in the line, if any
						line = parts[0];

						parts = line.split(" ");

						String address = parts[0];

						long duration = 0;

						if (parts.length > 1)
						{
							try
							{
								duration = Long.parseLong(parts[1]);
							}
							catch (NumberFormatException e)
							{
								_log.warning("Skipped: Incorrect ban duration (" + parts[1] + ") on (" + bannedFile.getName() + "). Line: " + reader.getLineNumber());
								continue;
							}
						}

						try
						{
							LoginController.getInstance().addBanForAddress(address, duration);
						}
						catch (UnknownHostException e)
						{
							_log.warning("Skipped: Invalid address (" + parts[0] + ") on (" + bannedFile.getName() + "). Line: " + reader.getLineNumber());
						}
					}
				}
			}
			catch (IOException e)
			{
				_log.log(Level.WARNING, "Error while reading the bans file (" + bannedFile.getName() + "). Details: " + e.getMessage(), e);
			}
			finally
			{
				try
				{
					reader.close();
				}
				catch (Exception e)
				{
				}

				try
				{
					fis.close();
				}
				catch (Exception e)
				{
				}
			}
			_log.info("Loaded " + LoginController.getInstance().getBannedIps().size() + " IP Bans.");
		}
		else
		{
			_log.warning("IP Bans file (" + bannedFile.getName() + ") is missing or is a directory, skipped.");
		}

		if (Config.LOGIN_SERVER_SCHEDULE_RESTART)
		{
			_log.info("Scheduled LS restart after " + Config.LOGIN_SERVER_SCHEDULE_RESTART_TIME + " hours");
			_restartLoginServer = new LoginServerRestart();
			_restartLoginServer.setDaemon(true);
			_restartLoginServer.start();
		}
	}

Try With Resources try(FileInputStream fis=new FileInputStream(bannedFile); InputStreamReader is=new InputStreamReader(fis); LineNumberReader reader=new LineNumberReader(is)) in method private loadBanFile() : void from class com.l2jserver.loginserver.L2LoginServer


	private void loadMails()
	{
		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
		factory.setValidating(false);
		factory.setIgnoringComments(true);
		File file = new File(Config.DATAPACK_ROOT, "data/mail/MailList.xml");
		Document doc = null;
		if (file.exists())
		{
			try
			{
				doc = factory.newDocumentBuilder().parse(file);
			}
			catch (Exception e)
			{
				_log.log(Level.WARNING, "Could not parse MailList.xml file: " + e.getMessage(), e);
				return;
			}

			Node n = doc.getFirstChild();
			File mailFile;
			for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
			{
				if (d.getNodeName().equals("mail"))
				{
					String mailId = d.getAttributes().getNamedItem("id").getNodeValue();
					String subject = d.getAttributes().getNamedItem("subject").getNodeValue();
					String maFile = d.getAttributes().getNamedItem("file").getNodeValue();

					mailFile = new File(Config.DATAPACK_ROOT, "data/mail/" + maFile);
					try (FileInputStream fis = new FileInputStream(mailFile); BufferedInputStream bis = new BufferedInputStream(fis);)
					{
						int bytes = bis.available();
						byte[] raw = new byte[bytes];

						bis.read(raw);
						String html = new String(raw, "UTF-8");
						html = html.replaceAll("\r\n", "\n");
						html = html.replace("%servermail%", Config.EMAIL_SERVERINFO_ADDRESS);
						html = html.replace("%servername%", Config.EMAIL_SERVERINFO_NAME);

						_mailData.put(mailId, new MailContent(subject, html));
					}
					catch (IOException e)
					{
						_log.warning("IOException while reading " + maFile);
					}
				}
			}
			_log.info("eMail System Loaded");
		}
		else
		{
			_log.warning("Cannot load eMail System - Missing file MailList.xml");
		}
	}

	private void loadMails()
	{
		DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
		factory.setValidating(false);
		factory.setIgnoringComments(true);
		File file = new File(Config.DATAPACK_ROOT, "data/mail/MailList.xml");
		Document doc = null;
		if (file.exists())
		{
			try
			{
				doc = factory.newDocumentBuilder().parse(file);
			}
			catch (Exception e)
			{
				_log.log(Level.WARNING, "Could not parse MailList.xml file: " + e.getMessage(), e);
			}

			Node n = doc.getFirstChild();
			for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
			{
				if (d.getNodeName().equals("mail"))
				{
					String mailId = d.getAttributes().getNamedItem("id").getNodeValue();
					String subject = d.getAttributes().getNamedItem("subject").getNodeValue();
					String maFile = d.getAttributes().getNamedItem("file").getNodeValue();

					try
					{
						FileInputStream fis = new FileInputStream(new File(Config.DATAPACK_ROOT, "data/mail/"+maFile));
						BufferedInputStream bis = new BufferedInputStream(fis);
						int bytes = bis.available();
						byte[] raw = new byte[bytes];

						bis.read(raw);
						String html = new String(raw, "UTF-8");
						html = html.replaceAll("\r\n", "\n");
						html = html.replace("%servermail%", Config.EMAIL_SERVERINFO_ADDRESS);
						html = html.replace("%servername%", Config.EMAIL_SERVERINFO_NAME);

						_mailData.put(mailId, new MailContent(subject, html));
					}
					catch (IOException e)
					{
						_log.warning("IOException while reading "+maFile);
					}
				}
			}
			_log.info("eMail System Loaded");
		}
		else
			_log.warning("Cannot load eMail System - Missing file MailList.xml");
	}

Try With Resources try(FileInputStream fis=new FileInputStream(mailFile); BufferedInputStream bis=new BufferedInputStream(fis)) in method private loadMails() : void from class com.l2jserver.loginserver.mail.MailSystem


	private boolean isValidIP(Socket client)
	{
		boolean result = false;
		InetAddress ClientIP = client.getInetAddress();

		// convert IP to String, and compare with list
		String clientStringIP = ClientIP.getHostAddress();

		telnetOutput(1, "Connection from: " + clientStringIP);

		// read and loop thru list of IPs, compare with newIP
		if (Config.DEVELOPER)
		{
			telnetOutput(2, "");
		}

		final File file = new File(Config.TELNET_FILE);
		try (InputStream telnetIS = new FileInputStream(file);)
		{
			Properties telnetSettings = new Properties();
			telnetSettings.load(telnetIS);

			String HostList = telnetSettings.getProperty("ListOfHosts", "127.0.0.1,localhost,::1");

			if (Config.DEVELOPER)
			{
				telnetOutput(3, "Comparing ip to list...");
			}

			// compare
			String ipToCompare = null;
			for (String ip : HostList.split(","))
			{
				if (!result)
				{
					ipToCompare = InetAddress.getByName(ip).getHostAddress();
					if (clientStringIP.equals(ipToCompare))
					{
						result = true;
					}
					if (Config.DEVELOPER)
					{
						telnetOutput(3, clientStringIP + " = " + ipToCompare + "(" + ip + ") = " + result);
					}
				}
			}
		}
		catch (IOException e)
		{
			if (Config.DEVELOPER)
			{
				telnetOutput(4, "");
			}
			telnetOutput(1, "Error: " + e);
		}

		if (Config.DEVELOPER)
		{
			telnetOutput(4, "Allow IP: " + result);
		}
		return result;
	}

	private boolean isValidIP(Socket client)
	{
		boolean result = false;
		InetAddress ClientIP = client.getInetAddress();

		// convert IP to String, and compare with list
		String clientStringIP = ClientIP.getHostAddress();

		telnetOutput(1, "Connection from: " + clientStringIP);

		// read and loop thru list of IPs, compare with newIP
		if (Config.DEVELOPER)
			telnetOutput(2, "");

		InputStream telnetIS = null;
		try
		{
			Properties telnetSettings = new Properties();
			telnetIS = new FileInputStream(new File(Config.TELNET_FILE));
			telnetSettings.load(telnetIS);

			String HostList = telnetSettings.getProperty("ListOfHosts", "127.0.0.1,localhost,::1");

			if (Config.DEVELOPER)
				telnetOutput(3, "Comparing ip to list...");

			// compare
			String ipToCompare = null;
			for (String ip : HostList.split(","))
			{
				if (!result)
				{
					ipToCompare = InetAddress.getByName(ip).getHostAddress();
					if (clientStringIP.equals(ipToCompare))
						result = true;
					if (Config.DEVELOPER)
						telnetOutput(3, clientStringIP + " = " + ipToCompare + "(" + ip + ") = " + result);
				}
			}
		}
		catch (IOException e)
		{
			if (Config.DEVELOPER)
				telnetOutput(4, "");
			telnetOutput(1, "Error: " + e);
		}
		finally
		{
			try
			{
				telnetIS.close();
			}
			catch (Exception e)
			{
			}
		}

		if (Config.DEVELOPER)
			telnetOutput(4, "Allow IP: " + result);
		return result;
	}

Try With Resources try(InputStream telnetIS=new FileInputStream(file)) in method private isValidIP(client Socket) : boolean from class com.l2jserver.status.GameStatusThread


	private boolean isValidIP(Socket client)
	{
		boolean result = false;
		InetAddress ClientIP = client.getInetAddress();

		// convert IP to String, and compare with list
		String clientStringIP = ClientIP.getHostAddress();

		telnetOutput(1, "Connection from: " + clientStringIP);

		// read and loop thru list of IPs, compare with newIP
		if (Config.DEVELOPER)
		{
			telnetOutput(2, "");
		}

		final File file = new File(Config.TELNET_FILE);
		try (InputStream telnetIS = new FileInputStream(file))
		{
			Properties telnetSettings = new Properties();
			telnetSettings.load(telnetIS);

			String HostList = telnetSettings.getProperty("ListOfHosts", "127.0.0.1,localhost,::1");

			if (Config.DEVELOPER)
			{
				telnetOutput(3, "Comparing ip to list...");
			}

			// compare
			String ipToCompare = null;
			for (String ip : HostList.split(","))
			{
				if (!result)
				{
					ipToCompare = InetAddress.getByName(ip).getHostAddress();
					if (clientStringIP.equals(ipToCompare))
					{
						result = true;
					}
					if (Config.DEVELOPER)
					{
						telnetOutput(3, clientStringIP + " = " + ipToCompare + "(" + ip + ") = " + result);
					}
				}
			}
		}
		catch (IOException e)
		{
			if (Config.DEVELOPER)
			{
				telnetOutput(4, "");
			}
			telnetOutput(1, "Error: " + e);
		}

		if (Config.DEVELOPER)
		{
			telnetOutput(4, "Allow IP: " + result);
		}
		return result;
	}

Try With Resources try(InputStream telnetIS=new FileInputStream(file)) in method private isValidIP(client Socket) : boolean from class com.l2jserver.status.LoginStatusThread


	public void sendMessageToTelnets(String msg)
	{
		List<LoginStatusThread> lsToRemove = new FastList<>();
		for (LoginStatusThread ls : _loginStatus)
		{
			if (ls.isInterrupted())
			{
				lsToRemove.add(ls);
			}
			else
			{
				ls.printToTelnet(msg);
			}
		}
	}

	public void sendMessageToTelnets(String msg)
	{
		List<LoginStatusThread> lsToRemove = new FastList<LoginStatusThread>();
		for (LoginStatusThread ls : _loginStatus)
		{
			if (ls.isInterrupted())
			{
				lsToRemove.add(ls);
			}
			else
			{
				ls.printToTelnet(msg);
			}
		}
	}

Replace Generic With Diamond FastList<LoginStatusThread> with FastList<> in method public sendMessageToTelnets(msg String) : void from class com.l2jserver.status.Status


	@Override
	public ResourceBundle newBundle(String baseName, Locale locale, String format, ClassLoader loader, boolean reload) throws IOException
	{
		if ((baseName == null) || (locale == null) || (format == null) || (loader == null))
		{
			throw new NullPointerException();
		}
		ResourceBundle bundle = null;
		if (format.equals("java.properties"))
		{
			format = "properties";
			String bundleName = toBundleName(baseName, locale);
			String resourceName = LANGUAGES_DIRECTORY + toResourceName(bundleName, format);

			try (FileInputStream fis = new FileInputStream(resourceName); BufferedInputStream bis = new BufferedInputStream(fis))
			{
				bundle = new PropertyResourceBundle(bis);
			}
		}
		return bundle;
	}

	@Override
	public ResourceBundle newBundle(String baseName, Locale locale, String format, ClassLoader loader, boolean reload) throws IOException
	{
		if (baseName == null || locale == null || format == null || loader == null)
		{
			throw new NullPointerException();
		}
		ResourceBundle bundle = null;
		if (format.equals("java.properties"))
		{
			format = "properties";
			String bundleName = toBundleName(baseName, locale);
			String resourceName = LANGUAGES_DIRECTORY + toResourceName(bundleName, format);
			BufferedInputStream bis = null;
			try
			{
				bis = new BufferedInputStream(new FileInputStream(resourceName));
				bundle = new PropertyResourceBundle(bis);
			}
			finally
			{
				bis.close();
			}
		}
		return bundle;
	}

Try With Resources try(FileInputStream fis=new FileInputStream(resourceName); BufferedInputStream bis=new BufferedInputStream(fis)) in method public newBundle(baseName String, locale Locale, format String, loader ClassLoader, reload boolean) : ResourceBundle from class com.l2jserver.tools.i18n.LanguageControl


	/**
	 * Attempts to decode Base64 data and deserialize a Java Object within.
	 * Returns <tt>null</tt> if there was an error.
	 *
	 * @param encodedObject
	 *            The Base64 data to decode
	 * @return The decoded and deserialized object
	 * @since 1.5
	 */
	public static Object decodeToObject(String encodedObject)
	{
		// Decode and gunzip if necessary
		byte[] objBytes = decode(encodedObject);
		Object obj = null;
		try (ByteArrayInputStream bais = new ByteArrayInputStream(objBytes);
			ObjectInputStream ois = new ObjectInputStream(bais))
		{
			obj = ois.readObject();
		}
		catch (IOException e)
		{
			_log.warning("Base64: " + e.getMessage());
		}
		catch (ClassNotFoundException e)
		{
			_log.warning("Base64: " + e.getMessage());
		}
		return obj;
	}

	/**
	 * Attempts to decode Base64 data and deserialize a Java Object within.
	 * Returns <tt>null</tt> if there was an error.
	 *
	 * @param encodedObject
	 *            The Base64 data to decode
	 * @return The decoded and deserialized object
	 * @since 1.5
	 */
	public static Object decodeToObject(String encodedObject)
	{
		// Decode and gunzip if necessary
		byte[] objBytes = decode(encodedObject);

		java.io.ByteArrayInputStream bais = null;
		java.io.ObjectInputStream ois = null;
		Object obj = null;

		try
		{
			bais = new java.io.ByteArrayInputStream(objBytes);
			ois = new java.io.ObjectInputStream(bais);

			obj = ois.readObject();
		}
		catch (java.io.IOException e)
		{
			e.printStackTrace();
		}
		catch (java.lang.ClassNotFoundException e)
		{
			e.printStackTrace();
		}
		finally
		{
			try
			{
				bais.close();
			}
			catch (Exception e)
			{
			}
			try
			{
				ois.close();
			}
			catch (Exception e)
			{
			}
		} // end finally

		return obj;
	} // end decodeObject

Try With Resources try(ByteArrayInputStream bais=new ByteArrayInputStream(objBytes); ObjectInputStream ois=new ObjectInputStream(bais)) in method public decodeToObject(encodedObject String) : Object from class com.l2jserver.util.Base64


	public IPv4Filter()
	{
		_ipFloodMap = new HashMap<>();
		Thread t = new Thread(this);
		t.setName(getClass().getSimpleName());
		t.setDaemon(true);
		t.start();
	}

	public IPv4Filter()
	{
		_ipFloodMap = new HashMap<Integer, Flood>();
		Thread t = new Thread(this);
		t.setName(getClass().getSimpleName());
		t.setDaemon(true);
		t.start();
	}

Replace Generic With Diamond HashMap<Integer,Flood> with HashMap<> in method public IPv4Filter() from class com.l2jserver.util.IPv4Filter


	protected void resetTable()
	{
		_tables = new FastMap<>();
	}

	protected void resetTable()
	{
		_tables = new FastMap<String, String[]>();
	}

Replace Generic With Diamond FastMap<String,String[]> with FastMap<> in method protected resetTable() : void from class com.l2jserver.gameserver.engines.DocumentBase


	protected void parseTable(Node n)
	{
		NamedNodeMap attrs = n.getAttributes();
		String name = attrs.getNamedItem("name").getNodeValue();
		if (name.charAt(0) != '#') throw new IllegalArgumentException("Table name must start with #");
		StringTokenizer data = new StringTokenizer(n.getFirstChild().getNodeValue());
		List<String> array = new ArrayList<>(data.countTokens());
		while (data.hasMoreTokens())
			array.add(data.nextToken());
		setTable(name, array.toArray(new String[array.size()]));
	}

	protected void parseTable(Node n)
	{
		NamedNodeMap attrs = n.getAttributes();
		String name = attrs.getNamedItem("name").getNodeValue();
		if (name.charAt(0) != '#') throw new IllegalArgumentException("Table name must start with #");
		StringTokenizer data = new StringTokenizer(n.getFirstChild().getNodeValue());
		List<String> array = new ArrayList<String>(data.countTokens());
		while (data.hasMoreTokens())
			array.add(data.nextToken());
		setTable(name, array.toArray(new String[array.size()]));
	}

Replace Generic With Diamond ArrayList<String> with ArrayList<> in method protected parseTable(n Node) : void from class com.l2jserver.gameserver.engines.DocumentBase


	public final void attach(Condition c)
	{
		if (_preConditions == null)
			_preConditions = new FastList<>();
		if (!_preConditions.contains(c))
			_preConditions.add(c);
	}

	public final void attach(Condition c)
	{
		if (_preConditions == null)
			_preConditions = new FastList<Condition>();
		if (!_preConditions.contains(c))
			_preConditions.add(c);
	}

Replace Generic With Diamond FastList<Condition> with FastList<> in method public attach(c Condition) : void from class com.l2jserver.gameserver.model.items.L2Item


	@Override
	public void storeEffect(boolean storeEffects)
	{
		if (!Config.SUMMON_STORE_SKILL_COOLTIME)
			return;

		if (getOwner().isInOlympiadMode())
			return;

		// Clear list for overwrite
		if (
				SummonEffectsTable.getInstance().getServitorEffectsOwner().contains(getOwner().getObjectId()) &&
				SummonEffectsTable.getInstance().getServitorEffectsOwner().get(getOwner().getObjectId()).contains(getOwner().getClassIndex()) &&
				SummonEffectsTable.getInstance().getServitorEffects(getOwner()).contains(getReferenceSkill())
			)
			SummonEffectsTable.getInstance().getServitorEffects(getOwner()).get(getReferenceSkill()).clear();

		Connection con = null;
		try
		{
			con = L2DatabaseFactory.getInstance().getConnection();

			// Delete all current stored effects for summon to avoid dupe
			PreparedStatement statement = con.prepareStatement(DELETE_SKILL_SAVE);

			statement.setInt(1, getOwner().getObjectId());
			statement.setInt(2, getOwner().getClassIndex());
			statement.setInt(3, getReferenceSkill());

			statement.execute();
			statement.close();

			int buff_index = 0;

			final List<Integer> storedSkills = new FastList<>();

			//Store all effect data along with calculated remaining
			statement = con.prepareStatement(ADD_SKILL_SAVE);

			if (storeEffects)
			{
				for (L2Effect effect : getAllEffects())
				{
					if (effect == null)
						continue;

					switch (effect.getEffectType())
					{
						case HEAL_OVER_TIME:
						case CPHEAL_OVER_TIME:
							// TODO: Fix me.
						case HIDE:
							continue;
					}

					L2Skill skill = effect.getSkill();
					if (storedSkills.contains(skill.getReuseHashCode()))
						continue;

					storedSkills.add(skill.getReuseHashCode());

					if (!effect.isHerbEffect() && effect.getInUse() && !skill.isToggle())
					{
						statement.setInt(1, getOwner().getObjectId());
						statement.setInt(2, getOwner().getClassIndex());
						statement.setInt(3, getReferenceSkill());
						statement.setInt(4, skill.getId());
						statement.setInt(5, skill.getLevel());
						statement.setInt(6, effect.getCount());
						statement.setInt(7, effect.getTime());
						statement.setInt(8, ++buff_index);
						statement.execute();

						if (!SummonEffectsTable.getInstance().getServitorEffectsOwner().contains(getOwner().getObjectId())) // Check if charId exists in map
							SummonEffectsTable.getInstance().getServitorEffectsOwner().put(getOwner().getObjectId(), new TIntObjectHashMap<TIntObjectHashMap<List<SummonEffect>>>());
						if (!SummonEffectsTable.getInstance().getServitorEffectsOwner().get(getOwner().getObjectId()).contains(getOwner().getClassIndex())) // Check if classIndex exists in charId map
							SummonEffectsTable.getInstance().getServitorEffectsOwner().get(getOwner().getObjectId()).put(getOwner().getClassIndex(), new TIntObjectHashMap<List<SummonEffect>>());
						if (!SummonEffectsTable.getInstance().getServitorEffects(getOwner()).contains(getReferenceSkill())) // Check is summonSkillId exists in charId+classIndex map
							SummonEffectsTable.getInstance().getServitorEffects(getOwner()).put(getReferenceSkill(), new FastList<SummonEffect>());

						SummonEffectsTable.getInstance().getServitorEffects(getOwner()).get(getReferenceSkill()).add(SummonEffectsTable.getInstance().new SummonEffect(skill, effect.getCount(), effect.getTime()));

					}
				}
				statement.close();
			}
		}
		catch (Exception e)
		{
			_log.log(Level.WARNING, "Could not store summon effect data: ", e);
		}
		finally
		{
			L2DatabaseFactory.close(con);
		}
	}

	@Override
	public void storeEffect(boolean storeEffects)
	{
		if (!Config.SUMMON_STORE_SKILL_COOLTIME)
			return;

		if (getOwner().isInOlympiadMode())
			return;

		// Clear list for overwrite
		if (
				SummonEffectsTable.getInstance().getServitorEffectsOwner().contains(getOwner().getObjectId()) &&
				SummonEffectsTable.getInstance().getServitorEffectsOwner().get(getOwner().getObjectId()).contains(getOwner().getClassIndex()) &&
				SummonEffectsTable.getInstance().getServitorEffects(getOwner()).contains(getReferenceSkill())
			)
			SummonEffectsTable.getInstance().getServitorEffects(getOwner()).get(getReferenceSkill()).clear();

		Connection con = null;
		try
		{
			con = L2DatabaseFactory.getInstance().getConnection();

			// Delete all current stored effects for summon to avoid dupe
			PreparedStatement statement = con.prepareStatement(DELETE_SKILL_SAVE);

			statement.setInt(1, getOwner().getObjectId());
			statement.setInt(2, getOwner().getClassIndex());
			statement.setInt(3, getReferenceSkill());

			statement.execute();
			statement.close();

			int buff_index = 0;

			final List<Integer> storedSkills = new FastList<Integer>();

			//Store all effect data along with calculated remaining
			statement = con.prepareStatement(ADD_SKILL_SAVE);

			if (storeEffects)
			{
				for (L2Effect effect : getAllEffects())
				{
					if (effect == null)
						continue;

					switch (effect.getEffectType())
					{
						case HEAL_OVER_TIME:
						case CPHEAL_OVER_TIME:
							// TODO: Fix me.
						case HIDE:
							continue;
					}

					L2Skill skill = effect.getSkill();
					if (storedSkills.contains(skill.getReuseHashCode()))
						continue;

					storedSkills.add(skill.getReuseHashCode());

					if (!effect.isHerbEffect() && effect.getInUse() && !skill.isToggle())
					{
						statement.setInt(1, getOwner().getObjectId());
						statement.setInt(2, getOwner().getClassIndex());
						statement.setInt(3, getReferenceSkill());
						statement.setInt(4, skill.getId());
						statement.setInt(5, skill.getLevel());
						statement.setInt(6, effect.getCount());
						statement.setInt(7, effect.getTime());
						statement.setInt(8, ++buff_index);
						statement.execute();

						if (!SummonEffectsTable.getInstance().getServitorEffectsOwner().contains(getOwner().getObjectId())) // Check if charId exists in map
							SummonEffectsTable.getInstance().getServitorEffectsOwner().put(getOwner().getObjectId(), new TIntObjectHashMap<TIntObjectHashMap<List<SummonEffect>>>());
						if (!SummonEffectsTable.getInstance().getServitorEffectsOwner().get(getOwner().getObjectId()).contains(getOwner().getClassIndex())) // Check if classIndex exists in charId map
							SummonEffectsTable.getInstance().getServitorEffectsOwner().get(getOwner().getObjectId()).put(getOwner().getClassIndex(), new TIntObjectHashMap<List<SummonEffect>>());
						if (!SummonEffectsTable.getInstance().getServitorEffects(getOwner()).contains(getReferenceSkill())) // Check is summonSkillId exists in charId+classIndex map
							SummonEffectsTable.getInstance().getServitorEffects(getOwner()).put(getReferenceSkill(), new FastList<SummonEffect>());

						SummonEffectsTable.getInstance().getServitorEffects(getOwner()).get(getReferenceSkill()).add(SummonEffectsTable.getInstance().new SummonEffect(skill, effect.getCount(), effect.getTime()));

					}
				}
				statement.close();
			}
		}
		catch (Exception e)
		{
			_log.log(Level.WARNING, "Could not store summon effect data: ", e);
		}
		finally
		{
			L2DatabaseFactory.close(con);
		}
	}

Replace Generic With Diamond FastList<Integer> with FastList<> in method public storeEffect(storeEffects boolean) : void from class com.l2jserver.gameserver.model.actor.instance.L2ServitorInstance


	/**
	 * Return created items
	 * @return List of {@link L2Item}
	 */
	public List<L2Item> loadItems()
	{
		List<L2Item> list = new FastList<>();
		for (File f : _itemFiles)
		{
			DocumentItem document = new DocumentItem(f);
			document.parse();
			list.addAll(document.getItemList());
		}
		return list;
	}

	/**
	 * Return created items
	 * @return List of {@link L2Item}
	 */
	public List<L2Item> loadItems()
	{
		List<L2Item> list = new FastList<L2Item>();
		for (File f : _itemFiles)
		{
			DocumentItem document = new DocumentItem(f);
			document.parse();
			list.addAll(document.getItemList());
		}
		return list;
	}

Replace Generic With Diamond FastList<L2Item> with FastList<> in method public loadItems() : List<L2Item> from class com.l2jserver.gameserver.engines.DocumentEngine


	private final Map<byte[], Boolean> loadRegisteredGameServers()
	{
		final Map<byte[], Boolean> registeredGameServers = new FastMap<>();

		Connection con = null;
		try
		{
			con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("SELECT hex_id FROM registered_gameservers");
			ResultSet rset = statement.executeQuery();

			while (rset.next())
			{
				// for (byte b : stringToHex(rset.getString("hex_id")))
				registeredGameServers.put(stringToHex(rset.getString("hex_id")), false);
			}
			statement.close();
			rset.close();
		}
		catch (SQLException e)
		{

		}
		finally
		{
			L2DatabaseFactory.close(con);
		}
		return registeredGameServers;
	}

	private final Map<byte[], Boolean> loadRegisteredGameServers()
	{
		final Map<byte[], Boolean> registeredGameServers = new FastMap<byte[], Boolean>();

		Connection con = null;
		try
		{
			con = L2DatabaseFactory.getInstance().getConnection();
			PreparedStatement statement = con.prepareStatement("SELECT hex_id FROM registered_gameservers");
			ResultSet rset = statement.executeQuery();

			while (rset.next())
			{
				// for (byte b : stringToHex(rset.getString("hex_id")))
				registeredGameServers.put(stringToHex(rset.getString("hex_id")), false);
			}
			statement.close();
			rset.close();
		}
		catch (SQLException e)
		{

		}
		finally
		{
			L2DatabaseFactory.close(con);
		}
		return registeredGameServers;
	}

Replace Generic With Diamond FastMap<byte[],Boolean> with FastMap<> in method private loadRegisteredGameServers() : Map<byte[],Boolean> from class com.l2jserver.communityserver.GameServerRegistrationTable


	protected final void sendWrite(final int playerObjId, final String html, String string, String string2, String string3)
	{
		try
		{
			string = edtiSavedTxT(string);
			string2 = edtiSavedTxT(string2);
			string3 = edtiSavedTxT(string3);
			_mgr.sendPacket(new PlayerShowBoard(playerObjId, html));
			FastList<String> arg = new FastList<>();
			arg.add("0");
			arg.add("0");
			arg.add("0");
			arg.add("0");
			arg.add("0");
			arg.add("0");
			arg.add(_mgr.getPlayer(playerObjId).getName());
			arg.add(Integer.toString(playerObjId));
			arg.add(_mgr.getPlayer(playerObjId).getAccountName());
			arg.add("9");
			arg.add(string3);
			arg.add(string2);
			arg.add(string);
			arg.add(string3);
			arg.add(string3);
			arg.add("0");
			arg.add("0");
			_mgr.sendPacket(new PlayerShowBoard(playerObjId, arg));
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}

	protected final void sendWrite(final int playerObjId, final String html, String string, String string2, String string3)
	{
		try
		{
			string = edtiSavedTxT(string);
			string2 = edtiSavedTxT(string2);
			string3 = edtiSavedTxT(string3);
			_mgr.sendPacket(new PlayerShowBoard(playerObjId, html));
			FastList<String> arg = new FastList<String>();
			arg.add("0");
			arg.add("0");
			arg.add("0");
			arg.add("0");
			arg.add("0");
			arg.add("0");
			arg.add(_mgr.getPlayer(playerObjId).getName());
			arg.add(Integer.toString(playerObjId));
			arg.add(_mgr.getPlayer(playerObjId).getAccountName());
			arg.add("9");
			arg.add(string3);
			arg.add(string2);
			arg.add(string);
			arg.add(string3);
			arg.add(string3);
			arg.add("0");
			arg.add("0");
			_mgr.sendPacket(new PlayerShowBoard(playerObjId, arg));
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}

Replace Generic With Diamond FastList<String> with FastList<> in method protected sendWrite(playerObjId int, html String, string String, string2 String, string3 String) : void from class com.l2jserver.communityserver.communityboard.CommunityBoard


	public static CommunityBoardManager getInstance(final int sqlDPId)
	{
		if (_instances == null)
		{
			_instances = new FastMap<>();
		}

		CommunityBoardManager mgr = _instances.get(sqlDPId);

		if (mgr == null)
		{
			mgr = new CommunityBoardManager(sqlDPId);
			_instances.put(sqlDPId, mgr);
		}

		return mgr;
	}

	public static CommunityBoardManager getInstance(final int sqlDPId)
	{
		if (_instances == null)
		{
			_instances = new FastMap<Integer, CommunityBoardManager>();
		}

		CommunityBoardManager mgr = _instances.get(sqlDPId);

		if (mgr == null)
		{
			mgr = new CommunityBoardManager(sqlDPId);
			_instances.put(sqlDPId, mgr);
		}

		return mgr;
	}

Replace Generic With Diamond FastMap<Integer,CommunityBoardManager> with FastMap<> in method public getInstance(sqlDPId int) : CommunityBoardManager from class com.l2jserver.communityserver.communityboard.CommunityBoardManager


	/**
	 * @param sqlDPId
	 * @param Forumid
	 */
	public Forum(final int sqlDPId, int Forumid)
	{
		_sqlDPId = sqlDPId;
		_forumId = Forumid;
		_topic = new FastMap<>();
	}

	/**
	 * @param sqlDPId
	 * @param Forumid
	 */
	public Forum(final int sqlDPId, int Forumid)
	{
		_sqlDPId = sqlDPId;
		_forumId = Forumid;
		_topic = new FastMap<Integer, Topic>();
	}

Replace Generic With Diamond FastMap<Integer,Topic> with FastMap<> in method public Forum(sqlDPId int, Forumid int) from class com.l2jserver.communityserver.model.Forum


	/**
	 * @param sqlDPId
	 * @param Forumid
	 * @param name
	 * @param type
	 * @param OwnerID
	 */
	public Forum(final int sqlDPId, int Forumid, String name, int type, int OwnerID)
	{
		_sqlDPId = sqlDPId;
		_forumName = name;
		_forumId = Forumid;
		_forumType = type;
		_ownerID = OwnerID;
		_topic = new FastMap<>();
		_loaded = true;
		insertindb();
		if (type == Forum.PLAYER)
		{
			_topic.put(Topic.INBOX, new Topic(ConstructorType.CREATE, _sqlDPId, Topic.INBOX, Forumid, name, OwnerID, 0));
			_topic.put(Topic.OUTBOX, new Topic(ConstructorType.CREATE, _sqlDPId, Topic.OUTBOX, Forumid, name, OwnerID, 0));
			_topic.put(Topic.ARCHIVE, new Topic(ConstructorType.CREATE, _sqlDPId, Topic.ARCHIVE, Forumid, name, OwnerID, 0));
			_topic.put(Topic.TEMP_ARCHIVE, new Topic(ConstructorType.CREATE, _sqlDPId, Topic.TEMP_ARCHIVE, Forumid, name, OwnerID, 0));
			_topic.put(Topic.MEMO, new Topic(ConstructorType.CREATE, _sqlDPId, Topic.MEMO, Forumid, name, OwnerID, 0));
		}
		else if (type == Forum.CLAN)
		{
			_topic.put(Topic.ANNOUNCE, new Topic(ConstructorType.CREATE, _sqlDPId, Topic.ANNOUNCE, Forumid, name, OwnerID, 0));
			_topic.put(Topic.BULLETIN, new Topic(ConstructorType.CREATE, _sqlDPId, Topic.BULLETIN, Forumid, name, OwnerID, 0));
		}
	}

	/**
	 * @param sqlDPId
	 * @param Forumid
	 * @param name
	 * @param type
	 * @param OwnerID
	 */
	public Forum(final int sqlDPId, int Forumid, String name, int type, int OwnerID)
	{
		_sqlDPId = sqlDPId;
		_forumName = name;
		_forumId = Forumid;
		_forumType = type;
		_ownerID = OwnerID;
		_topic = new FastMap<Integer, Topic>();
		_loaded = true;
		insertindb();
		if (type == Forum.PLAYER)
		{
			_topic.put(Topic.INBOX, new Topic(ConstructorType.CREATE, _sqlDPId, Topic.INBOX, Forumid, name, OwnerID, 0));
			_topic.put(Topic.OUTBOX, new Topic(ConstructorType.CREATE, _sqlDPId, Topic.OUTBOX, Forumid, name, OwnerID, 0));
			_topic.put(Topic.ARCHIVE, new Topic(ConstructorType.CREATE, _sqlDPId, Topic.ARCHIVE, Forumid, name, OwnerID, 0));
			_topic.put(Topic.TEMP_ARCHIVE, new Topic(ConstructorType.CREATE, _sqlDPId, Topic.TEMP_ARCHIVE, Forumid, name, OwnerID, 0));
			_topic.put(Topic.MEMO, new Topic(ConstructorType.CREATE, _sqlDPId, Topic.MEMO, Forumid, name, OwnerID, 0));
		}
		else if (type == Forum.CLAN)
		{
			_topic.put(Topic.ANNOUNCE, new Topic(ConstructorType.CREATE, _sqlDPId, Topic.ANNOUNCE, Forumid, name, OwnerID, 0));
			_topic.put(Topic.BULLETIN, new Topic(ConstructorType.CREATE, _sqlDPId, Topic.BULLETIN, Forumid, name, OwnerID, 0));
		}
	}

Replace Generic With Diamond FastMap<Integer,Topic> with FastMap<> in method public Forum(sqlDPId int, Forumid int, name String, type int, OwnerID int) from class com.l2jserver.communityserver.model.Forum


	/**
	 * @param ct
	 * @param sqlDPId
	 * @param postId
	 * @param postOwnerID
	 * @param recipentList
	 * @param date
	 * @param tid
	 * @param postForumID
	 * @param title
	 * @param txt
	 * @param type
	 * @param readCount
	 */
	public Post(ConstructorType ct, final int sqlDPId, int postId, int postOwnerID, String recipentList, long date, int tid, int postForumID, String title, String txt, int type, int readCount)
	{
		_sqlDPId = sqlDPId;
		_postId = postId;
		_postOwnerId = postOwnerID;
		_postRecipientList = recipentList;
		_postDate = date;
		_postTopicId = tid;
		_postForumId = postForumID;
		_postTitle = title;
		_postTxt = txt;
		_postType = type;
		_postParentId = -1;
		_comments = new FastMap<>();
		_readCount = readCount;
		if (ct == ConstructorType.CREATE)
		{
			insertindb();
		}
		else
		{
			loadComments();
		}
	}

	/**
	 * @param ct
	 * @param sqlDPId
	 * @param postId
	 * @param postOwnerID
	 * @param recipentList
	 * @param date
	 * @param tid
	 * @param postForumID
	 * @param title
	 * @param txt
	 * @param type
	 * @param readCount
	 */
	public Post(ConstructorType ct, final int sqlDPId, int postId, int postOwnerID, String recipentList, long date, int tid, int postForumID, String title, String txt, int type, int readCount)
	{
		_sqlDPId = sqlDPId;
		_postId = postId;
		_postOwnerId = postOwnerID;
		_postRecipientList = recipentList;
		_postDate = date;
		_postTopicId = tid;
		_postForumId = postForumID;
		_postTitle = title;
		_postTxt = txt;
		_postType = type;
		_postParentId = -1;
		_comments = new FastMap<Integer, Comment>();
		_readCount = readCount;
		if (ct == ConstructorType.CREATE)
		{
			insertindb();
		}
		else
		{
			loadComments();
		}
	}

Replace Generic With Diamond FastMap<Integer,Comment> with FastMap<> in method public Post(ct ConstructorType, sqlDPId int, postId int, postOwnerID int, recipentList String, date long, tid int, postForumID int, title String, txt String, type int, readCount int) from class com.l2jserver.communityserver.model.Post


	public Post(ConstructorType ct, final int sqlDPId, int postId, int postOwnerID, String recipentList, int postParentId, long date, int tid, int postForumID, String title, String txt, int type, int readCount)
	{
		_sqlDPId = sqlDPId;
		_postId = postId;
		_postOwnerId = postOwnerID;
		_postRecipientList = recipentList;
		_postDate = date;
		_postTopicId = tid;
		_postForumId = postForumID;
		_postTitle = title;
		_postTxt = txt;
		_postType = type;
		_postParentId = postParentId;
		_comments = new FastMap<>();
		_readCount = readCount;
		if (ct == ConstructorType.CREATE)
		{
			insertindb();
		}
		else
		{
			loadComments();
		}
	}

	public Post(ConstructorType ct, final int sqlDPId, int postId, int postOwnerID, String recipentList, int postParentId, long date, int tid, int postForumID, String title, String txt, int type, int readCount)
	{
		_sqlDPId = sqlDPId;
		_postId = postId;
		_postOwnerId = postOwnerID;
		_postRecipientList = recipentList;
		_postDate = date;
		_postTopicId = tid;
		_postForumId = postForumID;
		_postTitle = title;
		_postTxt = txt;
		_postType = type;
		_postParentId = postParentId;
		_comments = new FastMap<Integer, Comment>();
		_readCount = readCount;
		if (ct == ConstructorType.CREATE)
		{
			insertindb();
		}
		else
		{
			loadComments();
		}
	}

Replace Generic With Diamond FastMap<Integer,Comment> with FastMap<> in method public Post(ct ConstructorType, sqlDPId int, postId int, postOwnerID int, recipentList String, postParentId int, date long, tid int, postForumID int, title String, txt String, type int, readCount int) from class com.l2jserver.communityserver.model.Post


	/**
	 * @param ct
	 * @param sqlDPId
	 * @param id
	 * @param fid
	 * @param name
	 * @param oid
	 * @param per
	 */
	public Topic(ConstructorType ct, final int sqlDPId, int id, int fid, String name, int oid, int per)
	{
		_sqlDPId = sqlDPId;
		_id = id;
		_forumId = fid;
		_topicName = name;
		_ownerId = oid;
		_lastPostId = 0;
		_permissions = per;
		_posts = new FastMap<>();

		if (ct == ConstructorType.CREATE)
		{
			insertindb();
		}
		else
		{
			loadPosts();
		}
	}

	/**
	 * @param ct
	 * @param sqlDPId
	 * @param id
	 * @param fid
	 * @param name
	 * @param oid
	 * @param per
	 */
	public Topic(ConstructorType ct, final int sqlDPId, int id, int fid, String name, int oid, int per)
	{
		_sqlDPId = sqlDPId;
		_id = id;
		_forumId = fid;
		_topicName = name;
		_ownerId = oid;
		_lastPostId = 0;
		_permissions = per;
		_posts = new FastMap<Integer, Post>();

		if (ct == ConstructorType.CREATE)
		{
			insertindb();
		}
		else
		{
			loadPosts();
		}
	}

Replace Generic With Diamond FastMap<Integer,Post> with FastMap<> in method public Topic(ct ConstructorType, sqlDPId int, id int, fid int, name String, oid int, per int) from class com.l2jserver.communityserver.model.Topic


	public FastList<Post> getChildrenPosts(Post parent)
	{
		FastList<Post> ret = new FastList<>();
		if (parent == null)
		{
			return ret;
		}
		// parent post always the first
		ret.add(parent);
		for (Post p : _posts.values())
		{
			if (p.getParentId() == parent.getID())
			{
				ret.add(p);
			}
		}
		return ret;
	}

	public FastList<Post> getChildrenPosts(Post parent)
	{
		FastList<Post> ret = new FastList<Post>();
		if (parent == null)
		{
			return ret;
		}
		// parent post always the first
		ret.add(parent);
		for (Post p : _posts.values())
		{
			if (p.getParentId() == parent.getID())
			{
				ret.add(p);
			}
		}
		return ret;
	}

Replace Generic With Diamond FastList<Post> with FastList<> in method public getChildrenPosts(parent Post) : FastList<Post> from class com.l2jserver.communityserver.model.Topic


		@Override
		public Object eval(ScriptContext ctx) throws ScriptException
		{
			if (_class == null)
			{
				Map<String, byte[]> classBytesCopy = new HashMap<>();
				classBytesCopy.putAll(_classBytes);
				MemoryClassLoader loader = new MemoryClassLoader(classBytesCopy, _classPath, JavaScriptEngine.getParentLoader(ctx));
				_class = JavaScriptEngine.parseMain(loader, ctx);
			}
			return JavaScriptEngine.evalClass(_class, ctx);
		}

		@Override
		public Object eval(ScriptContext ctx) throws ScriptException
		{
			if (_class == null)
			{
				Map<String, byte[]> classBytesCopy = new HashMap<String, byte[]>();
				classBytesCopy.putAll(_classBytes);
				MemoryClassLoader loader = new MemoryClassLoader(classBytesCopy, _classPath, JavaScriptEngine.getParentLoader(ctx));
				_class = JavaScriptEngine.parseMain(loader, ctx);
			}
			return JavaScriptEngine.evalClass(_class, ctx);
		}

Replace Generic With Diamond HashMap<String,byte[]> with HashMap<> in method public eval(ctx ScriptContext) : Object from class com.l2jserver.script.java.JavaScriptEngine.JavaCompiledScript


	public Iterable<Class<?>> loadAll() throws ClassNotFoundException
	{
		List<Class<?>> classes = new ArrayList<>(classBytes.size());
		for (String name : classBytes.keySet())
		{
			classes.add(loadClass(name));
		}
		return classes;
	}

	public Iterable<Class<?>> loadAll() throws ClassNotFoundException
	{
		List<Class<?>> classes = new ArrayList<Class<?>>(classBytes.size());
		for (String name : classBytes.keySet())
		{
			classes.add(loadClass(name));
		}
		return classes;
	}

Replace Generic With Diamond ArrayList<Class<?>> with ArrayList<> in method public loadAll() : Iterable<Class<?>> from class com.l2jserver.script.java.MemoryClassLoader


	private static URL[] toURLs(String classPath)
	{
		if (classPath == null)
		{
			return new URL[0];
		}

		List<URL> list = new ArrayList<>();
		StringTokenizer st = new StringTokenizer(classPath, File.pathSeparator);
		while (st.hasMoreTokens())
		{
			String token = st.nextToken();
			File file = new File(token);
			if (file.exists())
			{
				try
				{
					list.add(file.toURI().toURL());
				}
				catch (MalformedURLException mue)
				{
					//
				}
			}
			else
			{
				try
				{
					list.add(new URL(token));
				}
				catch (MalformedURLException mue)
				{
					//
				}
			}
		}

		URL res[] = new URL[list.size()];
		list.toArray(res);
		return res;
	}

	private static URL[] toURLs(String classPath)
	{
		if (classPath == null)
		{
			return new URL[0];
		}

		List<URL> list = new ArrayList<URL>();
		StringTokenizer st = new StringTokenizer(classPath, File.pathSeparator);
		while (st.hasMoreTokens())
		{
			String token = st.nextToken();
			File file = new File(token);
			if (file.exists())
			{
				try
				{
					list.add(file.toURI().toURL());
				}
				catch (MalformedURLException mue)
				{
					//
				}
			}
			else
			{
				try
				{
					list.add(new URL(token));
				}
				catch (MalformedURLException mue)
				{
					//
				}
			}
		}

		URL res[] = new URL[list.size()];
		list.toArray(res);
		return res;
	}

Replace Generic With Diamond ArrayList<URL> with ArrayList<> in method private toURLs(classPath String) : URL[] from class com.l2jserver.script.java.MemoryClassLoader


	public MemoryJavaFileManager()
	{
		super(null, null);
		classBytes = new HashMap<>();
	}

	public MemoryJavaFileManager()
	{
		super(null, null);
		classBytes = new HashMap<String, byte[]>();
	}

Replace Generic With Diamond HashMap<String,byte[]> with HashMap<> in method public MemoryJavaFileManager() from class com.l2jserver.script.java.MemoryJavaFileManager


	public MMOConnection(final SelectorThread<T> selectorThread, final Socket socket, final SelectionKey key, boolean tcpNoDelay)
	{
		_selectorThread = selectorThread;
		_socket = socket;
		_address = socket.getInetAddress();
		_readableByteChannel = socket.getChannel();
		_writableByteChannel = socket.getChannel();
		_port = socket.getPort();
		_selectionKey = key;

		_sendQueue = new NioNetStackList<>();

		try
		{
			_socket.setTcpNoDelay(tcpNoDelay);
		}
		catch (SocketException e)
		{
			e.printStackTrace();
		}
	}

	public MMOConnection(final SelectorThread<T> selectorThread, final Socket socket, final SelectionKey key, boolean tcpNoDelay)
	{
		_selectorThread = selectorThread;
		_socket = socket;
		_address = socket.getInetAddress();
		_readableByteChannel = socket.getChannel();
		_writableByteChannel = socket.getChannel();
		_port = socket.getPort();
		_selectionKey = key;

		_sendQueue = new NioNetStackList<SendablePacket<T>>();

		try
		{
			_socket.setTcpNoDelay(tcpNoDelay);
		}
		catch (SocketException e)
		{
			e.printStackTrace();
		}
	}

Replace Generic With Diamond NioNetStackList<SendablePacket<T>> with NioNetStackList<> in method public MMOConnection(selectorThread SelectorThread<T>, socket Socket, key SelectionKey, tcpNoDelay boolean) from class org.mmocore.network.MMOConnection


	public GameServer() throws Exception
	{
		long serverLoadStart = System.currentTimeMillis();

		gameServer = this;
		_log.finest("used mem:" + getUsedMemoryMB() + "MB");

		if (Config.SERVER_VERSION != null)
		{
			_log.info("L2J Server Version:    " + Config.SERVER_VERSION);
		}
		if (Config.DATAPACK_VERSION != null)
		{
			_log.info("L2J Datapack Version:  " + Config.DATAPACK_VERSION);
		}

		_idFactory = IdFactory.getInstance();

		if (!_idFactory.isInitialized())
		{
			_log.severe("Could not read object IDs from DB. Please Check Your Data.");
			throw new Exception("Could not initialize the ID factory");
		}

		ThreadPoolManager.getInstance();

		new File(Config.DATAPACK_ROOT, "data/crests").mkdirs();
		new File("log/game").mkdirs();

		// load script engines
		printSection("Engines");
		L2ScriptEngineManager.getInstance();

		printSection("World");
		// start game time control early
		GameTimeController.getInstance();
		InstanceManager.getInstance();
		L2World.getInstance();
		MapRegionManager.getInstance();
		Announcements.getInstance();
		GlobalVariablesManager.getInstance();

		printSection("Skills");
		EffectHandler.getInstance().executeScript();
		EnchantGroupsTable.getInstance();
		SkillTreesData.getInstance();
		SkillTable.getInstance();
		SummonSkillsTable.getInstance();

		printSection("Items");
		ItemTable.getInstance();
		EnchantItemData.getInstance();
		SummonItemsData.getInstance();
		EnchantHPBonusData.getInstance();
		MerchantPriceConfigTable.getInstance().loadInstances();
		TradeController.getInstance();
		MultiSell.getInstance();
		RecipeData.getInstance();
		ArmorSetsData.getInstance();
		FishData.getInstance();
		FishingRodsData.getInstance();
		HennaData.getInstance();

		printSection("Characters");
		ClassListData.getInstance();
		InitialEquipmentData.getInstance();
		ExperienceTable.getInstance();
		HitConditionBonus.getInstance();
		CharTemplateTable.getInstance();
		CharNameTable.getInstance();
		LevelUpData.getInstance();
		AdminTable.getInstance();
		RaidBossPointsManager.getInstance();
		PetDataTable.getInstance();
		CharSummonTable.getInstance().init();

		printSection("Clans");
		ClanTable.getInstance();
		CHSiegeManager.getInstance();
		ClanHallManager.getInstance();
		AuctionManager.getInstance();

		printSection("Geodata");
		GeoData.getInstance();
		if (Config.GEODATA == 2)
			PathFinding.getInstance();

		printSection("NPCs");
		HerbDropTable.getInstance();
		NpcTable.getInstance();
		NpcWalkerRoutesData.getInstance();
		WalkingManager.getInstance();
		StaticObjects.getInstance();
		ZoneManager.getInstance();
		DoorTable.getInstance();
		ItemAuctionManager.getInstance();
		CastleManager.getInstance().loadInstances();
		FortManager.getInstance().loadInstances();
		NpcBufferTable.getInstance();
		SpawnTable.getInstance();
		HellboundManager.getInstance();
		RaidBossSpawnManager.getInstance();
		DayNightSpawnManager.getInstance().trim().notifyChangeMode();
		GrandBossManager.getInstance().initZones();
		FourSepulchersManager.getInstance().init();
		DimensionalRiftManager.getInstance();
		EventDroplist.getInstance();

		printSection("Siege");
		SiegeManager.getInstance().getSieges();
		FortSiegeManager.getInstance();
		TerritoryWarManager.getInstance();
		CastleManorManager.getInstance();
		MercTicketManager.getInstance();
		L2Manor.getInstance();

		printSection("Olympiad");
		Olympiad.getInstance();
		Hero.getInstance();

		// Call to load caches
		printSection("Cache");
		HtmCache.getInstance();
		CrestCache.getInstance();
		TeleportLocationTable.getInstance();
		UITable.getInstance();
		PartyMatchWaitingList.getInstance();
		PartyMatchRoomList.getInstance();
		PetitionManager.getInstance();
		HelperBuffTable.getInstance();
		AugmentationData.getInstance();
		CursedWeaponsManager.getInstance();

		printSection("Scripts");
		QuestManager.getInstance();
		TransformationManager.getInstance();
		BoatManager.getInstance();
		AirShipManager.getInstance();
		GraciaSeedsManager.getInstance();

		try
		{
			_log.info("Loading Server Scripts");
			File scripts = new File(Config.DATAPACK_ROOT, "data/scripts.cfg");
			if(!Config.ALT_DEV_NO_HANDLERS || !Config.ALT_DEV_NO_QUESTS)
				L2ScriptEngineManager.getInstance().executeScriptList(scripts);
		}
		catch (IOException ioe)
		{
			_log.severe("Failed loading scripts.cfg, no script going to be loaded");
		}

		QuestManager.getInstance().report();
		TransformationManager.getInstance().report();

		if (Config.SAVE_DROPPED_ITEM)
			ItemsOnGroundManager.getInstance();

		if (Config.AUTODESTROY_ITEM_AFTER > 0 || Config.HERB_AUTO_DESTROY_TIME > 0)
			ItemsAutoDestroy.getInstance();

		MonsterRace.getInstance();

		SevenSigns.getInstance().spawnSevenSignsNPC();
		SevenSignsFestival.getInstance();
		AutoSpawnHandler.getInstance();
		AutoChatHandler.getInstance();

		FaenorScriptEngine.getInstance();
		// Init of a cursed weapon manager

		_log.info("AutoChatHandler: Loaded " + AutoChatHandler.getInstance().size() + " handlers in total.");
		_log.info("AutoSpawnHandler: Loaded " + AutoSpawnHandler.getInstance().size() + " handlers in total.");

		if (Config.L2JMOD_ALLOW_WEDDING)
			CoupleManager.getInstance();

		TaskManager.getInstance();

		AntiFeedManager.getInstance().registerEvent(AntiFeedManager.GAME_ID);
		MerchantPriceConfigTable.getInstance().updateReferences();
		CastleManager.getInstance().activateInstances();
		FortManager.getInstance().activateInstances();

		if (Config.ALLOW_MAIL)
			MailManager.getInstance();

		if (Config.ACCEPT_GEOEDITOR_CONN)
			GeoEditorListener.getInstance();

		Runtime.getRuntime().addShutdownHook(Shutdown.getInstance());

		_log.info("IdFactory: Free ObjectID's remaining: " + IdFactory.getInstance().size());

		TvTManager.getInstance();
		KnownListUpdateTaskManager.getInstance();

		if ((Config.OFFLINE_TRADE_ENABLE || Config.OFFLINE_CRAFT_ENABLE) && Config.RESTORE_OFFLINERS)
			OfflineTradersTable.restoreOfflineTraders();

		if (Config.DEADLOCK_DETECTOR)
		{
			_deadDetectThread = new DeadLockDetector();
			_deadDetectThread.setDaemon(true);
			_deadDetectThread.start();
		}
		else
			_deadDetectThread = null;
		System.gc();
		// maxMemory is the upper limit the jvm can use, totalMemory the size of
		// the current allocation pool, freeMemory the unused memory in the
		// allocation pool
		long freeMem = (Runtime.getRuntime().maxMemory() - Runtime.getRuntime().totalMemory() + Runtime.getRuntime().freeMemory()) / 1048576;
		long totalMem = Runtime.getRuntime().maxMemory() / 1048576;
		_log.info("GameServer Started, free memory " + freeMem + " Mb of " + totalMem + " Mb");
		Toolkit.getDefaultToolkit().beep();

		_loginThread = LoginServerThread.getInstance();
		_loginThread.start();

		CommunityServerThread.initialize();

		final SelectorConfig sc = new SelectorConfig();
		sc.MAX_READ_PER_PASS = Config.MMO_MAX_READ_PER_PASS;
		sc.MAX_SEND_PER_PASS = Config.MMO_MAX_SEND_PER_PASS;
		sc.SLEEP_TIME = Config.MMO_SELECTOR_SLEEP_TIME;
		sc.HELPER_BUFFER_COUNT = Config.MMO_HELPER_BUFFER_COUNT;
		sc.TCP_NODELAY = Config.MMO_TCP_NODELAY;

		_gamePacketHandler = new L2GamePacketHandler();
		_selectorThread = new SelectorThread<>(sc, _gamePacketHandler, _gamePacketHandler, _gamePacketHandler, new IPv4Filter());

		InetAddress bindAddress = null;
		if (!Config.GAMESERVER_HOSTNAME.equals("*"))
		{
			try
			{
				bindAddress = InetAddress.getByName(Config.GAMESERVER_HOSTNAME);
			}
			catch (UnknownHostException e1)
			{
				_log.log(Level.SEVERE, "WARNING: The GameServer bind address is invalid, using all avaliable IPs. Reason: " + e1.getMessage(), e1);
			}
		}

		try
		{
			_selectorThread.openServerSocket(bindAddress, Config.PORT_GAME);
		}
		catch (IOException e)
		{
			_log.log(Level.SEVERE, "FATAL: Failed to open server socket. Reason: " + e.getMessage(), e);
			System.exit(1);
		}
		_selectorThread.start();
		_log.info("Maximum Numbers of Connected Players: " + Config.MAXIMUM_ONLINE_USERS);
		long serverLoadEnd = System.currentTimeMillis();
		_log.info("Server Loaded in " + ((serverLoadEnd - serverLoadStart) / 1000) + " seconds");

		AutoAnnounceTaskManager.getInstance();
	}

	public GameServer() throws Exception
	{
		long serverLoadStart = System.currentTimeMillis();

		gameServer = this;
		_log.finest("used mem:" + getUsedMemoryMB() + "MB");

		if (Config.SERVER_VERSION != null)
		{
			_log.info("L2J Server Version:    " + Config.SERVER_VERSION);
		}
		if (Config.DATAPACK_VERSION != null)
		{
			_log.info("L2J Datapack Version:  " + Config.DATAPACK_VERSION);
		}

		_idFactory = IdFactory.getInstance();

		if (!_idFactory.isInitialized())
		{
			_log.severe("Could not read object IDs from DB. Please Check Your Data.");
			throw new Exception("Could not initialize the ID factory");
		}

		ThreadPoolManager.getInstance();

		new File(Config.DATAPACK_ROOT, "data/crests").mkdirs();
		new File("log/game").mkdirs();

		// load script engines
		printSection("Engines");
		L2ScriptEngineManager.getInstance();

		printSection("World");
		// start game time control early
		GameTimeController.getInstance();
		InstanceManager.getInstance();
		L2World.getInstance();
		MapRegionManager.getInstance();
		Announcements.getInstance();
		GlobalVariablesManager.getInstance();

		printSection("Skills");
		EffectHandler.getInstance().executeScript();
		EnchantGroupsTable.getInstance();
		SkillTreesData.getInstance();
		SkillTable.getInstance();
		SummonSkillsTable.getInstance();

		printSection("Items");
		ItemTable.getInstance();
		EnchantItemData.getInstance();
		SummonItemsData.getInstance();
		EnchantHPBonusData.getInstance();
		MerchantPriceConfigTable.getInstance().loadInstances();
		TradeController.getInstance();
		MultiSell.getInstance();
		RecipeData.getInstance();
		ArmorSetsData.getInstance();
		FishData.getInstance();
		FishingRodsData.getInstance();
		HennaData.getInstance();

		printSection("Characters");
		ClassListData.getInstance();
		InitialEquipmentData.getInstance();
		ExperienceTable.getInstance();
		HitConditionBonus.getInstance();
		CharTemplateTable.getInstance();
		CharNameTable.getInstance();
		LevelUpData.getInstance();
		AdminTable.getInstance();
		RaidBossPointsManager.getInstance();
		PetDataTable.getInstance();
		CharSummonTable.getInstance().init();

		printSection("Clans");
		ClanTable.getInstance();
		CHSiegeManager.getInstance();
		ClanHallManager.getInstance();
		AuctionManager.getInstance();

		printSection("Geodata");
		GeoData.getInstance();
		if (Config.GEODATA == 2)
			PathFinding.getInstance();

		printSection("NPCs");
		HerbDropTable.getInstance();
		NpcTable.getInstance();
		NpcWalkerRoutesData.getInstance();
		WalkingManager.getInstance();
		StaticObjects.getInstance();
		ZoneManager.getInstance();
		DoorTable.getInstance();
		ItemAuctionManager.getInstance();
		CastleManager.getInstance().loadInstances();
		FortManager.getInstance().loadInstances();
		NpcBufferTable.getInstance();
		SpawnTable.getInstance();
		HellboundManager.getInstance();
		RaidBossSpawnManager.getInstance();
		DayNightSpawnManager.getInstance().trim().notifyChangeMode();
		GrandBossManager.getInstance().initZones();
		FourSepulchersManager.getInstance().init();
		DimensionalRiftManager.getInstance();
		EventDroplist.getInstance();

		printSection("Siege");
		SiegeManager.getInstance().getSieges();
		FortSiegeManager.getInstance();
		TerritoryWarManager.getInstance();
		CastleManorManager.getInstance();
		MercTicketManager.getInstance();
		L2Manor.getInstance();

		printSection("Olympiad");
		Olympiad.getInstance();
		Hero.getInstance();

		// Call to load caches
		printSection("Cache");
		HtmCache.getInstance();
		CrestCache.getInstance();
		TeleportLocationTable.getInstance();
		UITable.getInstance();
		PartyMatchWaitingList.getInstance();
		PartyMatchRoomList.getInstance();
		PetitionManager.getInstance();
		HelperBuffTable.getInstance();
		AugmentationData.getInstance();
		CursedWeaponsManager.getInstance();

		printSection("Scripts");
		QuestManager.getInstance();
		TransformationManager.getInstance();
		BoatManager.getInstance();
		AirShipManager.getInstance();
		GraciaSeedsManager.getInstance();

		try
		{
			_log.info("Loading Server Scripts");
			File scripts = new File(Config.DATAPACK_ROOT, "data/scripts.cfg");
			if(!Config.ALT_DEV_NO_HANDLERS || !Config.ALT_DEV_NO_QUESTS)
				L2ScriptEngineManager.getInstance().executeScriptList(scripts);
		}
		catch (IOException ioe)
		{
			_log.severe("Failed loading scripts.cfg, no script going to be loaded");
		}

		QuestManager.getInstance().report();
		TransformationManager.getInstance().report();

		if (Config.SAVE_DROPPED_ITEM)
			ItemsOnGroundManager.getInstance();

		if (Config.AUTODESTROY_ITEM_AFTER > 0 || Config.HERB_AUTO_DESTROY_TIME > 0)
			ItemsAutoDestroy.getInstance();

		MonsterRace.getInstance();

		SevenSigns.getInstance().spawnSevenSignsNPC();
		SevenSignsFestival.getInstance();
		AutoSpawnHandler.getInstance();
		AutoChatHandler.getInstance();

		FaenorScriptEngine.getInstance();
		// Init of a cursed weapon manager

		_log.info("AutoChatHandler: Loaded " + AutoChatHandler.getInstance().size() + " handlers in total.");
		_log.info("AutoSpawnHandler: Loaded " + AutoSpawnHandler.getInstance().size() + " handlers in total.");

		if (Config.L2JMOD_ALLOW_WEDDING)
			CoupleManager.getInstance();

		TaskManager.getInstance();

		AntiFeedManager.getInstance().registerEvent(AntiFeedManager.GAME_ID);
		MerchantPriceConfigTable.getInstance().updateReferences();
		CastleManager.getInstance().activateInstances();
		FortManager.getInstance().activateInstances();

		if (Config.ALLOW_MAIL)
			MailManager.getInstance();

		if (Config.ACCEPT_GEOEDITOR_CONN)
			GeoEditorListener.getInstance();

		Runtime.getRuntime().addShutdownHook(Shutdown.getInstance());

		_log.info("IdFactory: Free ObjectID's remaining: " + IdFactory.getInstance().size());

		TvTManager.getInstance();
		KnownListUpdateTaskManager.getInstance();

		if ((Config.OFFLINE_TRADE_ENABLE || Config.OFFLINE_CRAFT_ENABLE) && Config.RESTORE_OFFLINERS)
			OfflineTradersTable.restoreOfflineTraders();

		if (Config.DEADLOCK_DETECTOR)
		{
			_deadDetectThread = new DeadLockDetector();
			_deadDetectThread.setDaemon(true);
			_deadDetectThread.start();
		}
		else
			_deadDetectThread = null;
		System.gc();
		// maxMemory is the upper limit the jvm can use, totalMemory the size of
		// the current allocation pool, freeMemory the unused memory in the
		// allocation pool
		long freeMem = (Runtime.getRuntime().maxMemory() - Runtime.getRuntime().totalMemory() + Runtime.getRuntime().freeMemory()) / 1048576;
		long totalMem = Runtime.getRuntime().maxMemory() / 1048576;
		_log.info("GameServer Started, free memory " + freeMem + " Mb of " + totalMem + " Mb");
		Toolkit.getDefaultToolkit().beep();

		_loginThread = LoginServerThread.getInstance();
		_loginThread.start();

		CommunityServerThread.initialize();

		final SelectorConfig sc = new SelectorConfig();
		sc.MAX_READ_PER_PASS = Config.MMO_MAX_READ_PER_PASS;
		sc.MAX_SEND_PER_PASS = Config.MMO_MAX_SEND_PER_PASS;
		sc.SLEEP_TIME = Config.MMO_SELECTOR_SLEEP_TIME;
		sc.HELPER_BUFFER_COUNT = Config.MMO_HELPER_BUFFER_COUNT;
		sc.TCP_NODELAY = Config.MMO_TCP_NODELAY;

		_gamePacketHandler = new L2GamePacketHandler();
		_selectorThread = new SelectorThread<L2GameClient>(sc, _gamePacketHandler, _gamePacketHandler, _gamePacketHandler, new IPv4Filter());

		InetAddress bindAddress = null;
		if (!Config.GAMESERVER_HOSTNAME.equals("*"))
		{
			try
			{
				bindAddress = InetAddress.getByName(Config.GAMESERVER_HOSTNAME);
			}
			catch (UnknownHostException e1)
			{
				_log.log(Level.SEVERE, "WARNING: The GameServer bind address is invalid, using all avaliable IPs. Reason: " + e1.getMessage(), e1);
			}
		}

		try
		{
			_selectorThread.openServerSocket(bindAddress, Config.PORT_GAME);
		}
		catch (IOException e)
		{
			_log.log(Level.SEVERE, "FATAL: Failed to open server socket. Reason: " + e.getMessage(), e);
			System.exit(1);
		}
		_selectorThread.start();
		_log.info("Maximum Numbers of Connected Players: " + Config.MAXIMUM_ONLINE_USERS);
		long serverLoadEnd = System.currentTimeMillis();
		_log.info("Server Loaded in " + ((serverLoadEnd - serverLoadStart) / 1000) + " seconds");

		AutoAnnounceTaskManager.getInstance();
	}

Replace Generic With Diamond SelectorThread<L2GameClient> with SelectorThread<> in method public GameServer() from class com.l2jserver.gameserver.GameServer


	protected ItemsAutoDestroy()
	{
		_items = new FastList<>();
		_sleep = Config.AUTODESTROY_ITEM_AFTER * 1000;
		if (_sleep == 0) // it should not happend as it is not called when AUTODESTROY_ITEM_AFTER = 0 but we never know..
			_sleep = 3600000;
		ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new CheckItemsForDestroy(), 5000, 5000);
	}

	protected ItemsAutoDestroy()
	{
		_items = new FastList<L2ItemInstance>();
		_sleep = Config.AUTODESTROY_ITEM_AFTER * 1000;
		if (_sleep == 0) // it should not happend as it is not called when AUTODESTROY_ITEM_AFTER = 0 but we never know..
			_sleep = 3600000;
		ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new CheckItemsForDestroy(), 5000, 5000);
	}

Replace Generic With Diamond FastList<L2ItemInstance> with FastList<> in method protected ItemsAutoDestroy() from class com.l2jserver.gameserver.ItemsAutoDestroy


	protected LoginServerThread()
	{
		super("LoginServerThread");
		_port = Config.GAME_SERVER_LOGIN_PORT;
		_gamePort = Config.PORT_GAME;
		_hostname = Config.GAME_SERVER_LOGIN_HOST;
		_hexID = Config.HEX_ID;
		if (_hexID == null)
		{
			_requestID = Config.REQUEST_ID;
			_hexID = Util.generateHex(16);
		}
		else
		{
			_requestID = Config.SERVER_ID;
		}
		_acceptAlternate = Config.ACCEPT_ALTERNATE_ID;
		_reserveHost = Config.RESERVE_HOST_ON_LOGIN;
		_subnets = Config.GAME_SERVER_SUBNETS;
		_hosts = Config.GAME_SERVER_HOSTS;
		_waitingClients = new FastList<>();
		_accountsInGameServer.shared();
		_maxPlayer = Config.MAXIMUM_ONLINE_USERS;
	}

	protected LoginServerThread()
	{
		super("LoginServerThread");
		_port = Config.GAME_SERVER_LOGIN_PORT;
		_gamePort = Config.PORT_GAME;
		_hostname = Config.GAME_SERVER_LOGIN_HOST;
		_hexID = Config.HEX_ID;
		if (_hexID == null)
		{
			_requestID = Config.REQUEST_ID;
			_hexID = Util.generateHex(16);
		}
		else
		{
			_requestID = Config.SERVER_ID;
		}
		_acceptAlternate = Config.ACCEPT_ALTERNATE_ID;
		_reserveHost = Config.RESERVE_HOST_ON_LOGIN;
		_subnets = Config.GAME_SERVER_SUBNETS;
		_hosts = Config.GAME_SERVER_HOSTS;
		_waitingClients = new FastList<WaitingClient>();
		_accountsInGameServer.shared();
		_maxPlayer = Config.MAXIMUM_ONLINE_USERS;
	}

Replace Generic With Diamond FastList<WaitingClient> with FastList<> in method protected LoginServerThread() from class com.l2jserver.gameserver.LoginServerThread


	/**
	 * Restores saved festival data, basic settings from the properties file
	 * and past high score data from the database.
	 */
	protected void restoreFestivalData()
	{
		Connection con = null;
		PreparedStatement statement = null;
		ResultSet rset = null;

		if (Config.DEBUG)
			_log.info("SevenSignsFestival: Restoring festival data. Current SS Cycle: " + _signsCycle);

		try
		{
			con = L2DatabaseFactory.getInstance().getConnection();
			statement = con.prepareStatement("SELECT festivalId, cabal, cycle, date, score, members " + "FROM seven_signs_festival");
			rset = statement.executeQuery();

			while (rset.next())
			{
				int festivalCycle = rset.getInt("cycle");
				int festivalId = rset.getInt("festivalId");
				String cabal = rset.getString("cabal");

				StatsSet festivalDat = new StatsSet();
				festivalDat.set("festivalId", festivalId);
				festivalDat.set("cabal", cabal);
				festivalDat.set("cycle", festivalCycle);
				festivalDat.set("date", rset.getString("date"));
				festivalDat.set("score", rset.getInt("score"));
				festivalDat.set("members", rset.getString("members"));

				if (Config.DEBUG)
					_log.info("SevenSignsFestival: Loaded data from DB for (Cycle = " + festivalCycle + ", Oracle = " + cabal
							+ ", Festival = " + getFestivalName(festivalId));

				if (cabal.equals("dawn"))
					festivalId += FESTIVAL_COUNT;

				Map<Integer, StatsSet> tempData = _festivalData.get(festivalCycle);

				if (tempData == null)
					tempData = new FastMap<>();

				tempData.put(festivalId, festivalDat);
				_festivalData.put(festivalCycle, tempData);
			}

			rset.close();
			statement.close();

			StringBuilder query = new StringBuilder();
			query.append("SELECT festival_cycle, ");

			for (int i = 0; i < FESTIVAL_COUNT - 1; i++)
			{
				query.append("accumulated_bonus");
				query.append(String.valueOf(i));
				query.append(", ");
			}

			query.append("accumulated_bonus");
			query.append(String.valueOf(FESTIVAL_COUNT - 1));
			query.append(' ');
			query.append("FROM seven_signs_status WHERE id=0");

			statement = con.prepareStatement(query.toString());
			rset = statement.executeQuery();

			while (rset.next())
			{
				_festivalCycle = rset.getInt("festival_cycle");

				for (int i = 0; i < FESTIVAL_COUNT; i++)
					_accumulatedBonuses.add(i, rset.getInt("accumulated_bonus" + String.valueOf(i)));
			}

			rset.close();
			statement.close();

			if (Config.DEBUG)
				_log.info("SevenSignsFestival: Loaded data from database.");
		}
		catch (SQLException e)
		{
			_log.log(Level.SEVERE, "SevenSignsFestival: Failed to load configuration: " + e.getMessage(), e);
		}
		finally
		{
			L2DatabaseFactory.close(con);
		}
	}

	/**
	 * Restores saved festival data, basic settings from the properties file
	 * and past high score data from the database.
	 */
	protected void restoreFestivalData()
	{
		Connection con = null;
		PreparedStatement statement = null;
		ResultSet rset = null;

		if (Config.DEBUG)
			_log.info("SevenSignsFestival: Restoring festival data. Current SS Cycle: " + _signsCycle);

		try
		{
			con = L2DatabaseFactory.getInstance().getConnection();
			statement = con.prepareStatement("SELECT festivalId, cabal, cycle, date, score, members " + "FROM seven_signs_festival");
			rset = statement.executeQuery();

			while (rset.next())
			{
				int festivalCycle = rset.getInt("cycle");
				int festivalId = rset.getInt("festivalId");
				String cabal = rset.getString("cabal");

				StatsSet festivalDat = new StatsSet();
				festivalDat.set("festivalId", festivalId);
				festivalDat.set("cabal", cabal);
				festivalDat.set("cycle", festivalCycle);
				festivalDat.set("date", rset.getString("date"));
				festivalDat.set("score", rset.getInt("score"));
				festivalDat.set("members", rset.getString("members"));

				if (Config.DEBUG)
					_log.info("SevenSignsFestival: Loaded data from DB for (Cycle = " + festivalCycle + ", Oracle = " + cabal
							+ ", Festival = " + getFestivalName(festivalId));

				if (cabal.equals("dawn"))
					festivalId += FESTIVAL_COUNT;

				Map<Integer, StatsSet> tempData = _festivalData.get(festivalCycle);

				if (tempData == null)
					tempData = new FastMap<Integer, StatsSet>();

				tempData.put(festivalId, festivalDat);
				_festivalData.put(festivalCycle, tempData);
			}

			rset.close();
			statement.close();

			StringBuilder query = new StringBuilder();
			query.append("SELECT festival_cycle, ");

			for (int i = 0; i < FESTIVAL_COUNT - 1; i++)
			{
				query.append("accumulated_bonus");
				query.append(String.valueOf(i));
				query.append(", ");
			}

			query.append("accumulated_bonus");
			query.append(String.valueOf(FESTIVAL_COUNT - 1));
			query.append(' ');
			query.append("FROM seven_signs_status WHERE id=0");

			statement = con.prepareStatement(query.toString());
			rset = statement.executeQuery();

			while (rset.next())
			{
				_festivalCycle = rset.getInt("festival_cycle");

				for (int i = 0; i < FESTIVAL_COUNT; i++)
					_accumulatedBonuses.add(i, rset.getInt("accumulated_bonus" + String.valueOf(i)));
			}

			rset.close();
			statement.close();

			if (Config.DEBUG)
				_log.info("SevenSignsFestival: Loaded data from database.");
		}
		catch (SQLException e)
		{
			_log.log(Level.SEVERE, "SevenSignsFestival: Failed to load configuration: " + e.getMessage(), e);
		}
		finally
		{
			L2DatabaseFactory.close(con);
		}
	}

Replace Generic With Diamond FastMap<Integer,StatsSet> with FastMap<> in method protected restoreFestivalData() : void from class com.l2jserver.gameserver.SevenSignsFestival


	public void setParticipants(int oracle, int festivalId, L2Party festivalParty)
	{
		List<Integer> participants = null;

		if (festivalParty != null)
		{
			participants = new ArrayList<>(festivalParty.getMemberCount());
			for (L2PcInstance player : festivalParty.getMembers())
			{
				if (player == null)
					continue;
				participants.add(player.getObjectId());
			}

			if (Config.DEBUG)
				_log.info("SevenSignsFestival: " + festivalParty.getMembers().size() + " have signed up to the "
						+ SevenSigns.getCabalShortName(oracle) + " " + getFestivalName(festivalId) + " festival.");
		}

		if (oracle == SevenSigns.CABAL_DAWN)
			_dawnFestivalParticipants.put(festivalId, participants);
		else
			_duskFestivalParticipants.put(festivalId, participants);
	}

	public void setParticipants(int oracle, int festivalId, L2Party festivalParty)
	{
		List<Integer> participants = null;

		if (festivalParty != null)
		{
			participants = new ArrayList<Integer>(festivalParty.getMemberCount());
			for (L2PcInstance player : festivalParty.getMembers())
			{
				if (player == null)
					continue;
				participants.add(player.getObjectId());
			}

			if (Config.DEBUG)
				_log.info("SevenSignsFestival: " + festivalParty.getMembers().size() + " have signed up to the "
						+ SevenSigns.getCabalShortName(oracle) + " " + getFestivalName(festivalId) + " festival.");
		}

		if (oracle == SevenSigns.CABAL_DAWN)
			_dawnFestivalParticipants.put(festivalId, participants);
		else
			_duskFestivalParticipants.put(festivalId, participants);
	}

Replace Generic With Diamond ArrayList<Integer> with ArrayList<> in method public setParticipants(oracle int, festivalId int, festivalParty L2Party) : void from class com.l2jserver.gameserver.SevenSignsFestival