Coding Question .

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
gmakhs
Posts: 215
Joined: Sat Apr 14, 2007 12:00 pm

Coding Question .

Post by gmakhs »

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.
User avatar
UnAfraid
L2j Veteran
L2j Veteran
Posts: 4199
Joined: Mon Jul 23, 2007 4:25 pm
Location: Bulgaria
Contact:

Re: Coding Question .

Post by UnAfraid »

Just use ARM
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);}
And you will no longer need to use:

Code: Select all

finally{    L2DatabaseFactory.close(con);}
Image
User avatar
gmakhs
Posts: 215
Joined: Sat Apr 14, 2007 12:00 pm

Re: Coding Question .

Post by gmakhs »

thanks
Post Reply