diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/TradeController.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/TradeController.java index 9fa361af00..c421ac0816 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/TradeController.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/TradeController.java @@ -274,11 +274,11 @@ public class TradeController } if (LimitedItem) { - _listsTaskItem.put(new Integer(buy1.getListId()), buy1); + _listsTaskItem.put(buy1.getListId(), buy1); } else { - _lists.put(new Integer(buy1.getListId()), buy1); + _lists.put(buy1.getListId(), buy1); } _nextListId = Math.max(_nextListId, buy1.getListId() + 1); @@ -445,11 +445,11 @@ public class TradeController } if (LimitedItem) { - _listsTaskItem.put(new Integer(buy1.getListId()), buy1); + _listsTaskItem.put(buy1.getListId(), buy1); } else { - _lists.put(new Integer(buy1.getListId()), buy1); + _lists.put(buy1.getListId(), buy1); } _nextListId = Math.max(_nextListId, buy1.getListId() + 1); } @@ -508,12 +508,12 @@ public class TradeController public L2TradeList getBuyList(int listId) { - if (_lists.get(new Integer(listId)) != null) + if (_lists.get(listId) != null) { - return _lists.get(new Integer(listId)); + return _lists.get(listId); } - return _listsTaskItem.get(new Integer(listId)); + return _listsTaskItem.get(listId); } public List getBuyListByNpcId(int npcId) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/csv/RecipeTable.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/csv/RecipeTable.java index 2104ebc6d5..1833e1a123 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/csv/RecipeTable.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/csv/RecipeTable.java @@ -189,7 +189,7 @@ public class RecipeTable extends RecipeController { recipeList.addRecipe(recipePart); } - _lists.put(new Integer(_lists.size()), recipeList); + _lists.put(_lists.size(), recipeList); } catch (Exception e) { @@ -211,7 +211,7 @@ public class RecipeTable extends RecipeController { for (int i = 0; i < _lists.size(); i++) { - final L2RecipeList find = _lists.get(new Integer(i)); + final L2RecipeList find = _lists.get(i); if (find.getRecipeId() == itemId) { return find; @@ -224,7 +224,7 @@ public class RecipeTable extends RecipeController { for (int i = 0; i < _lists.size(); i++) { - final L2RecipeList find = _lists.get(new Integer(i)); + final L2RecipeList find = _lists.get(i); if (find.getId() == recId) { return find; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/ClanTable.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/ClanTable.java index 4d921114e7..2cc03ea35f 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/ClanTable.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/ClanTable.java @@ -227,7 +227,7 @@ public class ClanTable LOGGER.info("New clan created: {" + clan.getClanId() + "} {" + clan.getName() + "}"); - _clans.put(new Integer(clan.getClanId()), clan); + _clans.put(clan.getClanId(), clan); // should be update packet only player.sendPacket(new PledgeShowInfoUpdate(clan)); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/LevelUpData.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/LevelUpData.java index ab5aa8b1ef..c8f934f17c 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/LevelUpData.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/datatables/sql/LevelUpData.java @@ -87,7 +87,7 @@ public class LevelUpData lvlDat.setClassMpAdd(rset.getFloat(MP_ADD)); lvlDat.setClassMpModifier(rset.getFloat(MP_MOD)); - lvlTable.put(new Integer(lvlDat.getClassid()), lvlDat); + lvlTable.put(lvlDat.getClassid(), lvlDat); } statement.close(); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/ItemHandler.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/ItemHandler.java index 6e831d775b..1ac60cf976 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/ItemHandler.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/ItemHandler.java @@ -161,7 +161,7 @@ public class ItemHandler // Add handler for each ID found for (int id : ids) { - _datatable.put(new Integer(id), handler); + _datatable.put(id, handler); } } @@ -172,6 +172,6 @@ public class ItemHandler */ public IItemHandler getItemHandler(int itemId) { - return _datatable.get(new Integer(itemId)); + return _datatable.get(itemId); } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/UserCommandHandler.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/UserCommandHandler.java index 1d2e88112b..f532b497b0 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/UserCommandHandler.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/handler/UserCommandHandler.java @@ -80,17 +80,15 @@ public class UserCommandHandler public void registerUserCommandHandler(IUserCommandHandler handler) { - int[] ids = handler.getUserCommandList(); - - for (int id : ids) + for (int id : handler.getUserCommandList()) { - _datatable.put(new Integer(id), handler); + _datatable.put(id, handler); } } public IUserCommandHandler getUserCommandHandler(int userCommand) { - return _datatable.get(new Integer(userCommand)); + return _datatable.get(userCommand); } public int size() diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2World.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2World.java index 55299e5585..5262fe5874 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2World.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/model/L2World.java @@ -316,7 +316,7 @@ public final class L2World */ public L2PetInstance getPet(int ownerId) { - return _petsInstance.get(new Integer(ownerId)); + return _petsInstance.get(ownerId); } /** @@ -328,7 +328,7 @@ public final class L2World */ public L2PetInstance addPet(int ownerId, L2PetInstance pet) { - return _petsInstance.put(new Integer(ownerId), pet); + return _petsInstance.put(ownerId, pet); } /** @@ -338,7 +338,7 @@ public final class L2World */ public void removePet(int ownerId) { - _petsInstance.remove(new Integer(ownerId)); + _petsInstance.remove(ownerId); } /** diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/L2GameClient.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/L2GameClient.java index 08b3d28960..34639b0bc2 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/L2GameClient.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/L2GameClient.java @@ -512,7 +512,7 @@ public final class L2GameClient extends MMOClient> i { final int objectId = c.getObjectId(); - _charSlotMapping.add(new Integer(objectId)); + _charSlotMapping.add(objectId); } } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/serverpackets/ConfirmDlg.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/serverpackets/ConfirmDlg.java index 386fd2ccc3..74e95b5f3c 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/serverpackets/ConfirmDlg.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/serverpackets/ConfirmDlg.java @@ -43,35 +43,35 @@ public class ConfirmDlg extends L2GameServerPacket public ConfirmDlg addString(String text) { - _types.add(new Integer(TYPE_TEXT)); + _types.add(TYPE_TEXT); _values.add(text); return this; } public ConfirmDlg addNumber(int number) { - _types.add(new Integer(TYPE_NUMBER)); - _values.add(new Integer(number)); + _types.add(TYPE_NUMBER); + _values.add(number); return this; } public ConfirmDlg addNpcName(int id) { - _types.add(new Integer(TYPE_NPC_NAME)); - _values.add(new Integer(1000000 + id)); + _types.add(TYPE_NPC_NAME); + _values.add(1000000 + id); return this; } public ConfirmDlg addItemName(int id) { - _types.add(new Integer(TYPE_ITEM_NAME)); - _values.add(new Integer(id)); + _types.add(TYPE_ITEM_NAME); + _values.add(id); return this; } public ConfirmDlg addZoneName(int x, int y, int z) { - _types.add(new Integer(TYPE_ZONE_NAME)); + _types.add(TYPE_ZONE_NAME); final int[] coord = { x, @@ -89,8 +89,8 @@ public class ConfirmDlg extends L2GameServerPacket public ConfirmDlg addSkillName(int id, int lvl) { - _types.add(new Integer(TYPE_SKILL_NAME)); - _values.add(new Integer(id)); + _types.add(TYPE_SKILL_NAME); + _values.add(id); _skillLvL = lvl; return this; } diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/serverpackets/SystemMessage.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/serverpackets/SystemMessage.java index f7ec88ede8..50a02a4d5e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/serverpackets/SystemMessage.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/network/serverpackets/SystemMessage.java @@ -56,7 +56,7 @@ public final class SystemMessage extends L2GameServerPacket public SystemMessage addString(String text) { - _types.add(new Integer(TYPE_TEXT)); + _types.add(TYPE_TEXT); _values.add(text); return this; @@ -64,30 +64,30 @@ public final class SystemMessage extends L2GameServerPacket public SystemMessage addNumber(int number) { - _types.add(new Integer(TYPE_NUMBER)); - _values.add(new Integer(number)); + _types.add(TYPE_NUMBER); + _values.add(number); return this; } public SystemMessage addNpcName(int id) { - _types.add(new Integer(TYPE_NPC_NAME)); - _values.add(new Integer(1000000 + id)); + _types.add(TYPE_NPC_NAME); + _values.add(1000000 + id); return this; } public SystemMessage addItemName(int id) { - _types.add(new Integer(TYPE_ITEM_NAME)); - _values.add(new Integer(id)); + _types.add(TYPE_ITEM_NAME); + _values.add(id); return this; } public SystemMessage addZoneName(int x, int y, int z) { - _types.add(new Integer(TYPE_ZONE_NAME)); + _types.add(TYPE_ZONE_NAME); final int[] coord = { x, @@ -106,8 +106,8 @@ public final class SystemMessage extends L2GameServerPacket public SystemMessage addSkillName(int id, int lvl) { - _types.add(new Integer(TYPE_SKILL_NAME)); - _values.add(new Integer(id)); + _types.add(TYPE_SKILL_NAME); + _values.add(id); _skillLvL = lvl; return this; diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/chars/L2NpcTemplate.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/chars/L2NpcTemplate.java index 585085a39d..e41301eaf8 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/chars/L2NpcTemplate.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/templates/chars/L2NpcTemplate.java @@ -224,7 +224,7 @@ public final class L2NpcTemplate extends L2CharTemplate public void addVulnerability(Stats id, double vuln) { - _vulnerabilities.put(id, new Double(vuln)); + _vulnerabilities.put(id, vuln); } public double getVulnerability(Stats id) diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/ui/Gui.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/ui/Gui.java index 7c2480d533..34d30f2b4e 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/ui/Gui.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/ui/Gui.java @@ -279,8 +279,8 @@ public class Gui JScrollPane scrollPanel = new JScrollPane(txtrConsole); scrollPanel.setBounds(0, 0, 800, 550); JLayeredPane layeredPanel = new JLayeredPane(); - layeredPanel.add(scrollPanel, new Integer(0), 0); - layeredPanel.add(systemPanel, new Integer(1), 0); + layeredPanel.add(scrollPanel, 0, 0); + layeredPanel.add(systemPanel, 1, 0); // Set frame. JFrame frame = new JFrame("Mobius - GameServer"); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/MultiSort.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/MultiSort.java index b2622e94c0..59534bb737 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/MultiSort.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/gameserver/util/MultiSort.java @@ -71,7 +71,7 @@ public class MultiSort for (int i = 0; i < valueList.length; i++) { - tempIntList[i] = new Integer(valueList[i]); + tempIntList[i] = valueList[i]; } return Arrays.asList(tempIntList); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/tools/dbinstaller/gui/DBConfigGUI.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/tools/dbinstaller/gui/DBConfigGUI.java index 7117e29f80..d63f45cd92 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/tools/dbinstaller/gui/DBConfigGUI.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/tools/dbinstaller/gui/DBConfigGUI.java @@ -33,6 +33,7 @@ import javax.swing.JPasswordField; import javax.swing.JTextField; import javax.swing.SpringLayout; import javax.swing.SwingConstants; +import javax.swing.WindowConstants; import com.l2jmobius.commons.util.SplashScreen; import com.l2jmobius.tools.dbinstaller.RunTasks; @@ -82,7 +83,7 @@ public class DBConfigGUI extends JFrame final int height = 220; final Dimension resolution = Toolkit.getDefaultToolkit().getScreenSize(); - setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); setBounds((resolution.width - width) / 2, (resolution.height - height) / 2, width, height); setResizable(false); diff --git a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/tools/dbinstaller/gui/DBInstallerGUI.java b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/tools/dbinstaller/gui/DBInstallerGUI.java index d45bebec34..b84c7dd523 100644 --- a/L2J_Mobius_C6_Interlude/java/com/l2jmobius/tools/dbinstaller/gui/DBInstallerGUI.java +++ b/L2J_Mobius_C6_Interlude/java/com/l2jmobius/tools/dbinstaller/gui/DBInstallerGUI.java @@ -30,6 +30,7 @@ import javax.swing.JOptionPane; import javax.swing.JProgressBar; import javax.swing.JScrollPane; import javax.swing.JTextArea; +import javax.swing.WindowConstants; import com.l2jmobius.tools.dbinstaller.DBOutputInterface; @@ -62,7 +63,7 @@ public class DBInstallerGUI extends JFrame implements DBOutputInterface final int height = 360; final Dimension resolution = Toolkit.getDefaultToolkit().getScreenSize(); - setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); setBounds((resolution.width - width) / 2, (resolution.height - height) / 2, width, height); setResizable(false);