Message2026
If the name passed in the first parameter of a PythonInterpreter.get(String name, Class javaclass) call isn't bound, the get method's code will pass a null to the first parameter on the call to Py.tojava(..) and this ends up causing a NullPointerException to be thrown.
This appears to be a bug in the get method's logic, as this behaviour isn't in the JavaDoc for the get method and the behaviour is inconsistent with the alternative get(String name) method that would return null. Also applications shouldn't normally have to catch NullPointerException.
The get(String name, Class javaclass) code should check the result of the locals.__finditem__(name.intern() call before proceeding to call Py.tojava.
This issue exists in jython 2.1 onwards (not sure about earlier releases). |
|
Date |
User |
Action |
Args |
2008-02-20 17:18:08 | admin | link | issue1841445 messages |
2008-02-20 17:18:08 | admin | create | |
|