equal
deleted
inserted
replaced
220 // Never trust strangely unstable finals: System.out, etc. |
220 // Never trust strangely unstable finals: System.out, etc. |
221 return false; |
221 return false; |
222 // Even if general trusting is disabled, trust system-built closures in these packages. |
222 // Even if general trusting is disabled, trust system-built closures in these packages. |
223 if (holder->is_in_package("java/lang/invoke") || holder->is_in_package("sun/invoke")) |
223 if (holder->is_in_package("java/lang/invoke") || holder->is_in_package("sun/invoke")) |
224 return true; |
224 return true; |
225 // Trust VM anonymous classes. They are private API (sun.misc.Unsafe) and can't be serialized, |
225 // Trust VM unsafe anonymous classes. They are private API (jdk.internal.misc.Unsafe) |
226 // so there is no hacking of finals going on with them. |
226 // and can't be serialized, so there is no hacking of finals going on with them. |
227 if (holder->is_anonymous()) |
227 if (holder->is_unsafe_anonymous()) |
228 return true; |
228 return true; |
229 // Trust final fields in all boxed classes |
229 // Trust final fields in all boxed classes |
230 if (holder->is_box_klass()) |
230 if (holder->is_box_klass()) |
231 return true; |
231 return true; |
232 // Trust final fields in String |
232 // Trust final fields in String |