changeset 50749:ad2dac9ef560 condy-folding

Automatic merge with jep-334
author mcimadamore
date Wed, 30 May 2018 20:00:23 +0200
parents a4c04fa88c1a 246b7535f8e9
children 9afb4b449a76
files src/java.base/share/classes/java/lang/invoke/constant/ConstantClassDesc.java
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/invoke/constant/ConstantClassDesc.java	Wed May 30 19:25:28 2018 +0200
+++ b/src/java.base/share/classes/java/lang/invoke/constant/ConstantClassDesc.java	Wed May 30 20:00:23 2018 +0200
@@ -75,10 +75,9 @@
             c = c.componentType();
 
         if (c.descriptorString().length() == 1)
-            return Class.forName(descriptorString(), true, lookup.lookupClass().getClassLoader());
+            return lookup.findClass(descriptorString());
         else {
-            Class<?> clazz = Class.forName(internalToBinary(dropFirstAndLastChar(c.descriptorString())),
-                                           true, lookup.lookupClass().getClassLoader());
+            Class<?> clazz = lookup.findClass(internalToBinary(dropFirstAndLastChar(c.descriptorString())));
             for (int i = 0; i < depth; i++)
                 clazz = Array.newInstance(clazz, 0).getClass();
             return clazz;