The get.pet have change to get summon ?
how is now the close.con ?
anyone know what this possibly mean ?
[javac] Note: C:\Users\Cloud12\workspace\L2J_Server_BETA\java\com\l2jserver\gameserver\model\L2Nevit.java uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
Coding Question .
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
- UnAfraid
- L2j Veteran
- Posts: 4199
- Joined: Mon Jul 23, 2007 4:25 pm
- Location: Bulgaria
- Contact:
Re: Coding Question .
Just use ARM
Example:
And you will no longer need to use:
Example:
Code: Select all
try (Connection con = L2DatabaseFactory.getInstance(); PreparedStatement statement = con.prepareStatement("SELECT ?")){ statement.setInt(1, 1); try (ResultSet rset = statement.executeQuery()) { if (rset.next()) { // .. } }}catch (SQLException e){ _log.log(Level.WARNING, "", e);}
Code: Select all
finally{ L2DatabaseFactory.close(con);}