Beanshell 2.0b2 crash: Can't construct items with null.

Anthony Sciola <[email protected]> Mon, 01 Nov 2004 14:59:20 -0500
Newsgroups gmane.comp.java.beanshell.devel
Organization Newbury Networks
Message-ID <1099339160.1463.101.camel@acs>
I've found that if you try to construct something and pass a null
parameter into a constructor, beanshell will throw an exception.

As an example:


public class Test 
{ 
  public String testStr; 
  public Test(String str) 
  { 
     testStr = str; 
  } 
} 

Test A = new Test("hi"); // Works correctly 
Test B = new Test(null); // Throws exception: 

bsh.InterpreterError: Error in class initialization:
bsh.InterpreterError: null fromValue 
at bsh.ClassGeneratorUtil.initInstance(Unknown Source) 
at Test.<init>(BeanShell Generated via ASM (www.objectweb.org))



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click