Bugs item #596945, was opened at 2002-08-19 09: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: Open
Resolution: None
Priority: 5
Submitted By: Brian Huang (kinmen)
Assigned to: Nobody/Anonymous (nobody)
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();  
 

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

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