	public GeoNode[] readNeighbors(GeoNode n, int idx)
	{
		int node_x = n.getLoc().getNodeX();
		int node_y = n.getLoc().getNodeY();
		// short node_z = n.getLoc().getZ();

		short regoffset = getRegionOffset(getRegionX(node_x), getRegionY(node_y));
		ByteBuffer pn = _pathNodes.get(regoffset);

		List<AbstractNode> Neighbors = new FastList<>(8);
		GeoNode newNode;
		short new_node_x, new_node_y;

		// Region for sure will change, we must read from correct file
		byte neighbor = pn.get(idx++); // N
		if (neighbor > 0)
		{
			neighbor--;
			new_node_x = (short) node_x;
			new_node_y = (short) (node_y - 1);
			newNode = readNode(new_node_x, new_node_y, neighbor);
			if (newNode != null)
			{
				Neighbors.add(newNode);
			}
		}
		neighbor = pn.get(idx++); // NE
		if (neighbor > 0)
		{
			neighbor--;
			new_node_x = (short) (node_x + 1);
			new_node_y = (short) (node_y - 1);
			newNode = readNode(new_node_x, new_node_y, neighbor);
			if (newNode != null)
			{
				Neighbors.add(newNode);
			}
		}
		neighbor = pn.get(idx++); // E
		if (neighbor > 0)
		{
			neighbor--;
			new_node_x = (short) (node_x + 1);
			new_node_y = (short) node_y;
			newNode = readNode(new_node_x, new_node_y, neighbor);
			if (newNode != null)
			{
				Neighbors.add(newNode);
			}
		}
		neighbor = pn.get(idx++); // SE
		if (neighbor > 0)
		{
			neighbor--;
			new_node_x = (short) (node_x + 1);
			new_node_y = (short) (node_y + 1);
			newNode = readNode(new_node_x, new_node_y, neighbor);
			if (newNode != null)
			{
				Neighbors.add(newNode);
			}
		}
		neighbor = pn.get(idx++); // S
		if (neighbor > 0)
		{
			neighbor--;
			new_node_x = (short) node_x;
			new_node_y = (short) (node_y + 1);
			newNode = readNode(new_node_x, new_node_y, neighbor);
			if (newNode != null)
			{
				Neighbors.add(newNode);
			}
		}
		neighbor = pn.get(idx++); // SW
		if (neighbor > 0)
		{
			neighbor--;
			new_node_x = (short) (node_x - 1);
			new_node_y = (short) (node_y + 1);
			newNode = readNode(new_node_x, new_node_y, neighbor);
			if (newNode != null)
			{
				Neighbors.add(newNode);
			}
		}
		neighbor = pn.get(idx++); // W
		if (neighbor > 0)
		{
			neighbor--;
			new_node_x = (short) (node_x - 1);
			new_node_y = (short) node_y;
			newNode = readNode(new_node_x, new_node_y, neighbor);
			if (newNode != null)
			{
				Neighbors.add(newNode);
			}
		}
		neighbor = pn.get(idx++); // NW
		if (neighbor > 0)
		{
			neighbor--;
			new_node_x = (short) (node_x - 1);
			new_node_y = (short) (node_y - 1);
			newNode = readNode(new_node_x, new_node_y, neighbor);
			if (newNode != null)
			{
				Neighbors.add(newNode);
			}
		}
		GeoNode[] result = new GeoNode[Neighbors.size()];
		return Neighbors.toArray(result);
	}

	public GeoNode[] readNeighbors(GeoNode n, int idx)
	{
		int node_x = n.getLoc().getNodeX();
		int node_y = n.getLoc().getNodeY();
		// short node_z = n.getLoc().getZ();

		short regoffset = getRegionOffset(getRegionX(node_x), getRegionY(node_y));
		ByteBuffer pn = _pathNodes.get(regoffset);

		List<AbstractNode> Neighbors = new FastList<AbstractNode>(8);
		GeoNode newNode;
		short new_node_x, new_node_y;

		// Region for sure will change, we must read from correct file
		byte neighbor = pn.get(idx++); // N
		if (neighbor > 0)
		{
			neighbor--;
			new_node_x = (short) node_x;
			new_node_y = (short) (node_y - 1);
			newNode = readNode(new_node_x, new_node_y, neighbor);
			if (newNode != null)
			{
				Neighbors.add(newNode);
			}
		}
		neighbor = pn.get(idx++); // NE
		if (neighbor > 0)
		{
			neighbor--;
			new_node_x = (short) (node_x + 1);
			new_node_y = (short) (node_y - 1);
			newNode = readNode(new_node_x, new_node_y, neighbor);
			if (newNode != null)
			{
				Neighbors.add(newNode);
			}
		}
		neighbor = pn.get(idx++); // E
		if (neighbor > 0)
		{
			neighbor--;
			new_node_x = (short) (node_x + 1);
			new_node_y = (short) node_y;
			newNode = readNode(new_node_x, new_node_y, neighbor);
			if (newNode != null)
			{
				Neighbors.add(newNode);
			}
		}
		neighbor = pn.get(idx++); // SE
		if (neighbor > 0)
		{
			neighbor--;
			new_node_x = (short) (node_x + 1);
			new_node_y = (short) (node_y + 1);
			newNode = readNode(new_node_x, new_node_y, neighbor);
			if (newNode != null)
			{
				Neighbors.add(newNode);
			}
		}
		neighbor = pn.get(idx++); // S
		if (neighbor > 0)
		{
			neighbor--;
			new_node_x = (short) node_x;
			new_node_y = (short) (node_y + 1);
			newNode = readNode(new_node_x, new_node_y, neighbor);
			if (newNode != null)
			{
				Neighbors.add(newNode);
			}
		}
		neighbor = pn.get(idx++); // SW
		if (neighbor > 0)
		{
			neighbor--;
			new_node_x = (short) (node_x - 1);
			new_node_y = (short) (node_y + 1);
			newNode = readNode(new_node_x, new_node_y, neighbor);
			if (newNode != null)
			{
				Neighbors.add(newNode);
			}
		}
		neighbor = pn.get(idx++); // W
		if (neighbor > 0)
		{
			neighbor--;
			new_node_x = (short) (node_x - 1);
			new_node_y = (short) node_y;
			newNode = readNode(new_node_x, new_node_y, neighbor);
			if (newNode != null)
			{
				Neighbors.add(newNode);
			}
		}
		neighbor = pn.get(idx++); // NW
		if (neighbor > 0)
		{
			neighbor--;
			new_node_x = (short) (node_x - 1);
			new_node_y = (short) (node_y - 1);
			newNode = readNode(new_node_x, new_node_y, neighbor);
			if (newNode != null)
			{
				Neighbors.add(newNode);
			}
		}
		GeoNode[] result = new GeoNode[Neighbors.size()];
		return Neighbors.toArray(result);
	}

