Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8147605

Significant misinformation about argument order in "Using Java from Scripts" guide

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 8
    • docs
    • None
    • generic
    • generic


      there is a significant error in the page at http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/prog_guide/javascript.html#A1147269

      The sentence:

      "Whichever syntax you choose, if you need to invoke a constructor with arguments, you can specify the arguments after the implementation object or function.”

      should instead read:

      "Whichever syntax you choose, if you need to invoke a constructor with arguments, you can specify the arguments before the implementation object or function.”

      that is "arguments after" becomes "arguments before". This was reported when a user got misled; see http://stackoverflow.com/questions/34861880/extending-an-abstract-sam-class-with-parameters-in-nashorn

            rgallard Raymond Gallardo
            attila Attila Szegedi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: