Message2026

Author johnrsisson
Recipients
Date 2007-11-30.05:07:24
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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).
History
Date User Action Args
2008-02-20 17:18:08adminlinkissue1841445 messages
2008-02-20 17:18:08admincreate