changeset 55136:7272e7c5164b

8219378: Ensure ReflectionFactory.langReflectAccess is initialized correctly Reviewed-by: rriggs, alanb, mchung Contributed-by: andrew_m_leonard@uk.ibm.com
author aleonard
date Tue, 19 Feb 2019 16:13:05 +0000
parents c216c40ba47b
children 03924ad3f4d0
files src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java	Tue Feb 26 10:39:28 2019 -0500
+++ b/src/java.base/share/classes/jdk/internal/reflect/ReflectionFactory.java	Tue Feb 19 16:13:05 2019 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -175,7 +175,7 @@
     public FieldAccessor newFieldAccessor(Field field, boolean override) {
         checkInitted();
 
-        Field root = langReflectAccess.getRoot(field);
+        Field root = langReflectAccess().getRoot(field);
         if (root != null) {
             // FieldAccessor will use the root unless the modifiers have
             // been overrridden
@@ -197,7 +197,7 @@
         }
 
         // use the root Method that will not cache caller class
-        Method root = langReflectAccess.getRoot(method);
+        Method root = langReflectAccess().getRoot(method);
         if (root != null) {
             method = root;
         }
@@ -233,7 +233,7 @@
         }
 
         // use the root Constructor that will not cache caller class
-        Constructor<?> root = langReflectAccess.getRoot(c);
+        Constructor<?> root = langReflectAccess().getRoot(c);
         if (root != null) {
             c = root;
         }