Phil Steitz wrote:
> [email protected] wrote:
>> 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()
> 
> Is this available in 1.4?  I thought I checked and saw no.  Could be
> this one is and others are not.
> 
> Phil
>> 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) {

I see another change in here.  This will change behavior when
NumberFormatException is thrown above.  I guess its OK unless
clients are expecting and catching SAXException in this case.

>>              throw new SAXException(e);
>>          }
>>      }
>>
>>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to