diff --git a/jdk/src/share/classes/javax/script/ScriptEngineFactory.java b/jdk/src/share/classes/javax/script/ScriptEngineFactory.java index 9fc08a92bbd..46b56ef66fc 100644 --- a/jdk/src/share/classes/javax/script/ScriptEngineFactory.java +++ b/jdk/src/share/classes/javax/script/ScriptEngineFactory.java @@ -152,12 +152,11 @@ public interface ScriptEngineFactory { * ret += "." + m + "("; * for (int i = 0; i < args.length; i++) { * ret += args[i]; - * if (i == args.length - 1) { - * ret += ")"; - * } else { + * if (i < args.length - 1) { * ret += ","; * } * } + * ret += ")"; * return ret; * } *