Obsolete "Caution" in section 3.10 of "Using Java From Scripts"

XMLWordPrintable

      The section 3.10 of http://docs.oracle.com/javase/8/docs/technotes/guides/scripting/prog_guide/javascript.html contains a "Caution" saying:

      "Due to internal performance optimizations of string operations, JavaScript strings are not always necessarily of type java.lang.String, but they are of type java.lang.CharSequence. If you pass a JavaScript string to a Java method that expects a java.lang.String argument, then you will receive a Java String, but if the signature of your method is more generic (that is, if it expects a java.lang.Object parameter, for example), you can get an object of the private engine implementation class that implements CharSequence but is not a Java String object."

      This section is obsolete and should be removed. For some time now, we always ensure that internal JavaScript strings are converted to java.lang.String when exposed externally.

            Assignee:
            Raymond Gallardo
            Reporter:
            Attila Szegedi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: