< prev index next >

test/runtime/modules/PatchModule/PatchModuleDupModule.java

Print this page

        

*** 21,48 **** * questions. */ /* * @test ! * @summary Module system initialization exception results if a module is specificed twice to Xpatch. * @modules java.base/jdk.internal.misc * @library /testlibrary */ import jdk.test.lib.*; ! public class XpatchDupModule { // The module system initialization should generate an ExceptionInInitializerError ! // if -Xpatch is specified with the same module more than once. public static void main(String args[]) throws Exception { ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( ! "-Xpatch:module1=module1_dir", ! "-Xpatch:module1=module1_dir", "-version"); OutputAnalyzer output = new OutputAnalyzer(pb.start()); output.shouldContain("java.lang.ExceptionInInitializerError"); output.shouldHaveExitValue(1); } } - --- 21,47 ---- * questions. */ /* * @test ! * @summary Module system initialization exception results if a module is specificed twice to --patch-module. * @modules java.base/jdk.internal.misc * @library /testlibrary */ import jdk.test.lib.*; ! public class PatchModuleDupModule { // The module system initialization should generate an ExceptionInInitializerError ! // if --patch-module is specified with the same module more than once. public static void main(String args[]) throws Exception { ProcessBuilder pb = ProcessTools.createJavaProcessBuilder( ! "--patch-module=module1=module1_dir", ! "--patch-module=module1=module1_dir", "-version"); OutputAnalyzer output = new OutputAnalyzer(pb.start()); output.shouldContain("java.lang.ExceptionInInitializerError"); output.shouldHaveExitValue(1); } }
< prev index next >