Replace Generic With Diamond FastList<AbstractNode> with FastList<> in method public readNeighbors(n GeoNode, idx int) : GeoNode[] from class com.l2jserver.gameserver.pathfinding.geonodes.GeoPathFinding


	/**
	 * Removes the death listener from this L2Character
	 * @param character
	 */
	public void removeDeathNotify(L2Character character)
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof DeathListener)
			{
				if (((DeathListener) listener).getCharacter() == character)
				{
					removeList.add(listener);
				}
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes the death listener from this L2Character
	 * @param character
	 */
	public void removeDeathNotify(L2Character character)
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof DeathListener)
			{
				if (((DeathListener) listener).getCharacter() == character)
				{
					removeList.add(listener);
				}
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeDeathNotify(character L2Character) : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes the login and logout notifications
	 */
	public void removeLoginLogoutNotify()
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if ((listener instanceof PlayerSpawnListener) || (listener instanceof PlayerDespawnListener))
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes the login and logout notifications
	 */
	public void removeLoginLogoutNotify()
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if ((listener instanceof PlayerSpawnListener) || (listener instanceof PlayerDespawnListener))
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeLoginLogoutNotify() : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes the notifications for attacks from/on this L2Character
	 * @param character
	 */
	public void removeAttackNotify(L2Character character)
	{
		if (character != null)
		{
			List<L2JListener> removeList = new ArrayList<>();
			for (L2JListener listener : _listeners)
			{
				if ((listener instanceof AttackListener) && (((AttackListener) listener).getCharacter() == character))
				{
					removeList.add(listener);
				}
			}
			removeListeners(removeList);
		}
	}

	/**
	 * Removes the notifications for attacks from/on this L2Character
	 * @param character
	 */
	public void removeAttackNotify(L2Character character)
	{
		if (character != null)
		{
			List<L2JListener> removeList = new ArrayList<L2JListener>();
			for (L2JListener listener : _listeners)
			{
				if ((listener instanceof AttackListener) && (((AttackListener) listener).getCharacter() == character))
				{
					removeList.add(listener);
				}
			}
			removeListeners(removeList);
		}
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeAttackNotify(character L2Character) : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes a skill use listener
	 * @param character
	 */
	public void removeSkillUseNotify(L2Character character)
	{
		if (character != null)
		{
			List<L2JListener> removeList = new ArrayList<>();
			for (L2JListener listener : _listeners)
			{
				if ((listener instanceof SkillUseListener) && (((SkillUseListener) listener).getCharacter() == character))
				{
					removeList.add(listener);
				}
			}
			removeListeners(removeList);
		}
	}

	/**
	 * Removes a skill use listener
	 * @param character
	 */
	public void removeSkillUseNotify(L2Character character)
	{
		if (character != null)
		{
			List<L2JListener> removeList = new ArrayList<L2JListener>();
			for (L2JListener listener : _listeners)
			{
				if ((listener instanceof SkillUseListener) && (((SkillUseListener) listener).getCharacter() == character))
				{
					removeList.add(listener);
				}
			}
			removeListeners(removeList);
		}
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeSkillUseNotify(character L2Character) : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes a skill use listener
	 * @param npcId
	 */
	public void removeSkillUseNotify(int npcId)
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if ((listener instanceof SkillUseListener) && (((SkillUseListener) listener).getNpcId() == npcId))
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes a skill use listener
	 * @param npcId
	 */
	public void removeSkillUseNotify(int npcId)
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if ((listener instanceof SkillUseListener) && (((SkillUseListener) listener).getNpcId() == npcId))
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeSkillUseNotify(npcId int) : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes the clan creation and level up notifications
	 */
	public void removeClanCreationLevelUpNotify()
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof ClanCreationListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes the clan creation and level up notifications
	 */
	public void removeClanCreationLevelUpNotify()
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof ClanCreationListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeClanCreationLevelUpNotify() : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes the notification for players joining and leaving a clan as well as clan leadership changes
	 */
	public void removeClanJoinLeaveNotify()
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof ClanMembershipListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes the notification for players joining and leaving a clan as well as clan leadership changes
	 */
	public void removeClanJoinLeaveNotify()
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof ClanMembershipListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeClanJoinLeaveNotify() : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes a clan warehouse notifier
	 * @param clan
	 */
	public void removeClanWarehouseNotify(L2Clan clan)
	{
		if (clan != null)
		{
			List<L2JListener> removeList = new ArrayList<>();
			for (L2JListener listener : _listeners)
			{
				if ((listener instanceof ClanWarehouseListener) && (((ClanWarehouseListener) listener).getWarehouse() == clan.getWarehouse()))
				{
					removeList.add(listener);
				}
			}
			removeListeners(removeList);
		}
	}

	/**
	 * Removes a clan warehouse notifier
	 * @param clan
	 */
	public void removeClanWarehouseNotify(L2Clan clan)
	{
		if (clan != null)
		{
			List<L2JListener> removeList = new ArrayList<L2JListener>();
			for (L2JListener listener : _listeners)
			{
				if ((listener instanceof ClanWarehouseListener) && (((ClanWarehouseListener) listener).getWarehouse() == clan.getWarehouse()))
				{
					removeList.add(listener);
				}
			}
			removeListeners(removeList);
		}
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeClanWarehouseNotify(clan L2Clan) : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes the notification for start/end of clan wars
	 */
	public void removeClanWarNotify()
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof ClanWarListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes the notification for start/end of clan wars
	 */
	public void removeClanWarNotify()
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof ClanWarListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeClanWarNotify() : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes the notification for fort sieges
	 */
	public void removeFortSiegeNotify()
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof FortSiegeListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes the notification for fort sieges
	 */
	public void removeFortSiegeNotify()
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof FortSiegeListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeFortSiegeNotify() : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes notification for castle sieges
	 */
	public void removeSiegeNotify()
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof SiegeListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes notification for castle sieges
	 */
	public void removeSiegeNotify()
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof SiegeListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeSiegeNotify() : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes the TvT notifications
	 */
	public void removeTvtNotify()
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof TvTListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes the TvT notifications
	 */
	public void removeTvtNotify()
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof TvTListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeTvtNotify() : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes the item augmentation listener
	 */
	public void removeItemAugmentNotify()
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof AugmentListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes the item augmentation listener
	 */
	public void removeItemAugmentNotify()
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof AugmentListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeItemAugmentNotify() : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes the item drop and pickup listeners
	 */
	public void removeItemDropPickupNotify()
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof DropListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes the item drop and pickup listeners
	 */
	public void removeItemDropPickupNotify()
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof DropListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeItemDropPickupNotify() : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes the player level notification for the given player<br>
	 * Removes all global notifications if player = null
	 * @param player
	 */
	public void removePlayerLevelNotify(L2PcInstance player)
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if ((listener instanceof PlayerLevelListener) && (listener.getPlayer() == player))
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes the player level notification for the given player<br>
	 * Removes all global notifications if player = null
	 * @param player
	 */
	public void removePlayerLevelNotify(L2PcInstance player)
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if ((listener instanceof PlayerLevelListener) && (listener.getPlayer() == player))
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removePlayerLevelNotify(player L2PcInstance) : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes the profession change notification for the given player<br>
	 * Removes all global notifications if player = null
	 * @param player
	 */
	public void removeProfessionChangeNotify(L2PcInstance player)
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if ((listener instanceof ProfessionChangeListener) && (listener.getPlayer() == player))
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes the profession change notification for the given player<br>
	 * Removes all global notifications if player = null
	 * @param player
	 */
	public void removeProfessionChangeNotify(L2PcInstance player)
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if ((listener instanceof ProfessionChangeListener) && (listener.getPlayer() == player))
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeProfessionChangeNotify(player L2PcInstance) : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes an equip/unequip listener<br>
	 * Set player to null if you wish to remove a global listener
	 * @param player
	 */
	public void removeEquipmentNotify(L2PcInstance player)
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if ((listener instanceof EquipmentListener) && (((EquipmentListener) listener).getPlayer() == player))
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes an equip/unequip listener<br>
	 * Set player to null if you wish to remove a global listener
	 * @param player
	 */
	public void removeEquipmentNotify(L2PcInstance player)
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if ((listener instanceof EquipmentListener) && (((EquipmentListener) listener).getPlayer() == player))
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeEquipmentNotify(player L2PcInstance) : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes the henna add/remove notifier
	 */
	public void removeHennaNotify()
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof HennaListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes the henna add/remove notifier
	 */
	public void removeHennaNotify()
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof HennaListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeHennaNotify() : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes all the item trackers
	 */
	public void removeItemTrackers()
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof ItemTracker)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes all the item trackers
	 */
	public void removeItemTrackers()
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof ItemTracker)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeItemTrackers() : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes all new items notifiers
	 */
	public void removeNewItemNotify()
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof NewItemListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes all new items notifiers
	 */
	public void removeNewItemNotify()
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof NewItemListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeNewItemNotify() : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes a player transform notifier
	 * @param player
	 */
	public void removeTransformNotify(L2PcInstance player)
	{
		if (player != null)
		{
			List<L2JListener> removeList = new ArrayList<>();
			for (L2JListener listener : _listeners)
			{
				if ((listener instanceof TransformListener) && (listener.getPlayer() == player))
				{
					removeList.add(listener);
				}
			}
			removeListeners(removeList);
		}
	}

	/**
	 * Removes a player transform notifier
	 * @param player
	 */
	public void removeTransformNotify(L2PcInstance player)
	{
		if (player != null)
		{
			List<L2JListener> removeList = new ArrayList<L2JListener>();
			for (L2JListener listener : _listeners)
			{
				if ((listener instanceof TransformListener) && (listener.getPlayer() == player))
				{
					removeList.add(listener);
				}
			}
			removeListeners(removeList);
		}
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removeTransformNotify(player L2PcInstance) : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes a chat filter
	 */
	public void removePlayerChatFilter()
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof ChatFilterListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes a chat filter
	 */
	public void removePlayerChatFilter()
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof ChatFilterListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removePlayerChatFilter() : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Removes all player chat notifiers
	 */
	public void removePlayerTalkNotify()
	{
		List<L2JListener> removeList = new ArrayList<>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof ChatListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

	/**
	 * Removes all player chat notifiers
	 */
	public void removePlayerTalkNotify()
	{
		List<L2JListener> removeList = new ArrayList<L2JListener>();
		for (L2JListener listener : _listeners)
		{
			if (listener instanceof ChatListener)
			{
				removeList.add(listener);
			}
		}
		removeListeners(removeList);
	}

Replace Generic With Diamond ArrayList<L2JListener> with ArrayList<> in method public removePlayerTalkNotify() : void from class com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script


	/**
	 * Default constructor use ArrayList as it internal
	 */
	public L2SyncList()
	{
		_list = new ArrayList<>();
	}

	/**
	 * Default constructor use ArrayList as it internal
	 */
	public L2SyncList()
	{
		_list = new ArrayList<T>();
	}

Replace Generic With Diamond ArrayList<T> with ArrayList<> in method public L2SyncList() from class com.l2jserver.gameserver.util.L2SyncList


	@Override
	public List<T> subList(int fromIndex, int toIndex)
	{
		_rl.lock();
		try
		{
			return new L2SyncList<>(_list.subList(fromIndex, toIndex));
		}
		finally
		{
			_rl.unlock();
		}
	}

	@Override
	public List<T> subList(int fromIndex, int toIndex)
	{
		_rl.lock();
		try
		{
			return new L2SyncList<T>(_list.subList(fromIndex, toIndex));
		}
		finally
		{
			_rl.unlock();
		}
	}

Replace Generic With Diamond L2SyncList<T> with L2SyncList<> in method public subList(fromIndex int, toIndex int) : List<T> from class com.l2jserver.gameserver.util.L2SyncList


	public final int lazyCountSpawnedMinionsGroups()
	{
		Set<Integer> seenGroups = new FastSet<>();
		for (L2MonsterInstance minion : _minionReferences)
		{
			if (minion == null)
			{
				continue;
			}

			seenGroups.add(minion.getNpcId());
		}
		return seenGroups.size();
	}

	public final int lazyCountSpawnedMinionsGroups()
	{
		Set<Integer> seenGroups = new FastSet<Integer>();
		for (L2MonsterInstance minion : _minionReferences)
		{
			if (minion == null)
			{
				continue;
			}

			seenGroups.add(minion.getNpcId());
		}
		return seenGroups.size();
	}

Replace Generic With Diamond FastSet<Integer> with FastSet<> in method public lazyCountSpawnedMinionsGroups() : int from class com.l2jserver.gameserver.util.MinionList


	public final List<?> getKeys()
	{
		if (_keyList == null)
		{
			return new FastList<>();
		}

		return _keyList;
	}

	public final List<?> getKeys()
	{
		if (_keyList == null)
		{
			return new FastList<Object>();
		}

		return _keyList;
	}

Replace Generic With Diamond FastList<Object> with FastList<> in method public getKeys() : List<?> from class com.l2jserver.gameserver.util.MultiSort


	public final double getStandardDeviation()
	{
		if (getValues().isEmpty())
		{
			return -1;
		}

		List<Double> tempValList = new FastList<>();

		int meanValue = getMean();
		int numValues = getCount();

		for (int value : getValues())
		{
			double adjValue = Math.pow(value - meanValue, 2);
			tempValList.add(adjValue);
		}

		double totalValue = 0;

		for (double storedVal : tempValList)
		{
			totalValue += storedVal;
		}

		return Math.sqrt(totalValue / (numValues - 1));
	}

	public final double getStandardDeviation()
	{
		if (getValues().isEmpty())
		{
			return -1;
		}

		List<Double> tempValList = new FastList<Double>();

		int meanValue = getMean();
		int numValues = getCount();

		for (int value : getValues())
		{
			double adjValue = Math.pow(value - meanValue, 2);
			tempValList.add(adjValue);
		}

		double totalValue = 0;

		for (double storedVal : tempValList)
		{
			totalValue += storedVal;
		}

		return Math.sqrt(totalValue / (numValues - 1));
	}

Replace Generic With Diamond FastList<Double> with FastList<> in method public getStandardDeviation() : double from class com.l2jserver.gameserver.util.MultiSort


	public final List<Integer> getValues()
	{
		if (_valueList == null)
		{
			return new FastList<>();
		}

		return _valueList;
	}

	public final List<Integer> getValues()
	{
		if (_valueList == null)
		{
			return new FastList<Integer>();
		}

		return _valueList;
	}

Replace Generic With Diamond FastList<Integer> with FastList<> in method public getValues() : List<Integer> from class com.l2jserver.gameserver.util.MultiSort


	public L2LoginServer()
	{
		Server.serverMode = Server.MODE_LOGINSERVER;
		// Local Constants
		final String LOG_FOLDER = "log"; // Name of folder for log file
		final String LOG_NAME = "./log.cfg"; // Name of log file

		/*** Main ***/
		// Create log folder
		File logFolder = new File(Config.DATAPACK_ROOT, LOG_FOLDER);
		logFolder.mkdir();

		// Create input stream for log file -- or store file data into memory

		try (InputStream is = new FileInputStream(new File(LOG_NAME)))
		{
			LogManager.getLogManager().readConfiguration(is);
		}
		catch (IOException e)
		{
			_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
		}

		// Load Config
		Config.load();

		// Prepare Database
		try
		{
			L2DatabaseFactory.getInstance();
		}
		catch (SQLException e)
		{
			_log.log(Level.SEVERE, "FATAL: Failed initializing database. Reason: " + e.getMessage(), e);
			System.exit(1);
		}

		try
		{
			LoginController.load();
		}
		catch (GeneralSecurityException e)
		{
			_log.log(Level.SEVERE, "FATAL: Failed initializing LoginController. Reason: " + e.getMessage(), e);
			System.exit(1);
		}

		GameServerTable.getInstance();

		loadBanFile();

		if (Config.EMAIL_SYS_ENABLED)
		{
			MailSystem.getInstance();
		}

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

		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;

		final L2LoginPacketHandler lph = new L2LoginPacketHandler();
		final SelectorHelper sh = new SelectorHelper();
		try
		{
			_selectorThread = new SelectorThread<>(sc, sh, lph, sh, sh);
		}
		catch (IOException e)
		{
			_log.log(Level.SEVERE, "FATAL: Failed to open Selector. Reason: " + e.getMessage(), e);
			System.exit(1);
		}

		try
		{
			_gameServerListener = new GameServerListener();
			_gameServerListener.start();
			_log.info("Listening for GameServers on " + Config.GAME_SERVER_LOGIN_HOST + ":" + Config.GAME_SERVER_LOGIN_PORT);
		}
		catch (IOException e)
		{
			_log.log(Level.SEVERE, "FATAL: Failed to start the Game Server Listener. Reason: " + e.getMessage(), e);
			System.exit(1);
		}

		if (Config.IS_TELNET_ENABLED)
		{
			try
			{
				_statusServer = new Status(Server.serverMode);
				_statusServer.start();
			}
			catch (IOException e)
			{
				_log.log(Level.WARNING, "Failed to start the Telnet Server. Reason: " + e.getMessage(), e);
			}
		}
		else
		{
			_log.info("Telnet server is currently disabled.");
		}

		try
		{
			_selectorThread.openServerSocket(bindAddress, Config.PORT_LOGIN);
		}
		catch (IOException e)
		{
			_log.log(Level.SEVERE, "FATAL: Failed to open server socket. Reason: " + e.getMessage(), e);
			System.exit(1);
		}
		_selectorThread.start();

		_log.info("Login Server ready on " + (bindAddress == null ? "*" : bindAddress.getHostAddress()) + ":" + Config.PORT_LOGIN);
	}

	public L2LoginServer()
	{
		Server.serverMode = Server.MODE_LOGINSERVER;
		// Local Constants
		final String LOG_FOLDER = "log"; // Name of folder for log file
		final String LOG_NAME = "./log.cfg"; // Name of log file

		/*** Main ***/
		// Create log folder
		File logFolder = new File(Config.DATAPACK_ROOT, LOG_FOLDER);
		logFolder.mkdir();

		// Create input stream for log file -- or store file data into memory

		try (InputStream is = new FileInputStream(new File(LOG_NAME)))
		{
			LogManager.getLogManager().readConfiguration(is);
		}
		catch (IOException e)
		{
			_log.warning(getClass().getSimpleName() + ": " + e.getMessage());
		}

		// Load Config
		Config.load();

		// Prepare Database
		try
		{
			L2DatabaseFactory.getInstance();
		}
		catch (SQLException e)
		{
			_log.log(Level.SEVERE, "FATAL: Failed initializing database. Reason: " + e.getMessage(), e);
			System.exit(1);
		}

		try
		{
			LoginController.load();
		}
		catch (GeneralSecurityException e)
		{
			_log.log(Level.SEVERE, "FATAL: Failed initializing LoginController. Reason: " + e.getMessage(), e);
			System.exit(1);
		}

		GameServerTable.getInstance();

		loadBanFile();

		if (Config.EMAIL_SYS_ENABLED)
		{
			MailSystem.getInstance();
		}

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

		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;

		final L2LoginPacketHandler lph = new L2LoginPacketHandler();
		final SelectorHelper sh = new SelectorHelper();
		try
		{
			_selectorThread = new SelectorThread<L2LoginClient>(sc, sh, lph, sh, sh);
		}
		catch (IOException e)
		{
			_log.log(Level.SEVERE, "FATAL: Failed to open Selector. Reason: " + e.getMessage(), e);
			System.exit(1);
		}

		try
		{
			_gameServerListener = new GameServerListener();
			_gameServerListener.start();
			_log.info("Listening for GameServers on " + Config.GAME_SERVER_LOGIN_HOST + ":" + Config.GAME_SERVER_LOGIN_PORT);
		}
		catch (IOException e)
		{
			_log.log(Level.SEVERE, "FATAL: Failed to start the Game Server Listener. Reason: " + e.getMessage(), e);
			System.exit(1);
		}

		if (Config.IS_TELNET_ENABLED)
		{
			try
			{
				_statusServer = new Status(Server.serverMode);
				_statusServer.start();
			}
			catch (IOException e)
			{
				_log.log(Level.WARNING, "Failed to start the Telnet Server. Reason: " + e.getMessage(), e);
			}
		}
		else
		{
			_log.info("Telnet server is currently disabled.");
		}

		try
		{
			_selectorThread.openServerSocket(bindAddress, Config.PORT_LOGIN);
		}
		catch (IOException e)
		{
			_log.log(Level.SEVERE, "FATAL: Failed to open server socket. Reason: " + e.getMessage(), e);
			System.exit(1);
		}
		_selectorThread.start();

		_log.info("Login Server ready on " + (bindAddress == null ? "*" : bindAddress.getHostAddress()) + ":" + Config.PORT_LOGIN);
	}

Replace Generic With Diamond SelectorThread<L2LoginClient> with SelectorThread<> in method public L2LoginServer() from class com.l2jserver.loginserver.L2LoginServer


	private LoginController() throws GeneralSecurityException
	{
		_log.info("Loading LoginController...");

		_hackProtection = new FastMap<>();

		_keyPairs = new ScrambledKeyPair[10];

		KeyPairGenerator keygen = null;

		keygen = KeyPairGenerator.getInstance("RSA");
		RSAKeyGenParameterSpec spec = new RSAKeyGenParameterSpec(1024, RSAKeyGenParameterSpec.F4);
		keygen.initialize(spec);

		// generate the initial set of keys
		for (int i = 0; i < 10; i++)
		{
			_keyPairs[i] = new ScrambledKeyPair(keygen.generateKeyPair());
		}
		_log.info("Cached 10 KeyPairs for RSA communication");

		testCipher((RSAPrivateKey) _keyPairs[0]._pair.getPrivate());

		// Store keys for blowfish communication
		generateBlowFishKeys();

		_purge = new PurgeThread();
		_purge.setDaemon(true);
		_purge.start();
	}

	private LoginController() throws GeneralSecurityException
	{
		_log.info("Loading LoginController...");

		_hackProtection = new FastMap<InetAddress, FailedLoginAttempt>();

		_keyPairs = new ScrambledKeyPair[10];

		KeyPairGenerator keygen = null;

		keygen = KeyPairGenerator.getInstance("RSA");
		RSAKeyGenParameterSpec spec = new RSAKeyGenParameterSpec(1024, RSAKeyGenParameterSpec.F4);
		keygen.initialize(spec);

		// generate the initial set of keys
		for (int i = 0; i < 10; i++)
		{
			_keyPairs[i] = new ScrambledKeyPair(keygen.generateKeyPair());
		}
		_log.info("Cached 10 KeyPairs for RSA communication");

		testCipher((RSAPrivateKey) _keyPairs[0]._pair.getPrivate());

		// Store keys for blowfish communication
		generateBlowFishKeys();

		_purge = new PurgeThread();
		_purge.setDaemon(true);
		_purge.start();
	}

Replace Generic With Diamond FastMap<InetAddress,FailedLoginAttempt> with FastMap<> in method private LoginController() from class com.l2jserver.loginserver.LoginController


	public void setCharsOnServ(int servId, int chars)
	{
		if (_charsOnServers == null)
		{
			_charsOnServers = new HashMap<>();
		}
		_charsOnServers.put(servId, chars);
	}

	public void setCharsOnServ(int servId, int chars)
	{
		if (_charsOnServers == null)
		{
			_charsOnServers = new HashMap<Integer, Integer>();
		}
		_charsOnServers.put(servId, chars);
	}

Replace Generic With Diamond HashMap<Integer,Integer> with HashMap<> in method public setCharsOnServ(servId int, chars int) : void from class com.l2jserver.loginserver.network.L2LoginClient


	public void serCharsWaitingDelOnServ(int servId, long[] charsToDel)
	{
		if (_charsToDelete == null)
		{
			_charsToDelete = new HashMap<>();
		}
		_charsToDelete.put(servId, charsToDel);
	}

	public void serCharsWaitingDelOnServ(int servId, long[] charsToDel)
	{
		if (_charsToDelete == null)
		{
			_charsToDelete = new HashMap<Integer, long[]>();
		}
		_charsToDelete.put(servId, charsToDel);
	}

Replace Generic With Diamond HashMap<Integer,long[]> with HashMap<> in method public serCharsWaitingDelOnServ(servId int, charsToDel long[]) : void from class com.l2jserver.loginserver.network.L2LoginClient


	public ServerList(L2LoginClient client)
	{
		_servers = new ArrayList<>(GameServerTable.getInstance().getRegisteredGameServers().size());
		_lastServer = client.getLastServer();
		for (GameServerInfo gsi : GameServerTable.getInstance().getRegisteredGameServers().values())
		{
			_servers.add(new ServerData(client, gsi));
		}
		_charsOnServers = client.getCharsOnServ();
		_charsToDelete = client.getCharsWaitingDelOnServ();
	}

	public ServerList(L2LoginClient client)
	{
		_servers = new ArrayList<ServerData>(GameServerTable.getInstance().getRegisteredGameServers().size());
		_lastServer = client.getLastServer();
		for (GameServerInfo gsi : GameServerTable.getInstance().getRegisteredGameServers().values())
		{
			_servers.add(new ServerData(client, gsi));
		}
		_charsOnServers = client.getCharsOnServ();
		_charsToDelete = client.getCharsWaitingDelOnServ();
	}

Replace Generic With Diamond ArrayList<ServerData> with ArrayList<> in method public ServerList(client L2LoginClient) from class com.l2jserver.loginserver.network.serverpackets.ServerList


	public Status(int mode) throws IOException
	{
		super("Status");
		_mode = mode;
		Properties telnetSettings = new Properties();
		InputStream is = new FileInputStream(new File(Config.TELNET_FILE));
		telnetSettings.load(is);
		is.close();

		_statusPort = Integer.parseInt(telnetSettings.getProperty("StatusPort", "12345"));
		_statusPw = telnetSettings.getProperty("StatusPW");

		if ((_mode == Server.MODE_GAMESERVER) || (_mode == Server.MODE_LOGINSERVER))
		{
			if (_statusPw == null)
			{
				_log.info("Server's Telnet Function Has No Password Defined!");
				_log.info("A Password Has Been Automaticly Created!");
				_statusPw = rndPW(10);
				_log.info("Password Has Been Set To: " + _statusPw);
			}
			_log.info("Telnet StatusServer started successfully, listening on Port: " + _statusPort);
		}
		statusServerSocket = new ServerSocket(_statusPort);
		_uptime = (int) System.currentTimeMillis();
		_loginStatus = new FastList<>();
	}

	public Status(int mode) throws IOException
	{
		super("Status");
		_mode = mode;
		Properties telnetSettings = new Properties();
		InputStream is = new FileInputStream(new File(Config.TELNET_FILE));
		telnetSettings.load(is);
		is.close();

		_statusPort = Integer.parseInt(telnetSettings.getProperty("StatusPort", "12345"));
		_statusPw = telnetSettings.getProperty("StatusPW");

		if ((_mode == Server.MODE_GAMESERVER) || (_mode == Server.MODE_LOGINSERVER))
		{
			if (_statusPw == null)
			{
				_log.info("Server's Telnet Function Has No Password Defined!");
				_log.info("A Password Has Been Automaticly Created!");
				_statusPw = rndPW(10);
				_log.info("Password Has Been Set To: " + _statusPw);
			}
			_log.info("Telnet StatusServer started successfully, listening on Port: " + _statusPort);
		}
		statusServerSocket = new ServerSocket(_statusPort);
		_uptime = (int) System.currentTimeMillis();
		_loginStatus = new FastList<LoginStatusThread>();
	}

Replace Generic With Diamond FastList<LoginStatusThread> with FastList<> in method public Status(mode int) from class com.l2jserver.status.Status


	@Override
	public void addFocusListener(FocusListener fl)
	{
		if (_focusListeners == null)
		{
			_focusListeners = new LinkedList<>();
		}

		if ((fl != null) && !_focusListeners.contains(fl))
		{
			_focusListeners.add(fl);
		}
	}

	@Override
	public void addFocusListener(FocusListener fl)
	{
		if (_focusListeners == null)
		{
			_focusListeners = new LinkedList<FocusListener>();
		}

		if ((fl != null) && !_focusListeners.contains(fl))
		{
			_focusListeners.add(fl);
		}
	}

Replace Generic With Diamond LinkedList<FocusListener> with LinkedList<> in method public addFocusListener(fl FocusListener) : void from class com.l2jserver.tools.configurator.JIPTextField


	public void createDump()
	{
		try
		{
			Connection con = _frame.getConnection();
			Formatter form = new Formatter();
			PreparedStatement stmt = con.prepareStatement("SHOW TABLES");
			ResultSet rset = stmt.executeQuery();
			File dump = new File("dumps", form.format("%1$s_dump_%2$tY%2$tm%2$td-%2$tH%2$tM%2$tS.sql", _db, new GregorianCalendar().getTime()).toString());
			new File("dumps").mkdir();
			dump.createNewFile();

			_frame.appendToProgressArea("Writing dump " + dump.getName());
			if (rset.last())
			{
				int rows = rset.getRow();
				rset.beforeFirst();
				if (rows > 0)
				{
					_frame.setProgressIndeterminate(false);
					_frame.setProgressMaximum(rows);
				}
			}

			FileWriterStdout ps = new FileWriterStdout(dump);
			while (rset.next())
			{
				_frame.setProgressValue(rset.getRow());
				_frame.appendToProgressArea("Dumping Table " + rset.getString(1));
				ps.println("CREATE TABLE `" + rset.getString(1) + "`");
				ps.println("(");
				PreparedStatement desc = con.prepareStatement("DESC " + rset.getString(1));
				ResultSet dset = desc.executeQuery();
				Map<String, List<String>> keys = new HashMap<>();
				boolean isFirst = true;
				while (dset.next())
				{
					if (!isFirst)
					{
						ps.println(",");
					}
					ps.print("\t`" + dset.getString(1) + "`");
					ps.print(" " + dset.getString(2));
					if (dset.getString(3).equals("NO"))
					{
						ps.print(" NOT NULL");
					}
					if (!dset.getString(4).isEmpty())
					{
						if (!keys.containsKey(dset.getString(4)))
						{
							keys.put(dset.getString(4), new ArrayList<String>());
						}
						keys.get(dset.getString(4)).add(dset.getString(1));
					}
					if (dset.getString(5) != null)
					{
						ps.print(" DEFAULT '" + dset.getString(5) + "'");
					}
					if (!dset.getString(6).isEmpty())
					{
						ps.print(" " + dset.getString(6));
					}
					isFirst = false;
				}
				if (keys.containsKey("PRI"))
				{
					ps.println(",");
					ps.print("\tPRIMARY KEY (");
					isFirst = true;
					for (String key : keys.get("PRI"))
					{
						if (!isFirst)
						{
							ps.print(", ");
						}
						ps.print("`" + key + "`");
						isFirst = false;
					}
					ps.print(")");
				}
				if (keys.containsKey("MUL"))
				{
					ps.println(",");
					isFirst = true;
					for (String key : keys.get("MUL"))
					{
						if (!isFirst)
						{
							ps.println(", ");
						}
						ps.print("\tKEY `key_" + key + "` (`" + key + "`)");
						isFirst = false;
					}
				}
				ps.println();
				ps.println(");");
				ps.flush();
				dset.close();
				desc.close();

				desc = con.prepareStatement("SELECT * FROM " + rset.getString(1));
				dset = desc.executeQuery();
				isFirst = true;
				int cnt = 0;
				while (dset.next())
				{
					if ((cnt % 100) == 0)
					{
						ps.println("INSERT INTO `" + rset.getString(1) + "` VALUES ");
					}
					else
					{
						ps.println(",");
					}

					ps.print("\t(");
					boolean isInFirst = true;
					for (int i = 1; i <= dset.getMetaData().getColumnCount(); i++)
					{
						if (!isInFirst)
						{
							ps.print(", ");
						}

						if (dset.getString(i) == null)
						{
							ps.print("NULL");
						}
						else
						{
							ps.print("'" + dset.getString(i).replace("\'", "\\\'") + "'");
						}
						isInFirst = false;
					}
					ps.print(")");
					isFirst = false;

					if ((cnt % 100) == 99)
					{
						ps.println(";");
					}
					cnt++;
				}
				if (!isFirst && ((cnt % 100) != 0))
				{
					ps.println(";");
				}
				ps.println();
				ps.flush();
				dset.close();
				desc.close();
			}
			rset.close();
			stmt.close();
			ps.flush();
			ps.close();
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
		_frame.appendToProgressArea("Dump Complete!");
	}

	public void createDump()
	{
		try
		{
			Connection con = _frame.getConnection();
			Formatter form = new Formatter();
			PreparedStatement stmt = con.prepareStatement("SHOW TABLES");
			ResultSet rset = stmt.executeQuery();
			File dump = new File("dumps", form.format("%1$s_dump_%2$tY%2$tm%2$td-%2$tH%2$tM%2$tS.sql", _db, new GregorianCalendar().getTime()).toString());
			new File("dumps").mkdir();
			dump.createNewFile();

			_frame.appendToProgressArea("Writing dump " + dump.getName());
			if (rset.last())
			{
				int rows = rset.getRow();
				rset.beforeFirst();
				if (rows > 0)
				{
					_frame.setProgressIndeterminate(false);
					_frame.setProgressMaximum(rows);
				}
			}

			FileWriterStdout ps = new FileWriterStdout(dump);
			while (rset.next())
			{
				_frame.setProgressValue(rset.getRow());
				_frame.appendToProgressArea("Dumping Table " + rset.getString(1));
				ps.println("CREATE TABLE `" + rset.getString(1) + "`");
				ps.println("(");
				PreparedStatement desc = con.prepareStatement("DESC " + rset.getString(1));
				ResultSet dset = desc.executeQuery();
				Map<String, List<String>> keys = new HashMap<String, List<String>>();
				boolean isFirst = true;
				while (dset.next())
				{
					if (!isFirst)
					{
						ps.println(",");
					}
					ps.print("\t`" + dset.getString(1) + "`");
					ps.print(" " + dset.getString(2));
					if (dset.getString(3).equals("NO"))
					{
						ps.print(" NOT NULL");
					}
					if (!dset.getString(4).isEmpty())
					{
						if (!keys.containsKey(dset.getString(4)))
						{
							keys.put(dset.getString(4), new ArrayList<String>());
						}
						keys.get(dset.getString(4)).add(dset.getString(1));
					}
					if (dset.getString(5) != null)
					{
						ps.print(" DEFAULT '" + dset.getString(5) + "'");
					}
					if (!dset.getString(6).isEmpty())
					{
						ps.print(" " + dset.getString(6));
					}
					isFirst = false;
				}
				if (keys.containsKey("PRI"))
				{
					ps.println(",");
					ps.print("\tPRIMARY KEY (");
					isFirst = true;
					for (String key : keys.get("PRI"))
					{
						if (!isFirst)
						{
							ps.print(", ");
						}
						ps.print("`" + key + "`");
						isFirst = false;
					}
					ps.print(")");
				}
				if (keys.containsKey("MUL"))
				{
					ps.println(",");
					isFirst = true;
					for (String key : keys.get("MUL"))
					{
						if (!isFirst)
						{
							ps.println(", ");
						}
						ps.print("\tKEY `key_" + key + "` (`" + key + "`)");
						isFirst = false;
					}
				}
				ps.println();
				ps.println(");");
				ps.flush();
				dset.close();
				desc.close();

				desc = con.prepareStatement("SELECT * FROM " + rset.getString(1));
				dset = desc.executeQuery();
				isFirst = true;
				int cnt = 0;
				while (dset.next())
				{
					if ((cnt % 100) == 0)
					{
						ps.println("INSERT INTO `" + rset.getString(1) + "` VALUES ");
					}
					else
					{
						ps.println(",");
					}

					ps.print("\t(");
					boolean isInFirst = true;
					for (int i = 1; i <= dset.getMetaData().getColumnCount(); i++)
					{
						if (!isInFirst)
						{
							ps.print(", ");
						}

						if (dset.getString(i) == null)
						{
							ps.print("NULL");
						}
						else
						{
							ps.print("'" + dset.getString(i).replace("\'", "\\\'") + "'");
						}
						isInFirst = false;
					}
					ps.print(")");
					isFirst = false;

					if ((cnt % 100) == 99)
					{
						ps.println(";");
					}
					cnt++;
				}
				if (!isFirst && ((cnt % 100) != 0))
				{
					ps.println(";");
				}
				ps.println();
				ps.flush();
				dset.close();
				desc.close();
			}
			rset.close();
			stmt.close();
			ps.flush();
			ps.close();
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
		_frame.appendToProgressArea("Dump Complete!");
	}

Replace Generic With Diamond HashMap<String,List<String>> with HashMap<> in method public createDump() : void from class com.l2jserver.tools.dbinstaller.util.mysql.DBDumper


	public RegisterDialog(final GUserInterface owner)
	{
		super(owner.getFrame(), true);
		_owner = owner;
		setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		_bundle = owner.getBundle();
		setTitle(_bundle.getString("registerGS"));
		setResizable(false);
		setLayout(new GridBagLayout());
		GridBagConstraints cons = new GridBagConstraints();
		cons.weightx = 0.5;
		cons.weighty = 0.5;
		cons.gridx = 0;
		cons.gridy = 0;
		cons.fill = GridBagConstraints.BOTH;

		final JLabel label = new JLabel(_bundle.getString("serverName"));
		this.add(label, cons);

		_combo = new JComboBox<>();
		_combo.setEditable(false);
		for (Map.Entry<Integer, String> entry : GameServerTable.getInstance().getServerNames().entrySet())
		{
			if (!GameServerTable.getInstance().hasRegisteredGameServerOnId(entry.getKey()))
			{
				_combo.addItem(new ComboServer(entry.getKey(), entry.getValue()));
			}
		}
		cons.gridx = 1;
		cons.gridy = 0;
		this.add(_combo, cons);

		cons.gridx = 0;
		cons.gridy = 1;
		cons.gridwidth = 2;
		JTextPane textPane = new JTextPane();
		textPane.setText(_bundle.getString("saveHexId"));
		textPane.setEditable(false);
		textPane.setBackground(label.getBackground());
		this.add(textPane, cons);
		cons.gridwidth = 1;

		JButton btnSave = new JButton(_bundle.getString("save"));
		btnSave.setActionCommand("save");
		btnSave.addActionListener(this);
		cons.gridx = 0;
		cons.gridy = 2;
		this.add(btnSave, cons);

		JButton btnCancel = new JButton(_bundle.getString("cancel"));
		btnCancel.setActionCommand("cancel");
		btnCancel.addActionListener(this);
		cons.gridx = 1;
		cons.gridy = 2;
		this.add(btnCancel, cons);

		final double leftSize = Math.max(label.getPreferredSize().getWidth(), btnSave.getPreferredSize().getWidth());
		final double rightSize = Math.max(_combo.getPreferredSize().getWidth(), btnCancel.getPreferredSize().getWidth());

		final double height = _combo.getPreferredSize().getHeight() + (4 * textPane.getPreferredSize().getHeight()) + btnSave.getPreferredSize().getHeight();
		this.setSize((int) (leftSize + rightSize + 30), (int) (height + 20));

		setLocationRelativeTo(owner.getFrame());
	}

	public RegisterDialog(final GUserInterface owner)
	{
		super(owner.getFrame(), true);
		_owner = owner;
		setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		_bundle = owner.getBundle();
		setTitle(_bundle.getString("registerGS"));
		setResizable(false);
		setLayout(new GridBagLayout());
		GridBagConstraints cons = new GridBagConstraints();
		cons.weightx = 0.5;
		cons.weighty = 0.5;
		cons.gridx = 0;
		cons.gridy = 0;
		cons.fill = GridBagConstraints.BOTH;

		final JLabel label = new JLabel(_bundle.getString("serverName"));
		this.add(label, cons);

		_combo = new JComboBox<ComboServer>();
		_combo.setEditable(false);
		for (Map.Entry<Integer, String> entry : GameServerTable.getInstance().getServerNames().entrySet())
		{
			if (!GameServerTable.getInstance().hasRegisteredGameServerOnId(entry.getKey()))
			{
				_combo.addItem(new ComboServer(entry.getKey(), entry.getValue()));
			}
		}
		cons.gridx = 1;
		cons.gridy = 0;
		this.add(_combo, cons);

		cons.gridx = 0;
		cons.gridy = 1;
		cons.gridwidth = 2;
		JTextPane textPane = new JTextPane();
		textPane.setText(_bundle.getString("saveHexId"));
		textPane.setEditable(false);
		textPane.setBackground(label.getBackground());
		this.add(textPane, cons);
		cons.gridwidth = 1;

		JButton btnSave = new JButton(_bundle.getString("save"));
		btnSave.setActionCommand("save");
		btnSave.addActionListener(this);
		cons.gridx = 0;
		cons.gridy = 2;
		this.add(btnSave, cons);

		JButton btnCancel = new JButton(_bundle.getString("cancel"));
		btnCancel.setActionCommand("cancel");
		btnCancel.addActionListener(this);
		cons.gridx = 1;
		cons.gridy = 2;
		this.add(btnCancel, cons);

		final double leftSize = Math.max(label.getPreferredSize().getWidth(), btnSave.getPreferredSize().getWidth());
		final double rightSize = Math.max(_combo.getPreferredSize().getWidth(), btnCancel.getPreferredSize().getWidth());

		final double height = _combo.getPreferredSize().getHeight() + (4 * textPane.getPreferredSize().getHeight()) + btnSave.getPreferredSize().getHeight();
		this.setSize((int) (leftSize + rightSize + 30), (int) (height + 20));

		setLocationRelativeTo(owner.getFrame());
	}

Replace Generic With Diamond JComboBox<ComboServer> with JComboBox<> in method public RegisterDialog(owner GUserInterface) from class com.l2jserver.tools.gsregistering.RegisterDialog


	/**
	 * Add parameter used in quests.
	 * @param var : String pointing out the name of the variable for quest
	 * @param val : String pointing out the value of the variable for quest
	 * @return String (equal to parameter "val")
	 */
	public String setInternal(String var, String val)
	{
		if (_vars == null)
		{
			_vars = new HashMap<>();
		}

		if (val == null)
		{
			val = "";
		}

		_vars.put(var, val);
		return val;
	}

	/**
	 * Add parameter used in quests.
	 * @param var : String pointing out the name of the variable for quest
	 * @param val : String pointing out the value of the variable for quest
	 * @return String (equal to parameter "val")
	 */
	public String setInternal(String var, String val)
	{
		if (_vars == null)
		{
			_vars = new FastMap<String, String>();
		}

		if (val == null)
		{
			val = "";
		}

		_vars.put(var, val);
		return val;
	}

Replace Generic With Diamond FastMap<String,String> with HashMap<> in method public setInternal(var String, val String) : String from class com.l2jserver.gameserver.model.quest.QuestState


	public String loadFile(File file)
	{
		HtmFilter filter = new HtmFilter();
		if (file.exists() && filter.accept(file) && !file.isDirectory())
		{
			String content;
			try (FileInputStream fis = new FileInputStream(file);
				BufferedInputStream bis = new BufferedInputStream(fis))
			{
				int bytes = bis.available();
				byte[] raw = new byte[bytes];

				bis.read(raw);
				content = new String(raw, "UTF-8");
				content = content.replaceAll("\r\n", "\n");

				String relpath = getRelativePath(Config.DATAPACK_ROOT, file);
				int hashcode = relpath.hashCode();

				String oldContent = _cache.get(hashcode);
				if (oldContent == null)
				{
					_bytesBuffLen += bytes;
					_loadedFiles++;
				}
				else
				{
					_bytesBuffLen = (_bytesBuffLen - oldContent.length()) + bytes;
				}

				_cache.put(hashcode, content);

				return content;
			}
			catch (Exception e)
			{
				_log.warning("problem with htm file " + e);
			}
		}
		return null;
	}

	public String loadFile(File file)
	{
		HtmFilter filter = new HtmFilter();

		if (file.exists() && filter.accept(file) && !file.isDirectory())
		{
			String content;
			FileInputStream fis = null;

			try
			{
				fis = new FileInputStream(file);
				BufferedInputStream bis = new BufferedInputStream(fis);
				int bytes = bis.available();
				byte[] raw = new byte[bytes];

				bis.read(raw);
				content = new String(raw, "UTF-8");
				content = content.replaceAll("\r\n", "\n");

				String relpath = getRelativePath(Config.DATAPACK_ROOT, file);
				int hashcode = relpath.hashCode();

				String oldContent = _cache.get(hashcode);

				if (oldContent == null)
				{
					_bytesBuffLen += bytes;
					_loadedFiles++;
				}
				else
				{
					_bytesBuffLen = (_bytesBuffLen - oldContent.length()) + bytes;
				}

				_cache.put(hashcode, content);

				return content;
			}
			catch (Exception e)
			{
				_log.warning("problem with htm file " + e);
			}
			finally
			{
				try
				{
					fis.close();
				}
				catch (Exception e1)
				{
				}
			}
		}

		return null;
	}

Try With Resources try(FileInputStream fis=new FileInputStream(file); BufferedInputStream bis=new BufferedInputStream(fis)) in method public loadFile(file File) : String from class com.l2jserver.communityserver.cache.HtmCache