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

nashorn should only use jdk8 apis in the compact1 profile

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1 P1
    • 8
    • None
    • 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

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

              Created:
              Updated:
              Resolved: