File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
src/java.base/share/classes/java/lang Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -3820,12 +3820,13 @@ public boolean isRecord() {
38203820 // Fetches the factory for reflective objects
38213821 @ SuppressWarnings ("removal" )
38223822 private static ReflectionFactory getReflectionFactory () {
3823- if (reflectionFactory == null ) {
3824- reflectionFactory =
3825- java .security .AccessController .doPrivileged
3826- (new ReflectionFactory .GetReflectionFactoryAction ());
3823+ var factory = reflectionFactory ;
3824+ if (factory != null ) {
3825+ return factory ;
38273826 }
3828- return reflectionFactory ;
3827+ return reflectionFactory =
3828+ java .security .AccessController .doPrivileged
3829+ (new ReflectionFactory .GetReflectionFactoryAction ());
38293830 }
38303831 private static ReflectionFactory reflectionFactory ;
38313832
You can’t perform that action at this time.
0 commit comments