Menu

#312 error when looping over collections containing null

None
closed
nobody
General (151)
5
2018-08-02
2008-02-19
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

  • Franklin Schmidt

    Logged In: YES
    user_id=406180
    Originator: NO

    fixed in Beanshell2 fork

    http://code.google.com/p/beanshell2/issues/detail?id=19

     
  • 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".

     
  • Olaf Klischat

    Olaf Klischat - 2008-04-24

    Logged In: YES
    user_id=151428
    Originator: YES

    Ok, googled and found it at svn http://beanshell2.googlecode.com/svn/trunk/beanshell2-read-only. Thanks for the fix.

     
  • nickl-

    nickl- - 2018-08-02
    • status: open --> closed
    • Group: -->
     
  • nickl-

    nickl- - 2018-08-02

    Ticket has been migrated to github.
    Please follow up on this over here: https://github.com/beanshell/beanshell/issues/450

     

Log in to post a comment.

MongoDB Logo MongoDB