--- old/src/share/vm/ci/ciField.cpp 2015-10-26 13:32:43.917950690 +0300 +++ new/src/share/vm/ci/ciField.cpp 2015-10-26 13:32:43.881950861 +0300 @@ -177,7 +177,7 @@ "bootstrap classes must not create & cache unshared fields"); } -static bool trust_final_non_static_fields(ciInstanceKlass* holder) { +bool trust_final_non_static_fields(ciInstanceKlass* holder) { if (holder == NULL) return false; if (holder->name() == ciSymbol::java_lang_System()) @@ -190,6 +190,10 @@ // so there is no hacking of finals going on with them. if (holder->is_anonymous()) return true; + // Trust the non-serializable classes in java/util/concurrent/atomic + if (UseNewCode && holder->is_in_package("java/util/concurrent/atomic")) { + return !holder->is_subtype_of(CURRENT_ENV->Serializable_klass()); + } return TrustFinalNonStaticFields; }