Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 4AC569FA46C for ; Sun, 22 Jul 2007 04:33:27 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 95208-01 for ; Sun, 22 Jul 2007 04:33:21 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from gw02.mail.saunalahti.fi (gw02.mail.saunalahti.fi [195.197.172.116]) by postgresql.org (Postfix) with ESMTP id 434C79FA468 for ; Sun, 22 Jul 2007 04:33:23 -0300 (ADT) Received: from [10.0.0.4] (a88-113-10-143.elisa-laajakaista.fi [88.113.10.143]) (using SSLv3 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by gw02.mail.saunalahti.fi (Postfix) with ESMTP id 4B561139A44 for ; Sun, 22 Jul 2007 10:33:21 +0300 (EEST) Subject: Miscellaneous small fixes From: Mikko Tiihonen To: pgsql-jdbc Content-Type: text/plain Date: Sun, 22 Jul 2007 10:33:20 +0300 Message-Id: <1185089600.1632.85.camel@dual.local> Mime-Version: 1.0 X-Mailer: Evolution 2.10.2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/101 X-Sequence-Number: 17275 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