equal
deleted
inserted
replaced
42 findClass(loader.getUnnamedModule(), "TestDriver"); |
42 findClass(loader.getUnnamedModule(), "TestDriver"); |
43 |
43 |
44 try { |
44 try { |
45 Class<?> c = findClass(m1, "p1.internal.B"); |
45 Class<?> c = findClass(m1, "p1.internal.B"); |
46 c.newInstance(); |
46 c.newInstance(); |
47 throw new RuntimeException(c.getName() + " is not exported to m2"); |
47 throw new RuntimeException(c.getName() + " should not be exported to m2"); |
48 } catch (IllegalAccessException e) {} |
48 } catch (IllegalAccessException e) {} |
49 } |
49 } |
50 |
50 |
51 static Class<?> findClass(Module module, String cn) { |
51 static Class<?> findClass(Module module, String cn) { |
52 Class<?> c = Class.forName(module, cn); |
52 Class<?> c = Class.forName(module, cn); |