Bugs item #596945, was opened at 2002-08-18 20:28
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=596945&group_id=22866

Category: JBossCMP
Group: v3.0 Rabbit Hole
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Brian Huang (kinmen)
Assigned to: Dain Sundstrom (dsundstrom)
Summary: NumberFormatException

Initial Comment:
    
I found the cause of NumberFormatException. In my  
jbosscmp-jdbc.xml, I had an entry: <read-time-out/>,  
which causes that exception. In the file,  
org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData  
, the following codes actually invoke the exception:  
  
  
// read-time-out  
 String readTimeOutStr =  
 MetaData.getOptionalChildContent(element,  
"read-time-out");  
 if(readTimeOutStr != null) {  
 readTimeOut = Integer.parseInt(readTimeOutStr);  
 } else {  
 readTimeOut = defaultValues.getReadTimeOut();  
 }  
  
The Integer.parseInt(readTimeOutStr) causes  
NumberFormatException if <read-time-out/> is used. Is  
this a bug since <read-time-out/> is not illegal? I know I  
shouldn't have done that. However, should a try {  
catch(){} be used?  
  
// read-time-out  
 String readTimeOutStr =  
 MetaData.getOptionalChildContent(element,  
"read-time-out");  
 if(readTimeOutStr != null) {  
 try {  
 readTimeOut = Integer.parseInt(readTimeOutStr);  
 } catch (java.lang.NumberFormatException  
numberformatException){  
 readTimeOut = defaultValues.getReadTimeOut();  
 }  
 } else {  
 readTimeOut = defaultValues.getReadTimeOut();  
 

----------------------------------------------------------------------

>Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-08-25 15:48

Message:
Logged In: YES 
user_id=251431

Added checks for NumberFormatException when ever parseInt is
called.  Fix has been applied to Branch_3_0, Branch_3_2, and
HEAD.

----------------------------------------------------------------------

Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-08-23 19:07

Message:
Logged In: YES 
user_id=251431

Thanks.  Hopefully this type of error will go away when we
convert to xml schemas.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=596945&group_id=22866


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to