This test throws an IllegalAccessError at runtime:
public class MainTest {
@Test public void test(@Mocked ProcessBuilder pb) throws IOException {
new Expectations() {{ pb.start(); result = null; }};
assertNull(m());
}
public static Process m() throws IOException {
return new ProcessBuilder("").start();
}
}
Stacktrace:
java.lang.IllegalAccessError: class java.lang.ProcessBuilder (in module java.base) cannot access class javax.print.PrintException (in module java.desktop) because module java.base does not read module java.desktop
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java)
at MainTest$1.<init>(MainTest.java:14)
at MainTest.test(MainTest.java:14)
jmockit 1.33
TestNG 6.9.10
Java 9 (build 177)
This test throws an
IllegalAccessError
at runtime:Stacktrace:
Related stackoverflow question: https://stackoverflow.com/q/45018360/829571
The text was updated successfully, but these errors were encountered: