You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/11/20 22:19:34 UTC
[commons-bsf] branch master updated: Remove useless null-check.
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 4bbfc88 Remove useless null-check.
4bbfc88 is described below
commit 4bbfc881a1b37bdb10efbdc0e9d01a2cc7e944b3
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Nov 20 17:19:29 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 ace1622..d9e9a45 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 != null && result instanceof PyJavaInstance)
+ if (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 != null && result instanceof PyJavaInstance)
+ if (result instanceof PyJavaInstance)
result = ((PyJavaInstance)result).__tojava__(Object.class);
return result;
} catch (PyException e) {