test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File open Sdiff test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests

test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java

Print this page
rev 49650 : [mq]: module_path


  72         // case 1: load class in bootclasspath using app loader
  73         argsList.add("useAppLoader");
  74         String[] opts = new String[argsList.size()];
  75         opts = argsList.toArray(opts);
  76         TestCommon.run(opts).assertNormalExit("appLoader found method main");
  77 
  78         // case 2: load class in bootclasspath using boot loader
  79         argsList.remove(argsList.size() - 1);
  80         argsList.add("useBootLoader");
  81         opts = new String[argsList.size()];
  82         opts = argsList.toArray(opts);
  83         TestCommon.run(opts).assertNormalExit(EXPECTED_EXCEPTION);
  84 
  85         // case 3: load class in bootclasspath using app loader with '--limit-modules java.base'
  86         argsList.add(0, "--limit-modules");
  87         argsList.add(1, "java.base");
  88         argsList.remove(argsList.size() - 1);
  89         argsList.add("useAppLoader");
  90         opts = new String[argsList.size()];
  91         opts = argsList.toArray(opts);
  92         TestCommon.run(opts).assertNormalExit(EXPECTED_EXCEPTION);

  93 
  94         // case 4: load class in bootclasspath using boot loader with '--limit-modules java.base'
  95         argsList.remove(argsList.size() - 1);
  96         argsList.add("useBootLoader");
  97         opts = new String[argsList.size()];
  98         opts = argsList.toArray(opts);
  99         TestCommon.run(opts).assertNormalExit(EXPECTED_EXCEPTION);

 100     }
 101 }


  72         // case 1: load class in bootclasspath using app loader
  73         argsList.add("useAppLoader");
  74         String[] opts = new String[argsList.size()];
  75         opts = argsList.toArray(opts);
  76         TestCommon.run(opts).assertNormalExit("appLoader found method main");
  77 
  78         // case 2: load class in bootclasspath using boot loader
  79         argsList.remove(argsList.size() - 1);
  80         argsList.add("useBootLoader");
  81         opts = new String[argsList.size()];
  82         opts = argsList.toArray(opts);
  83         TestCommon.run(opts).assertNormalExit(EXPECTED_EXCEPTION);
  84 
  85         // case 3: load class in bootclasspath using app loader with '--limit-modules java.base'
  86         argsList.add(0, "--limit-modules");
  87         argsList.add(1, "java.base");
  88         argsList.remove(argsList.size() - 1);
  89         argsList.add("useAppLoader");
  90         opts = new String[argsList.size()];
  91         opts = argsList.toArray(opts);
  92         TestCommon.run(opts)
  93             .assertSilentlyDisabledCDS(0, EXPECTED_EXCEPTION);
  94 
  95         // case 4: load class in bootclasspath using boot loader with '--limit-modules java.base'
  96         argsList.remove(argsList.size() - 1);
  97         argsList.add("useBootLoader");
  98         opts = new String[argsList.size()];
  99         opts = argsList.toArray(opts);
 100         TestCommon.run(opts)
 101             .assertSilentlyDisabledCDS(0, EXPECTED_EXCEPTION);
 102     }
 103 }
test/hotspot/jtreg/runtime/appcds/jigsaw/classpathtests/EmptyClassInBootClassPath.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File