commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r883394 - /commons/proper/dbcp/trunk/src/java/org/apache/commons/jocl/JOCLContentHandler.java
Date Mon, 23 Nov 2009 16:18:51 GMT
Author: sebb
Date: Mon Nov 23 16:18:50 2009
New Revision: 883394

URL: http://svn.apache.org/viewvc?rev=883394&view=rev
Log:
Boolean.valueOf() is better than new Boolean()

Modified:
    commons/proper/dbcp/trunk/src/java/org/apache/commons/jocl/JOCLContentHandler.java

Modified: commons/proper/dbcp/trunk/src/java/org/apache/commons/jocl/JOCLContentHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/java/org/apache/commons/jocl/JOCLContentHandler.java?rev=883394&r1=883393&r2=883394&view=diff
==============================================================================
--- commons/proper/dbcp/trunk/src/java/org/apache/commons/jocl/JOCLContentHandler.java (original)
+++ commons/proper/dbcp/trunk/src/java/org/apache/commons/jocl/JOCLContentHandler.java Mon
Nov 23 16:18:50 2009
@@ -439,7 +439,7 @@
                 } else if(ELT_BOOLEAN.equals(localName)) {
                     String valstr = getAttributeValue(ATT_VALUE,attr,"false");
                     boolean val = ("true".equalsIgnoreCase(valstr) || "yes".equalsIgnoreCase(valstr));
-                    addObject(Boolean.TYPE,new Boolean(val));
+                    addObject(Boolean.TYPE,Boolean.valueOf(val));
                 } else if(ELT_BYTE.equals(localName)) {
                     byte val = Byte.parseByte(getAttributeValue(ATT_VALUE,attr,"0"));
                     addObject(Byte.TYPE,new Byte(val));
@@ -478,7 +478,7 @@
                     // unrecognized JOCL element warning?
                 }
             }
-        } catch(Exception e) {
+        } catch(ClassNotFoundException e) {
             throw new SAXException(e);
         }
     }



Mime
View raw message