#312 error when looping over collections containing null

open
nobody
General (151)
5
2008-02-19
2008-02-19
Olaf Klischat
No

bsh % for (x: new String[]{"foo",null,"bar"}) { print(x); }
foo
// Error: Internal Error: null variable value
bsh.InterpreterError: null variable value
at bsh.NameSpace.setVariable(Unknown Source)
at bsh.BlockNameSpace.setVariable(Unknown Source)
at bsh.BlockNameSpace.setVariable(Unknown Source)
at bsh.BlockNameSpace.setVariable(Unknown Source)
at bsh.BlockNameSpace.setVariable(Unknown Source)
at bsh.BlockNameSpace.setVariable(Unknown Source)
at bsh.BlockNameSpace.setVariable(Unknown Source)
at bsh.BlockNameSpace.setVariable(Unknown Source)
at bsh.BlockNameSpace.setVariable(Unknown Source)
at bsh.BlockNameSpace.setVariable(Unknown Source)
at bsh.BlockNameSpace.setVariable(Unknown Source)
at bsh.NameSpace.setVariable(Unknown Source)
at bsh.BSHEnhancedForStatement.eval(Unknown Source)
at bsh.Interpreter.run(Unknown Source)
at bsh.Interpreter.main(Unknown Source)
bsh %

Discussion

  • Olaf Klischat
    Olaf Klischat
    2008-04-24

    Logged In: YES
    user_id=151428
    Originator: YES

    Forgive my ignorance, but how do I obtain that fork? The head of :pserver:anonymous@beanshell.cvs.sourceforge.net:/cvsroot/beanshell/BeanShell still contains the bug, and there is no branch there named anything like "beanshell2".