This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bsf.git
The following commit(s) were added to refs/heads/master by this push:
new 5a89b70 Remove useless null-check.
5a89b70 is described below
commit 5a89b70972f1645c6f4d9a2266e69cbe7e312288
Author: Gary Gregory <[email protected]>
AuthorDate: Fri Nov 20 17:21:41 2020 -0500
Remove useless null-check.
---
src/main/java/org/apache/bsf/engines/jython/JythonEngine.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/bsf/engines/jython/JythonEngine.java
b/src/main/java/org/apache/bsf/engines/jython/JythonEngine.java
index d9e9a45..ace1622 100644
--- a/src/main/java/org/apache/bsf/engines/jython/JythonEngine.java
+++ b/src/main/java/org/apache/bsf/engines/jython/JythonEngine.java
@@ -119,7 +119,7 @@ public class JythonEngine extends BSFEngineImpl {
Object result = interp.eval ("bsf_temp_fn()");
- if (result instanceof PyJavaInstance)
+ if (result != null && result instanceof PyJavaInstance)
result = ((PyJavaInstance)result).__tojava__(Object.class);
return result;
} catch (PyException e) {
@@ -137,7 +137,7 @@ public class JythonEngine extends BSFEngineImpl {
String scriptStr = byteify(script.toString ());
importPackage(scriptStr);
Object result = interp.eval (scriptStr);
- if (result instanceof PyJavaInstance)
+ if (result != null && result instanceof PyJavaInstance)
result = ((PyJavaInstance)result).__tojava__(Object.class);
return result;
} catch (PyException e) {