280,7 → 280,7 |
|
try { |
// Define a Plugin object with a field named type |
rhino.eval("var plugin={ type: null, apiVersion: null };"); |
rhino.eval("var plugin={ type: null, apiVersion: null, name: null };"); |
} |
catch (ScriptException e) { |
assert false; |
301,18 → 301,15 |
script.getLineNumber() <= linesToCheckForSupport) { |
try { |
rhino.eval(line); |
// Note that undefined doesn't convert to null! |
// XXX: Note that undefined doesn't convert to null, is this safe? |
if (null == type) { |
rhino.eval("$_1_$ = (undefined===plugin.type)?null:plugin.type;"); |
type = rhino.get("$_1_$"); |
type = rhino.eval("plugin.type;"); |
} |
if (null == apiVersion) { |
rhino.eval("$_1_$ = (undefined===plugin.apiVersion)?null:plugin.apiVersion;"); |
apiVersion = rhino.get("$_1_$"); |
apiVersion = rhino.eval("plugin.apiVersion;"); |
} |
if (null == name) { |
rhino.eval("$_1_$ = (undefined===plugin.name)?null:plugin.name;"); |
name = rhino.get("$_1_$"); |
name = rhino.eval("plugin.name;"); |
} |
} |
catch (final ScriptException e) { |
338,7 → 335,6 |
apiVersion = 0; |
} |
// name can be null |
|
final PluginProperties pp = new PluginProperties(); |
try { |
pp.apiVersion = Double.valueOf(apiVersion.toString()).intValue(); |