-
Bug
-
Resolution: Fixed
-
P4
-
6
-
None
-
b53
-
generic
-
generic
-
Verified
The code example in javax.script.ScriptEngineFactory.getMethodCallSyntax method description contains several typos and fails compilation:
------------
String getMethodCallSyntax(String obj,
String m,
String... args)
...
int ret = obj;
^^^
should be String
obj += "." + method + "(";
^^^
should be "m"
for (int i = 0; i < args.length; i++) {
return += args[i];
^^^
should be "ret"
if (i == args.length - 1) {
obj += ")";
} else {
obj += ",");
^
invalid symbol
}
}
return ret;
}
------------
###@###.### 2005-06-28 03:27:12 GMT
------------
String getMethodCallSyntax(String obj,
String m,
String... args)
...
int ret = obj;
^^^
should be String
obj += "." + method + "(";
^^^
should be "m"
for (int i = 0; i < args.length; i++) {
return += args[i];
^^^
should be "ret"
if (i == args.length - 1) {
obj += ")";
} else {
obj += ",");
^
invalid symbol
}
}
return ret;
}
------------
###@###.### 2005-06-28 03:27:12 GMT