changeset 8557:6486309cfd95

7187144: JavaDoc for ScriptEngineFactory.getProgram() contains an error Reviewed-by: mcimadamore, jlaskey, hannesw, attila
author sundar
date Thu, 11 Jul 2013 18:50:25 +0530
parents 1d93f62de76e
children 696ca5bab7ef
files src/share/classes/javax/script/ScriptEngineFactory.java
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/script/ScriptEngineFactory.java	Tue Jan 24 00:54:36 2017 +0000
+++ b/src/share/classes/javax/script/ScriptEngineFactory.java	Thu Jul 11 18:50:25 2013 +0530
@@ -195,18 +195,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>
      *