db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lily...@apache.org
Subject svn commit: r1083603 - /db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java
Date Sun, 20 Mar 2011 22:27:07 GMT
Author: lilywei
Date: Sun Mar 20 22:27:07 2011
New Revision: 1083603

URL: http://svn.apache.org/viewvc?rev=1083603&view=rev
Log:
DERBY-5092 avoid Boolean allocations for rowset data in client cursor

Patch contributed by Dave Brosius < dbrosius@apache.org >

Modified:
    db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java

Modified: db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java?rev=1083603&r1=1083602&r2=1083603&view=diff
==============================================================================
--- db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java (original)
+++ db/derby/code/trunk/java/client/org/apache/derby/client/am/Cursor.java Sun Mar 20 22:27:07
2011
@@ -1328,7 +1328,7 @@ public abstract class Cursor {
     public final Object getObject(int column) throws SqlException {
         switch (jdbcTypes_[column - 1]) {
         case java.sql.Types.BOOLEAN:
-            return new Boolean(get_BOOLEAN(column));
+            return get_BOOLEAN(column) ? Boolean.TRUE : Boolean.FALSE;
         case java.sql.Types.SMALLINT:
             return new Integer(get_SMALLINT(column)); // See Table 4 in JDBC 1 spec (pg.
932 in jdbc book)
         case java.sql.Types.INTEGER:



Mime
View raw message