--- 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