Mercurial > hg > truffle
diff src/share/vm/classfile/classFileParser.cpp @ 17891:b6a2ba7d3ea7 hs25.20-b11
Merge
author | amurillo |
---|---|
date | Thu, 17 Apr 2014 16:09:07 -0700 |
parents | a18dafb24f80 7e6c20c85ccf |
children | 366c198c896d 364b73402247 |
line wrap: on
line diff
--- a/src/share/vm/classfile/classFileParser.cpp Wed Apr 16 12:32:23 2014 -0700 +++ b/src/share/vm/classfile/classFileParser.cpp Thu Apr 17 16:09:07 2014 -0700 @@ -3751,18 +3751,24 @@ Exceptions::fthrow( THREAD_AND_LOCATION, vmSymbols::java_lang_UnsupportedClassVersionError(), - "Unsupported major.minor version %u.%u", + "Unsupported class file version %u.%u, " + "this version of the Java Runtime only recognizes class file versions up to %u.%u", major_version, - minor_version); + minor_version, + JAVA_MAX_SUPPORTED_VERSION, + JAVA_MAX_SUPPORTED_MINOR_VERSION); } else { ResourceMark rm(THREAD); Exceptions::fthrow( THREAD_AND_LOCATION, vmSymbols::java_lang_UnsupportedClassVersionError(), - "%s : Unsupported major.minor version %u.%u", + "%s has been compiled by a more recent version of the Java Runtime (class file version %u.%u), " + "this version of the Java Runtime only recognizes class file versions up to %u.%u", name->as_C_string(), major_version, - minor_version); + minor_version, + JAVA_MAX_SUPPORTED_VERSION, + JAVA_MAX_SUPPORTED_MINOR_VERSION); } return nullHandle; } @@ -4175,8 +4181,12 @@ clear_class_metadata(); - // deallocate the klass if already created. - MetadataFactory::free_metadata(_loader_data, _klass); + // deallocate the klass if already created. Don't directly deallocate, but add + // to the deallocate list so that the klass is removed from the CLD::_klasses list + // at a safepoint. + if (_klass != NULL) { + _loader_data->add_to_deallocate_list(_klass); + } _klass = NULL; }