Commit e1caf30
committed
JythonScriptLanguage: decode more PyObject types
It seems that for PyInteger at least, even though it is a PyObject, the
approach of calling __tojava__(getType().getProxyType()) does not work.
So to be safe, let's hardcode the types we _know_ we can support --
PyBoolean, PyInteger, PyFloat and PyString -- before PyObject generally.
Hopefully, this will prevent warnings such as:
[WARNING] Ignoring unsupported output: result [org.python.core.PyInteger]
This change also updates the JythonTest#testBasic() method,
since the result is now an Integer rather than a PyInteger.1 parent 454c663 commit e1caf30
File tree
2 files changed
+18
-5
lines changed- src
- main/java/org/scijava/plugins/scripting/jython
- test/java/org/scijava/plugins/scripting/jython
2 files changed
+18
-5
lines changedLines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
71 | 74 | | |
72 | 75 | | |
73 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
74 | 89 | | |
75 | 90 | | |
76 | 91 | | |
77 | 92 | | |
78 | 93 | | |
79 | 94 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | 95 | | |
84 | 96 | | |
85 | 97 | | |
| |||
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
67 | | - | |
68 | | - | |
| 68 | + | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
0 commit comments