nashorn should only use jdk8 apis in the compact1 profile

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P1
    • 8
    • Affects Version/s: None
    • Component/s: core-libs
    • b115
    • generic
    • generic
    • Not verified

      For java applications targeted to run on the compact1 profile of jdk8 to use nashorn, nashorn must not itself use any JDK8 APIs that are not in compact1. A scan of nashorn.jar today using jdeps reveals the use of some APIs from the compact3 profile. This usage should be removed.

      jdeps -profile /d/jdk8/jre/lib/ext/nashorn.jar |grep compact3
      d:\jdk8\jre\lib\ext\nashorn.jar -> d:\jdk8\jre\lib\rt.jar (compact3, JDK internal API)
            -> java.lang.management compact3

      jdeps -profile -verbose:class /d/jdk8/jre/lib/ext/nashorn.jar |grep management
            -> java.lang.management.ManagementFactory compact3
            -> java.lang.management.MemoryPoolMXBean compact3
            -> java.lang.management.MemoryUsage compact3

      a quick scan of the nashorn sources reveals the usage is in
      src/jdk/nashorn/internal/ir/debug/ObjectSizeCalculator.java

            Assignee:
            Jim Laskey
            Reporter:
            Akhil Arora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: