test/hotspot/jtreg/runtime/SharedArchiveFile/BootAppendTests.java
changeset 50206 adec398d9051
parent 49931 840e26123940
child 50679 58dac477766c
equal deleted inserted replaced
50205:95ba3a1dc2b2 50206:adec398d9051
   113                                  "-Xbootclasspath/a:" + bootAppendJar,
   113                                  "-Xbootclasspath/a:" + bootAppendJar,
   114                                  "-cp", appJar,
   114                                  "-cp", appJar,
   115                                  "-XX:SharedClassListFile=" + classlist.getPath());
   115                                  "-XX:SharedClassListFile=" + classlist.getPath());
   116         // Make sure all the classes were successfully archived.
   116         // Make sure all the classes were successfully archived.
   117         for (String archiveClass : ARCHIVE_CLASSES) {
   117         for (String archiveClass : ARCHIVE_CLASSES) {
   118             out.shouldNotContain("Preload Warning: Cannot find " + archiveClass);
   118             String msg = "Preload Warning: Cannot find " + archiveClass;
       
   119             if (archiveClass.equals(BOOT_APPEND_MODULE_CLASS)) {
       
   120                 // We shouldn't archive a class in the appended boot class path that
       
   121                 // are the java.desktop module. Such a class cannot be loaded
       
   122                 // at runtime anyway.
       
   123                 out.shouldContain(msg);
       
   124             } else {
       
   125                 out.shouldNotContain(msg);
       
   126             }
   119         }
   127         }
   120     }
   128     }
   121 
   129 
   122     // Test #1: If a class on -Xbootclasspath/a is from a package defined in
   130     // Test #1: If a class on -Xbootclasspath/a is from a package defined in
   123     //          bootmodules, the class is not loaded at runtime.
   131     //          bootmodules, the class is not loaded at runtime.