Skip to content

Commit

Permalink
svm: improve comment about Proxy class initialization side effects on…
Browse files Browse the repository at this point in the history
… JDK 19
  • Loading branch information
zapster committed Jul 25, 2022
1 parent 759ed31 commit e77bfbf
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,10 @@ final class EarlyClassInitializerAnalysis {
boolean canInitializeWithoutSideEffects(Class<?> clazz, Set<Class<?>> existingAnalyzedClasses) {
if (JavaVersionUtil.JAVA_SPEC >= 19 && Proxy.isProxyClass(clazz)) {
/*
* Proxy classes are no longer side-effect free in JDK 19 wrt this analysis. They are
* still safe to initialize at build time. (GR-40009)
* The checks below consider proxy class initialization as of JDK 19 to have side
* effects because it accesses Class.classLoader and System.allowSecurityManager, but
* these are not actual side effects, so we override these checks for proxy classes so
* that they can still be initialized at build time. (GR-40009)
*/
return true;
}
Expand Down

0 comments on commit e77bfbf

Please sign in to comment.