From: | Mikko Tiihonen <mikko(dot)tiihonen(at)iki(dot)fi> |
---|---|
To: | pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Miscellaneous small fixes |
Date: | 2007-07-22 07:33:20 |
Message-ID: | 1185089600.1632.85.camel@dual.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Mikko Tiihonen | 2007-07-22 08:04:11 | Re: Fix more unit test connection leaks |
Previous Message | Kris Jurka | 2007-07-22 01:31:54 | Re: Fix more unit test connection leaks |