< prev index next >

test/hotspot/jtreg/runtime/appcds/cacheObject/CheckArchivedModuleApp.java

Print this page

        

@@ -48,19 +48,23 @@
     private static void checkModuleDescriptors(boolean expectArchived) {
         Set<Module> modules = ModuleLayer.boot().modules();
         for (Module m : modules) {
             ModuleDescriptor md = m.getDescriptor();
             String name = md.name();
-            if (expectArchived && wb.isShared(md)) {
+            if (expectArchived) {
+                if (wb.isShared(md)) {
                 System.out.println(name + " is archived. Expected.");
-            } else if (!expectArchived && !wb.isShared(md)) {
-                System.out.println(name + " is not archived. Expected.");
-            } else if (expectArchived) {
+                } else {
                 throw new RuntimeException(
                         "FAILED. " + name + " is not archived. Expect archived.");
+                }
+            } else {
+                if (!wb.isShared(md)) {
+                    System.out.println(name + " is not archived. Expected.");
             } else {
                 throw new RuntimeException(
                         "FAILED. " + name + " is archived. Expect not archived.");
             }
         }
     }
+    }
 }
< prev index next >