JDK-8154173 : Some serviceability/tmtools/jstack/* and serviceability/tmtools/jstat/* test fail since package jdk.internal.misc is not visible
  • Type: Bug
  • Component: core-svc
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2016-04-13
  • Updated: 2016-04-14
  • Resolved: 2016-04-14
Related Reports
Duplicate :  
Description
Affected tests:
serviceability/tmtools/jstack/TraveledLockTest.java
serviceability/tmtools/jstack/WaitNotifyThreadTest.java
serviceability/tmtools/jstat/GcCauseTest01.java
serviceability/tmtools/jstat/GcCauseTest03.java

results in the following compilation error

<base-dir>/j2se_jdk/test/lib/share/classes/jdk/test/lib/Utils.java:51: error: Unsafe is not visible because package jdk.internal.misc is not visible
import jdk.internal.misc.Unsafe;
                        ^
<base-dir>/j2se_jdk/test/lib/share/classes/jdk/test/lib/Utils.java:86: error: cannot find symbol
    private static Unsafe unsafe = null;
                   ^
  symbol:   class Unsafe
  location: class Utils
<base-dir>/j2se_jdk/test/lib/share/classes/jdk/test/lib/Utils.java:375: error: cannot find symbol
    public static synchronized Unsafe getUnsafe() {
                               ^
  symbol:   class Unsafe
  location: class Utils
<base-dir>/j2se_jdk/test/lib/share/classes/jdk/test/lib/Utils.java:378: error: cannot find symbol
                Field f = Unsafe.class.getDeclaredField("theUnsafe");
                          ^
  symbol:   class Unsafe
  location: class Utils
/export/local/aurora/CommonData/j2se_jdk/test/lib/share/classes/jdk/test/lib/Utils.java:380: error: cannot find symbol
                unsafe = (Unsafe) f.get(null);
                          ^
  symbol:   class Unsafe
  location: class Utils
5 errors
result: Failed. Compilation failed: Compilation failed

test result: Failed. Compilation failed: Compilation failed