< prev index next >
src/hotspot/share/ci/ciField.cpp
Print this page
rev 58565 : 8238358: Implementation of JEP 371: Hidden Classes
Reviewed-by: duke
Contributed-by: mandy.chung@oracle.com, lois.foltan@oracle.com, david.holmes@oracle.com, harold.seigel@oracle.com, serguei.spitsyn@oracle.com, alex.buckley@oracle.com, jamsheed.c.m@oracle.com
*** 221,233 ****
// Even if general trusting is disabled, trust system-built closures in these packages.
if (holder->is_in_package("java/lang/invoke") || holder->is_in_package("sun/invoke") ||
holder->is_in_package("jdk/internal/foreign") || holder->is_in_package("jdk/incubator/foreign") ||
holder->is_in_package("java/lang"))
return true;
! // Trust VM unsafe anonymous classes. They are private API (jdk.internal.misc.Unsafe)
! // and can't be serialized, so there is no hacking of finals going on with them.
! if (holder->is_unsafe_anonymous())
return true;
// Trust final fields in all boxed classes
if (holder->is_box_klass())
return true;
// Trust final fields in String
--- 221,234 ----
// Even if general trusting is disabled, trust system-built closures in these packages.
if (holder->is_in_package("java/lang/invoke") || holder->is_in_package("sun/invoke") ||
holder->is_in_package("jdk/internal/foreign") || holder->is_in_package("jdk/incubator/foreign") ||
holder->is_in_package("java/lang"))
return true;
! // Trust VM hidden and unsafe anonymous classes. They are created via Lookup.defineClass or
! // the private API (jdk.internal.misc.Unsafe) and can't be serialized, so there is no hacking
! // of finals going on with them.
! if (holder->is_hidden() || holder->is_unsafe_anonymous())
return true;
// Trust final fields in all boxed classes
if (holder->is_box_klass())
return true;
// Trust final fields in String
< prev index next >