Unnessecary use of new Integer(n) in AbstractJdbc2ResultSet - Mailing list pgsql-jdbc

From Daniel Migowski
Subject Unnessecary use of new Integer(n) in AbstractJdbc2ResultSet
Date
Msg-id 41ED3F5450C90F4D8381BC4D8DF6BBDC4F095AFD@EXCHANGESERVER.ikoffice.de
Whole thread Raw
Responses Re: Unnessecary use of new Integer(n) in AbstractJdbc2ResultSet  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
 Hi,

I am using the postgresql driver 8.3-604-jdbc3, and noticed something strange in my profiling reports:

In Line 2518 of AbstractJdbc2ResultSet, in function findColumnIndex, there is a call to "new Integer(n)", which takes 2% overall time in my app! It should be replaced by "Integer.valueOf(n)", because this doesn't create any new instances on Integer for the usecase found here!

Regards,
Daniel Migowski

pgsql-jdbc by date:

Previous
From: Bernd Helmle
Date:
Subject: Re: Configurable Send/Receive Buffer Sizes
Next
From: Kris Jurka
Date:
Subject: Re: Unnessecary use of new Integer(n) in AbstractJdbc2ResultSet