|
Hi there,
while doing some initial explorative experiments with JSR-223 I stumbled over a NPE in NetRexx with the following Java program that lists all javax.script languages and interrogates the most important information about them:
Running it yields the following output (leaving JavaScript for
comparison):
Posting here, because I do not know where to file the bug otherwise
and being a little bit tight on time.---rony _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
|
Hi Rony,
thanks for reporting this. I reproduced and opened issue https://kenai.com/jira/browse/NETREXX-117 for you. I also fixed it. It is in rev 509 of trunk. I don’t know if you build from source. If Kermit agrees with my fix I’ll resolve the issue in JIRA and will put up a new build of the hitherto unreleased 3.04 on the web page. best regards, René.
_______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
|
Actually the error was in the NetRexxScriptEngineFactory
getParameter method which is supposed to return an object rather
than an object.toString. Here is the info from the Java 7 docs for
ScriptEngineFactory which shows that the "THREADING" null value is
correct for non threaded jsr223 implementations:
Object getParameter(String key) Returns the value of an attribute whose meaning
may be implementation-specific. Keys for which the value is
defined in all implementations are:
The values for these keys are the Strings returned by
import java.util.List; import javax.script.ScriptEngine; import javax.script.ScriptEngineFactory; import javax.script.ScriptEngineManager; class ListScriptEngines method main( args=String[]) static manager = ScriptEngineManager(); factories = manager.getEngineFactories(); factory=ScriptEngineFactory loop factory over factories Say "getEngineName:\t " factory.getEngineName() Say "\tgetEngineVersion: " factory.getEngineVersion() Say "\tgetLanguageName: " factory.getLanguageName() Say "\tgetLanguageVersion: " factory.getLanguageVersion() Say "\tgetExtensions: " factory.getExtensions() Say "\tgetMimeTypes: " factory.getMimeTypes() Say "\tgetNames: " factory.getNames() Say "\tgetParameter(\"THREADING\"): " Say factory.getParameter("THREADING") if factory.getParameter("THREADING")=null then say "its null" Say "----------------------" end ------------------------------------------------------------------------------------------------------------ I am currently researching JSR199, the Java Compiler API, to see if I can implement it for NetRexx compiles. If successful, the changes may allow us to implement more JSR223 features perhaps including multi-threading. I can see a possible need for that in server environments. Meanwhile the NPE fix is committed on trunk at rev 510. -- Kermit On 4/29/2015 11:23 AM, René Jansen
wrote:
Hi Rony, _______________________________________________ Ibm-netrexx mailing list [hidden email] Online Archive : http://ibm-netrexx.215625.n3.nabble.com/ |
| Free forum by Nabble | Edit this page |
