From: Mikko Tiihonen <mikko.tiihonen@iki.fi>
To: pgsql-jdbc <pgsql-jdbc@postgresql.org>
Subject: Miscellaneous small fixes
Date: Sun, 22 Jul 2007 10:33:20 +0300
Message-ID: <1185089600.1632.85.camel@dual.local> (raw)
Hi,
This time a patch that includes a lot small fixes. They come mostly
from going through a findbugs report. For each issue that I though was
valid I tried to always do the minimal fix. If some fix categories are
not wanted I can create a patch with the requested parts removed.
Here's a list of small things I changed. The patch itself was a few
kB too large for the mailing list and I had to place it here
http://mokki.dyndns.org/~mtiihone/postgresql/cleanup/
AbstractJdbc2DatabaseMetaData
- comparison of string parameter using ==
- many createStatement calls without statement.close().
- used new String("constant")
AbstractJdbc4ResultSet
- infinite recursion loop
AbstractJdbc23PooledConnection
- null assigned to parameter instead of field.
UNCERTAIN if this is correct or if the line should have just been removed
- made static fields final
AbstractJdbc23SimpleDataSource
- removed unused imports
- made abstract so that serialVersionUID is not needed even though
Serializable is implemented
AbstractJdbc2Array
- removed unused fields: idx and rs
AbstractJdbc2Connection
- use explicit US locale in toUpperCase
- removed unused imports
AbstractJdbc2ResultSet
- made NullObject static inner class
- changed locale dependent toLowerCase+equals to equalsIgnoreCase
- use explicit US locale in toLowerCase
- removed unused imports
- fields selectStatement, insertStatmenet and updateStatmenet removed because
they were only used inside one method and never reused
- close deleteStatement on result set close
- refreshRow was not synchronized while other similar updateableResultSet
methods were
- added double quotes and escaping to all tables names and primary keys in
updateable stuff
- changed column escaping of generated updateble statements to honour
escaping settings
AbstractJdbc2Statement, AbstractJdbc3ResultSet, AbstractJdbc4ParameterMetaData,
LargeObjectManager, MakeSSL, PGXAConnection, QueryExecutorImpl,
ServerErrorMessage, test code
- removed unused imports
Base64
- removed unused private method
ConnectionFactoryImpl
- made SimpleResultHandler a static inner class
EscapedFunctions
- use explicit US locale in toLowerCase
LargeObject
- commented out empty finalize method, its existence still slows down the JVM
NonValidatingFactory
- removed unused imports
- made inner class NonValidatingTM static
PGmoney, PGobject, RecoveredXid
- defines equals but not hashCode
PGinterval
- added missing synchronize around static DecimalFormat
PSQLDriverVersion
- made version number final
UnixCrypt
- Fixed wrong assumption that Math.abs never returns negative numbers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: mikko.tiihonen@iki.fi
Subject: Re: Miscellaneous small fixes
In-Reply-To: <1185089600.1632.85.camel@dual.local>
References: <1185089600.1632.85.camel@dual.local>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox