7187144: JavaDoc for ScriptEngineFactory.getProgram() contains an error
authorsundar
Thu, 11 Jul 2013 18:50:25 +0530
changeset 18803 c2fcefc8f0da
parent 18802 68564211d16b
child 18804 8561f2098727
7187144: JavaDoc for ScriptEngineFactory.getProgram() contains an error Reviewed-by: mcimadamore, jlaskey, hannesw, attila
jdk/src/share/classes/javax/script/ScriptEngineFactory.java
--- a/jdk/src/share/classes/javax/script/ScriptEngineFactory.java	Thu Jul 11 13:07:47 2013 +0200
+++ b/jdk/src/share/classes/javax/script/ScriptEngineFactory.java	Thu Jul 11 18:50:25 2013 +0530
@@ -196,18 +196,17 @@
 
 
     /**
-     * Returns A valid scripting language executable progam with given statements.
+     * Returns a valid scripting language executable progam with given statements.
      * For instance an implementation for a PHP engine might be:
      * <p>
      * <pre>{@code
      * public String getProgram(String... statements) {
-     *      $retval = "<?\n";
+     *      String retval = "<?\n";
      *      int len = statements.length;
      *      for (int i = 0; i < len; i++) {
-     *          $retval += statements[i] + ";\n";
+     *          retval += statements[i] + ";\n";
      *      }
-     *      $retval += "?>";
-     *
+     *      return retval += "?>";
      * }
      * }</pre>
      *