hotspot/src/share/vm/classfile/classLoader.cpp
changeset 37418 ebb041956080
parent 37248 11a660dbbb8e
child 37490 fd089d3f8cb3
child 38133 78b95467b9f1
--- a/hotspot/src/share/vm/classfile/classLoader.cpp	Wed Apr 06 16:03:02 2016 +0200
+++ b/hotspot/src/share/vm/classfile/classLoader.cpp	Wed Apr 06 11:40:45 2016 -0700
@@ -233,6 +233,7 @@
   strcpy(copy, zip_name);
   _zip_name = copy;
   _is_boot_append = is_boot_append;
+  _multi_versioned = _unknown;
 }
 
 ClassPathZipEntry::~ClassPathZipEntry() {
@@ -330,13 +331,20 @@
 
 bool ClassPathZipEntry::is_multiple_versioned(TRAPS) {
   assert(DumpSharedSpaces, "called only at dump time");
+  if (_multi_versioned != _unknown) {
+    return (_multi_versioned == _yes) ? true : false;
+  }
   jint size;
-  char* buffer = (char*)open_entry("META-INF/MANIFEST.MF", &size, false, CHECK_false);
+  char* buffer = (char*)open_entry("META-INF/MANIFEST.MF", &size, true, CHECK_false);
   if (buffer != NULL) {
-    if (strstr(buffer, "Multi-Release: true") != NULL) {
+    char* p = buffer;
+    for ( ; *p; ++p) *p = tolower(*p);
+    if (strstr(buffer, "multi-release: true") != NULL) {
+      _multi_versioned = _yes;
       return true;
     }
   }
+  _multi_versioned = _no;
   return false;
 }
 #endif // INCLUDE_CDS