Unix Technical Forum

Miscellaneous small fixes

This is a discussion on Miscellaneous small fixes within the pgsql Interfaces jdbc forums, part of the PostgreSQL category; --> Hi, This time a patch that includes a lot small fixes. They come mostly from going through a findbugs ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces jdbc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-16-2008, 12:49 AM
Mikko Tiihonen
 
Posts: n/a
Default Miscellaneous small fixes

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



---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:38 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com