changeset 52903:9b2652a213e2 jep-334

renaming XXXRef -> XXXDesc and updating copyrights in tests
author vromero
date Sat, 20 Oct 2018 17:02:49 -0400
parents e4624753b153
children f2da31f2dc71 a8f1c7af59ba cb6d96ac7cdb db0e6d7525d4
files src/java.base/share/classes/com/sun/java/util/jar/pack/ConstantPool.java src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue003.java test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues001.java test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues002.java test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues003.java test/jdk/java/lang/constant/ClassDescTest.java test/jdk/java/lang/constant/CondyDescTest.java test/jdk/java/lang/constant/IndyDescTest.java test/jdk/java/lang/constant/MethodHandleDescTest.java test/jdk/java/lang/constant/MethodTypeDescTest.java test/jdk/java/lang/constant/SymbolicDescTest.java test/jdk/java/lang/constant/TestHelpers.java test/jdk/java/lang/constant/TypeDescriptorTest.java test/jdk/java/lang/constant/boottest/java.base/java/lang/constant/ConstantUtilsTest.java
diffstat 15 files changed, 190 insertions(+), 208 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/ConstantPool.java	Fri Oct 19 13:23:31 2018 -0400
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/ConstantPool.java	Sat Oct 20 17:02:49 2018 -0400
@@ -552,7 +552,7 @@
                 if (Utils.SORT_MEMBERS_DESCR_MAJOR)
                     // descRef is transmitted as UDELTA5; sort it first?
                     x = this.descRef.compareTo(that.descRef);
-                // Primary key is classRef.
+                // Primary key is classDesc.
                 if (x == 0)
                     x = this.classRef.compareTo(that.classRef);
                 if (x == 0)
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Fri Oct 19 13:23:31 2018 -0400
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Sat Oct 20 17:02:49 2018 -0400
@@ -2194,7 +2194,7 @@
                         }
                         buf[pc++] = (byte) origBC;
                         int coding = bc_initref.getInt();
-                        // Find the nth overloading of <init> in classRef.
+                        // Find the nth overloading of <init> in classDesc.
                         MemberEntry ref = pkg.cp.getOverloadingForIndex(CONSTANT_Methodref, classRef, "<init>", coding);
                         fixupBuf.addU2(pc, ref);
                         buf[pc+0] = buf[pc+1] = 0;
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue003.java	Fri Oct 19 13:23:31 2018 -0400
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValue/getvalue003.java	Sat Oct 20 17:02:49 2018 -0400
@@ -219,7 +219,7 @@
             val1    = debuggeeClass.getValue(field1);
             objRef  = (ObjectReference) val1;
 
-            log2("......getting the mirror of tested getvalue003aTestClass : ReferenceType classRef");
+            log2("......getting the mirror of tested getvalue003aTestClass : ReferenceType classDesc");
 
             classes   = vm.classesByName(testedClassName);
             classRef  = (ReferenceType) classes.get(0);
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues001.java	Fri Oct 19 13:23:31 2018 -0400
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues001.java	Sat Oct 20 17:02:49 2018 -0400
@@ -205,7 +205,7 @@
             val1    = debuggeeClass.getValue(field1);
             objRef  = (ObjectReference) val1;
 
-            log2("......getting the mirror of tested getvalues001aTestClass : ReferenceType classRef");
+            log2("......getting the mirror of tested getvalues001aTestClass : ReferenceType classDesc");
 
             classes      = vm.classesByName(testedClassName);
             testedClass  = (ReferenceType) classes.get(0);
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues002.java	Fri Oct 19 13:23:31 2018 -0400
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues002.java	Sat Oct 20 17:02:49 2018 -0400
@@ -205,7 +205,7 @@
             val1    = debuggeeClass.getValue(field1);
             objRef  = (ObjectReference) val1;
 
-            log2("......getting the mirror of tested getvalues002aTestClass : ReferenceType classRef");
+            log2("......getting the mirror of tested getvalues002aTestClass : ReferenceType classDesc");
 
             classes      = vm.classesByName(testedClassName);
             testedClass  = (ReferenceType) classes.get(0);
--- a/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues003.java	Fri Oct 19 13:23:31 2018 -0400
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jdi/ObjectReference/getValues/getvalues003.java	Sat Oct 20 17:02:49 2018 -0400
@@ -209,7 +209,7 @@
             val1    = debuggeeClass.getValue(field1);
             objRef  = (ObjectReference) val1;
 
-            log2("......getting the mirror of tested getvalues003aTestClass : ReferenceType classRef");
+            log2("......getting the mirror of tested getvalues003aTestClass : ReferenceType classDesc");
 
             classes      = vm.classesByName(testedClass1Name);
             testedClass  = (ReferenceType) classes.get(0);
--- a/test/jdk/java/lang/constant/ClassDescTest.java	Fri Oct 19 13:23:31 2018 -0400
+++ b/test/jdk/java/lang/constant/ClassDescTest.java	Sat Oct 20 17:02:49 2018 -0400
@@ -4,9 +4,7 @@
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
  *
  * This code is distributed in the hope that it will be useful, but WITHOUT
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -51,7 +49,7 @@
 @Test
 public class ClassDescTest extends SymbolicDescTest {
 
-    private void testClassRef(ClassDesc r) throws ReflectiveOperationException {
+    private void testClassDesc(ClassDesc r) throws ReflectiveOperationException {
         testSymbolicDesc(r);
 
         // Test descriptor accessor, factory, equals
@@ -72,8 +70,8 @@
         }
     }
 
-    private void testClassRef(ClassDesc r, Class<?> c) throws ReflectiveOperationException {
-        testClassRef(r);
+    private void testClassDesc(ClassDesc r, Class<?> c) throws ReflectiveOperationException {
+        testClassDesc(r);
 
         assertEquals(r.resolveConstantDesc(LOOKUP), c);
         assertEquals(c.describeConstable().orElseThrow(), r);
@@ -90,7 +88,7 @@
                     && ((f.getModifiers() & Modifier.PUBLIC) != 0)) {
                     ClassDesc cr = (ClassDesc) f.get(null);
                     Class c = cr.resolveConstantDesc(MethodHandles.lookup());
-                    testClassRef(cr, c);
+                    testClassDesc(cr, c);
                     ++tested;
                 }
             }
@@ -103,58 +101,58 @@
         assertTrue(tested > 0);
     }
 
-    public void testPrimitiveClassRef() throws ReflectiveOperationException {
+    public void testPrimitiveClassDesc() throws ReflectiveOperationException {
         for (Primitives p : Primitives.values()) {
-            List<ClassDesc> refs = List.of(ClassDesc.ofDescriptor(p.descriptor),
-                                           p.classRef,
+            List<ClassDesc> descs = List.of(ClassDesc.ofDescriptor(p.descriptor),
+                                           p.classDesc,
                                            (ClassDesc) p.clazz.describeConstable().orElseThrow());
-            for (ClassDesc c : refs) {
-                testClassRef(c, p.clazz);
+            for (ClassDesc c : descs) {
+                testClassDesc(c, p.clazz);
                 assertTrue(c.isPrimitive());
                 assertEquals(p.descriptor, c.descriptorString());
                 assertEquals(p.name, c.displayName());
-                refs.forEach(cc -> assertEquals(c, cc));
+                descs.forEach(cc -> assertEquals(c, cc));
                 if (p != Primitives.VOID) {
-                    testClassRef(c.arrayType(), p.arrayClass);
+                    testClassDesc(c.arrayType(), p.arrayClass);
                     assertEquals(c, ((ClassDesc) p.arrayClass.describeConstable().orElseThrow()).componentType());
-                    assertEquals(c, p.classRef.arrayType().componentType());
+                    assertEquals(c, p.classDesc.arrayType().componentType());
                 }
             }
 
             for (Primitives other : Primitives.values()) {
                 ClassDesc otherDescr = ClassDesc.ofDescriptor(other.descriptor);
                 if (p != other)
-                    refs.forEach(c -> assertNotEquals(c, otherDescr));
+                    descs.forEach(c -> assertNotEquals(c, otherDescr));
                 else
-                    refs.forEach(c -> assertEquals(c, otherDescr));
+                    descs.forEach(c -> assertEquals(c, otherDescr));
             }
         }
     }
 
-    public void testSimpleClassRef() throws ReflectiveOperationException {
+    public void testSimpleClassDesc() throws ReflectiveOperationException {
 
-        List<ClassDesc> stringClassRefs = Arrays.asList(ClassDesc.ofDescriptor("Ljava/lang/String;"),
+        List<ClassDesc> stringClassDescs = Arrays.asList(ClassDesc.ofDescriptor("Ljava/lang/String;"),
                                                         ClassDesc.of("java.lang", "String"),
                                                         ClassDesc.of("java.lang.String"),
                                                         ClassDesc.of("java.lang.String").arrayType().componentType(),
                                                         String.class.describeConstable().orElseThrow());
-        for (ClassDesc r : stringClassRefs) {
-            testClassRef(r, String.class);
+        for (ClassDesc r : stringClassDescs) {
+            testClassDesc(r, String.class);
             assertFalse(r.isPrimitive());
             assertEquals("Ljava/lang/String;", r.descriptorString());
             assertEquals("String", r.displayName());
             assertEquals(r.arrayType().resolveConstantDesc(LOOKUP), String[].class);
-            stringClassRefs.forEach(rr -> assertEquals(r, rr));
+            stringClassDescs.forEach(rr -> assertEquals(r, rr));
         }
 
-        testClassRef(ClassDesc.of("java.lang.String").arrayType(), String[].class);
-        testClassRef(ClassDesc.of("java.util.Map").inner("Entry"), Map.Entry.class);
+        testClassDesc(ClassDesc.of("java.lang.String").arrayType(), String[].class);
+        testClassDesc(ClassDesc.of("java.util.Map").inner("Entry"), Map.Entry.class);
 
-        ClassDesc thisClassRef = ClassDesc.ofDescriptor("LClassDescTest;");
-        assertEquals(thisClassRef, ClassDesc.of("", "ClassDescTest"));
-        assertEquals(thisClassRef, ClassDesc.of("ClassDescTest"));
-        assertEquals(thisClassRef.displayName(), "ClassDescTest");
-        testClassRef(thisClassRef, ClassDescTest.class);
+        ClassDesc thisClassDesc = ClassDesc.ofDescriptor("LClassDescTest;");
+        assertEquals(thisClassDesc, ClassDesc.of("", "ClassDescTest"));
+        assertEquals(thisClassDesc, ClassDesc.of("ClassDescTest"));
+        assertEquals(thisClassDesc.displayName(), "ClassDescTest");
+        testClassDesc(thisClassDesc, ClassDescTest.class);
     }
 
     private void testBadPackageName(ClassDesc cr) {
@@ -187,15 +185,15 @@
         }
     }
 
-    public void testArrayClassRef() throws ReflectiveOperationException {
+    public void testArrayClassDesc() throws ReflectiveOperationException {
         for (String d : basicDescs) {
             ClassDesc a0 = ClassDesc.ofDescriptor(d);
             ClassDesc a1 = a0.arrayType();
             ClassDesc a2 = a1.arrayType();
 
-            testClassRef(a0);
-            testClassRef(a1);
-            testClassRef(a2);
+            testClassDesc(a0);
+            testClassDesc(a1);
+            testClassDesc(a2);
             assertFalse(a0.isArray());
             assertTrue(a1.isArray());
             assertTrue(a2.isArray());
@@ -224,7 +222,7 @@
         }
     }
 
-    public void testBadClassRefs() {
+    public void testBadClassDescs() {
         List<String> badDescriptors = List.of("II", "I;", "Q", "L",
                                               "java.lang.String", "[]", "Ljava/lang/String",
                                               "Ljava.lang.String;", "java/lang/String");
--- a/test/jdk/java/lang/constant/CondyDescTest.java	Fri Oct 19 13:23:31 2018 -0400
+++ b/test/jdk/java/lang/constant/CondyDescTest.java	Sat Oct 20 17:02:49 2018 -0400
@@ -4,9 +4,7 @@
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
  *
  * This code is distributed in the hope that it will be useful, but WITHOUT
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -65,13 +63,13 @@
         assertEquals(r.resolveConstantDesc(LOOKUP), c);
     }
 
-    private void testVarHandleRef(DynamicConstantDesc<VarHandle> r, VarHandle vh) throws ReflectiveOperationException  {
+    private void testVarHandleDesc(DynamicConstantDesc<VarHandle> r, VarHandle vh) throws ReflectiveOperationException  {
         testSymbolicDesc(r);
         assertEquals(r.resolveConstantDesc(LOOKUP), vh);
         assertEquals(vh.describeConstable().orElseThrow(), r);
     }
 
-    private static<E extends Enum<E>> void testEnumRef(EnumDesc<E> r, E e) throws ReflectiveOperationException {
+    private static<E extends Enum<E>> void testEnumDesc(EnumDesc<E> r, E e) throws ReflectiveOperationException {
         testSymbolicDesc(r);
 
         assertEquals(r, EnumDesc.of(r.constantType(), r.constantName()));
@@ -89,9 +87,9 @@
     }
 
     public void testDynamicConstant() throws ReflectiveOperationException {
-        DirectMethodHandleDesc bsmRef = ConstantDescs.ofConstantBootstrap(ClassDesc.of("CondyDescTest"), "concatBSM",
+        DirectMethodHandleDesc bsmDesc = ConstantDescs.ofConstantBootstrap(ClassDesc.of("CondyDescTest"), "concatBSM",
                                                                             CD_String, CD_String, CD_String);
-        DynamicConstantDesc<String> r = DynamicConstantDesc.of(bsmRef, "foo", "bar");
+        DynamicConstantDesc<String> r = DynamicConstantDesc.of(bsmDesc, "foo", "bar");
         testDCR(r, "foobar");
     }
 
@@ -104,21 +102,21 @@
                                            format.resolveConstantDesc(LOOKUP), "%s%s", "moo", "cow");
         assertEquals(s, "moocow");
 
-        DynamicConstantDesc<String> ref = DynamicConstantDesc.of(invoker, format, "%s%s", "moo", "cow");
-        testDCR(ref, "moocow");
+        DynamicConstantDesc<String> desc = DynamicConstantDesc.of(invoker, format, "%s%s", "moo", "cow");
+        testDCR(desc, "moocow");
 
-        DynamicConstantDesc<String> ref2 = DynamicConstantDesc.of(invoker, format, "%s%s", ref, "cow");
-        testDCR(ref2, "moocowcow");
+        DynamicConstantDesc<String> desc2 = DynamicConstantDesc.of(invoker, format, "%s%s", desc, "cow");
+        testDCR(desc2, "moocowcow");
     }
 
     enum MyEnum { A, B, C }
 
-    public void testEnumRef() throws ReflectiveOperationException {
+    public void testEnumDesc() throws ReflectiveOperationException {
         ClassDesc enumClass = ClassDesc.of("CondyDescTest").inner("MyEnum");
 
-        testEnumRef(EnumDesc.of(enumClass, "A"), MyEnum.A);
-        testEnumRef(EnumDesc.of(enumClass, "B"), MyEnum.B);
-        testEnumRef(EnumDesc.of(enumClass, "C"), MyEnum.C);
+        testEnumDesc(EnumDesc.of(enumClass, "A"), MyEnum.A);
+        testEnumDesc(EnumDesc.of(enumClass, "B"), MyEnum.B);
+        testEnumDesc(EnumDesc.of(enumClass, "C"), MyEnum.C);
     }
 
     static class MyClass {
@@ -133,7 +131,7 @@
         // static varHandle
         VarHandleDesc vhc = VarHandleDesc.ofStaticField(testClass, "sf", CD_int);
         VarHandle varHandle = LOOKUP.findStaticVarHandle(MyClass.class, "sf", int.class);
-        testVarHandleRef(vhc, varHandle);
+        testVarHandleDesc(vhc, varHandle);
 
         assertEquals(varHandle.varType(), int.class);
         varHandle.set(8);
@@ -143,7 +141,7 @@
         // static varHandle
         vhc = VarHandleDesc.ofField(testClass, "f", CD_int);
         varHandle = LOOKUP.findVarHandle(MyClass.class, "f", int.class);
-        testVarHandleRef(vhc, varHandle);
+        testVarHandleDesc(vhc, varHandle);
 
         assertEquals(varHandle.varType(), int.class);
         varHandle.set(instance, 9);
@@ -152,7 +150,7 @@
 
         vhc = VarHandleDesc.ofArray(CD_int.arrayType());
         varHandle = MethodHandles.arrayElementVarHandle(int[].class);
-        testVarHandleRef(vhc, varHandle);
+        testVarHandleDesc(vhc, varHandle);
 
         int[] ints = new int[3];
         varHandle.set(ints, 0, 1);
--- a/test/jdk/java/lang/constant/IndyDescTest.java	Fri Oct 19 13:23:31 2018 -0400
+++ b/test/jdk/java/lang/constant/IndyDescTest.java	Sat Oct 20 17:02:49 2018 -0400
@@ -4,9 +4,7 @@
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
  *
  * This code is distributed in the hope that it will be useful, but WITHOUT
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -56,7 +54,7 @@
             return new ConstantCallSite(MethodHandles.constant(String.class, (String) args[0]));
     }
 
-    public void testIndyRef() throws Throwable {
+    public void testIndyDesc() throws Throwable {
         ClassDesc c = ClassDesc.of("IndyDescTest");
         MethodTypeDesc mt = MethodTypeDesc.of(CD_CallSite, CD_MethodHandles_Lookup, CD_String, CD_MethodType, CD_Object.arrayType());
         DirectMethodHandleDesc mh = MethodHandleDesc.of(DirectMethodHandleDesc.Kind.STATIC, c, "bootstrap", mt);
--- a/test/jdk/java/lang/constant/MethodHandleDescTest.java	Fri Oct 19 13:23:31 2018 -0400
+++ b/test/jdk/java/lang/constant/MethodHandleDescTest.java	Sat Oct 20 17:02:49 2018 -0400
@@ -4,9 +4,7 @@
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
  *
  * This code is distributed in the hope that it will be useful, but WITHOUT
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -81,7 +79,7 @@
         assertEquals(ia.getReferenceKind(), ib.getReferenceKind());
     }
 
-    private void testMethodHandleRef(MethodHandleDesc r) throws ReflectiveOperationException {
+    private void testMethodHandleDesc(MethodHandleDesc r) throws ReflectiveOperationException {
         if (r instanceof DirectMethodHandleDesc) {
             testSymbolicDesc(r);
 
@@ -93,8 +91,8 @@
         }
     }
 
-    private void testMethodHandleRef(MethodHandleDesc r, MethodHandle mh) throws ReflectiveOperationException {
-        testMethodHandleRef(r);
+    private void testMethodHandleDesc(MethodHandleDesc r, MethodHandle mh) throws ReflectiveOperationException {
+        testMethodHandleDesc(r);
 
         assertMHEquals(r.resolveConstantDesc(LOOKUP), mh);
         assertEquals(mh.describeConstable().orElseThrow(), r);
@@ -109,15 +107,15 @@
     }
 
     public void testSimpleMHs() throws ReflectiveOperationException {
-        testMethodHandleRef(MethodHandleDesc.of(Kind.VIRTUAL, CD_String, "isEmpty", "()Z"),
+        testMethodHandleDesc(MethodHandleDesc.of(Kind.VIRTUAL, CD_String, "isEmpty", "()Z"),
                             LOOKUP.findVirtual(String.class, "isEmpty", MethodType.fromMethodDescriptorString("()Z", null)));
-        testMethodHandleRef(MethodHandleDesc.of(Kind.STATIC, CD_String, "format", CD_String, CD_String, CD_Object.arrayType()),
+        testMethodHandleDesc(MethodHandleDesc.of(Kind.STATIC, CD_String, "format", CD_String, CD_String, CD_Object.arrayType()),
                             LOOKUP.findStatic(String.class, "format", MethodType.methodType(String.class, String.class, Object[].class)));
-        testMethodHandleRef(MethodHandleDesc.of(Kind.INTERFACE_VIRTUAL, CD_List, "isEmpty", "()Z"),
+        testMethodHandleDesc(MethodHandleDesc.of(Kind.INTERFACE_VIRTUAL, CD_List, "isEmpty", "()Z"),
                             LOOKUP.findVirtual(List.class, "isEmpty", MethodType.fromMethodDescriptorString("()Z", null)));
-        testMethodHandleRef(MethodHandleDesc.of(Kind.CONSTRUCTOR, ClassDesc.of("java.util.ArrayList"), "<init>", CD_void),
+        testMethodHandleDesc(MethodHandleDesc.of(Kind.CONSTRUCTOR, ClassDesc.of("java.util.ArrayList"), "<init>", CD_void),
                             LOOKUP.findConstructor(ArrayList.class, MethodType.methodType(void.class)));
-        testMethodHandleRef(MethodHandleDesc.ofConstructor(ClassDesc.of("java.util.ArrayList")),
+        testMethodHandleDesc(MethodHandleDesc.ofConstructor(ClassDesc.of("java.util.ArrayList")),
                             LOOKUP.findConstructor(ArrayList.class, MethodType.methodType(void.class)));
         // bad constructor non void return type
         try {
@@ -132,7 +130,7 @@
         MethodHandleDesc mhr = MethodHandleDesc.of(Kind.STATIC, ClassDesc.of("java.lang.Integer"), "valueOf",
                                                    MethodTypeDesc.of(CD_Integer, CD_int));
         MethodHandleDesc takesInteger = mhr.asType(MethodTypeDesc.of(CD_Integer, CD_Integer));
-        testMethodHandleRef(takesInteger);
+        testMethodHandleDesc(takesInteger);
         MethodHandle mh1 = takesInteger.resolveConstantDesc(LOOKUP);
         assertEquals((Integer) 3, (Integer) mh1.invokeExact((Integer) 3));
         assertEquals(takesInteger.toString(), "MethodHandleDesc[STATIC/Integer::valueOf(int)Integer].asType(Integer)Integer");
@@ -144,7 +142,7 @@
         catch (WrongMethodTypeException ignored) { }
 
         MethodHandleDesc takesInt = takesInteger.asType(MethodTypeDesc.of(CD_Integer, CD_int));
-        testMethodHandleRef(takesInt);
+        testMethodHandleDesc(takesInt);
         MethodHandle mh2 = takesInt.resolveConstantDesc(LOOKUP);
         assertEquals((Integer) 3, (Integer) mh2.invokeExact(3));
 
@@ -160,89 +158,89 @@
         // @@@ Test intrinsification of adapted MH
     }
 
-    public void testMethodHandleRef() throws Throwable {
-        MethodHandleDesc ctorRef = MethodHandleDesc.of(Kind.CONSTRUCTOR, testClass, "<ignored!>", CD_void);
-        MethodHandleDesc staticMethodRef = MethodHandleDesc.of(Kind.STATIC, testClass, "sm", "(I)I");
-        MethodHandleDesc staticIMethodRef = MethodHandleDesc.of(Kind.INTERFACE_STATIC, testInterface, "sm", "(I)I");
-        MethodHandleDesc instanceMethodRef = MethodHandleDesc.of(Kind.VIRTUAL, testClass, "m", "(I)I");
-        MethodHandleDesc instanceIMethodRef = MethodHandleDesc.of(Kind.INTERFACE_VIRTUAL, testInterface, "m", "(I)I");
-        MethodHandleDesc superMethodRef = MethodHandleDesc.of(Kind.SPECIAL, testSuperclass, "m", "(I)I");
-        MethodHandleDesc superIMethodRef = MethodHandleDesc.of(Kind.INTERFACE_SPECIAL, testInterface, "m", "(I)I");
-        MethodHandleDesc privateMethodRef = MethodHandleDesc.of(Kind.SPECIAL, testClass, "pm", "(I)I");
-        MethodHandleDesc privateIMethodRef = MethodHandleDesc.of(Kind.INTERFACE_SPECIAL, testInterface, "pm", "(I)I");
-        MethodHandleDesc privateStaticMethodRef = MethodHandleDesc.of(Kind.STATIC, testClass, "psm", "(I)I");
-        MethodHandleDesc privateStaticIMethodRef = MethodHandleDesc.of(Kind.INTERFACE_STATIC, testInterface, "psm", "(I)I");
+    public void testMethodHandleDesc() throws Throwable {
+        MethodHandleDesc ctorDesc = MethodHandleDesc.of(Kind.CONSTRUCTOR, testClass, "<ignored!>", CD_void);
+        MethodHandleDesc staticMethodDesc = MethodHandleDesc.of(Kind.STATIC, testClass, "sm", "(I)I");
+        MethodHandleDesc staticIMethodDesc = MethodHandleDesc.of(Kind.INTERFACE_STATIC, testInterface, "sm", "(I)I");
+        MethodHandleDesc instanceMethodDesc = MethodHandleDesc.of(Kind.VIRTUAL, testClass, "m", "(I)I");
+        MethodHandleDesc instanceIMethodDesc = MethodHandleDesc.of(Kind.INTERFACE_VIRTUAL, testInterface, "m", "(I)I");
+        MethodHandleDesc superMethodDesc = MethodHandleDesc.of(Kind.SPECIAL, testSuperclass, "m", "(I)I");
+        MethodHandleDesc superIMethodDesc = MethodHandleDesc.of(Kind.INTERFACE_SPECIAL, testInterface, "m", "(I)I");
+        MethodHandleDesc privateMethodDesc = MethodHandleDesc.of(Kind.SPECIAL, testClass, "pm", "(I)I");
+        MethodHandleDesc privateIMethodDesc = MethodHandleDesc.of(Kind.INTERFACE_SPECIAL, testInterface, "pm", "(I)I");
+        MethodHandleDesc privateStaticMethodDesc = MethodHandleDesc.of(Kind.STATIC, testClass, "psm", "(I)I");
+        MethodHandleDesc privateStaticIMethodDesc = MethodHandleDesc.of(Kind.INTERFACE_STATIC, testInterface, "psm", "(I)I");
 
-        for (MethodHandleDesc r : List.of(ctorRef, staticMethodRef, staticIMethodRef, instanceMethodRef, instanceIMethodRef))
-            testMethodHandleRef(r);
+        for (MethodHandleDesc r : List.of(ctorDesc, staticMethodDesc, staticIMethodDesc, instanceMethodDesc, instanceIMethodDesc))
+            testMethodHandleDesc(r);
 
-        TestHelpers.TestClass instance = (TestHelpers.TestClass) ctorRef.resolveConstantDesc(LOOKUP).invokeExact();
-        TestHelpers.TestClass instance2 = (TestHelpers.TestClass) ctorRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact();
+        TestHelpers.TestClass instance = (TestHelpers.TestClass) ctorDesc.resolveConstantDesc(LOOKUP).invokeExact();
+        TestHelpers.TestClass instance2 = (TestHelpers.TestClass) ctorDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact();
         TestHelpers.TestInterface instanceI = instance;
 
         assertNotSame(instance, instance2);
 
-        assertEquals(5, (int) staticMethodRef.resolveConstantDesc(LOOKUP).invokeExact(5));
-        assertEquals(5, (int) staticMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(5));
-        assertEquals(0, (int) staticIMethodRef.resolveConstantDesc(LOOKUP).invokeExact(5));
-        assertEquals(0, (int) staticIMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(5));
+        assertEquals(5, (int) staticMethodDesc.resolveConstantDesc(LOOKUP).invokeExact(5));
+        assertEquals(5, (int) staticMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(5));
+        assertEquals(0, (int) staticIMethodDesc.resolveConstantDesc(LOOKUP).invokeExact(5));
+        assertEquals(0, (int) staticIMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(5));
 
-        assertEquals(5, (int) instanceMethodRef.resolveConstantDesc(LOOKUP).invokeExact(instance, 5));
-        assertEquals(5, (int) instanceMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 5));
-        assertEquals(5, (int) instanceIMethodRef.resolveConstantDesc(LOOKUP).invokeExact(instanceI, 5));
-        assertEquals(5, (int) instanceIMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instanceI, 5));
+        assertEquals(5, (int) instanceMethodDesc.resolveConstantDesc(LOOKUP).invokeExact(instance, 5));
+        assertEquals(5, (int) instanceMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 5));
+        assertEquals(5, (int) instanceIMethodDesc.resolveConstantDesc(LOOKUP).invokeExact(instanceI, 5));
+        assertEquals(5, (int) instanceIMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instanceI, 5));
 
-        try { superMethodRef.resolveConstantDesc(LOOKUP); fail(); }
+        try { superMethodDesc.resolveConstantDesc(LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        assertEquals(-1, (int) superMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 5));
+        assertEquals(-1, (int) superMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 5));
 
-        try { superIMethodRef.resolveConstantDesc(LOOKUP); fail(); }
+        try { superIMethodDesc.resolveConstantDesc(LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        assertEquals(0, (int) superIMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 5));
+        assertEquals(0, (int) superIMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 5));
 
-        try { privateMethodRef.resolveConstantDesc(LOOKUP); fail(); }
+        try { privateMethodDesc.resolveConstantDesc(LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        assertEquals(5, (int) privateMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 5));
+        assertEquals(5, (int) privateMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 5));
 
-        try { privateIMethodRef.resolveConstantDesc(LOOKUP); fail(); }
+        try { privateIMethodDesc.resolveConstantDesc(LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        assertEquals(0, (int) privateIMethodRef.resolveConstantDesc(TestHelpers.TestInterface.LOOKUP).invokeExact(instanceI, 5));
-        assertEquals(0, (int) privateIMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invoke(instanceI, 5));
+        assertEquals(0, (int) privateIMethodDesc.resolveConstantDesc(TestHelpers.TestInterface.LOOKUP).invokeExact(instanceI, 5));
+        assertEquals(0, (int) privateIMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invoke(instanceI, 5));
 
-        try { privateStaticMethodRef.resolveConstantDesc(LOOKUP); fail(); }
+        try { privateStaticMethodDesc.resolveConstantDesc(LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        assertEquals(5, (int) privateStaticMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(5));
+        assertEquals(5, (int) privateStaticMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(5));
 
-        try { privateStaticIMethodRef.resolveConstantDesc(LOOKUP); fail(); }
+        try { privateStaticIMethodDesc.resolveConstantDesc(LOOKUP); fail(); }
         catch (IllegalAccessException e) { /* expected */ }
-        assertEquals(0, (int) privateStaticIMethodRef.resolveConstantDesc(TestHelpers.TestInterface.LOOKUP).invokeExact(5));
-        assertEquals(0, (int) privateStaticIMethodRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(5));
+        assertEquals(0, (int) privateStaticIMethodDesc.resolveConstantDesc(TestHelpers.TestInterface.LOOKUP).invokeExact(5));
+        assertEquals(0, (int) privateStaticIMethodDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(5));
 
-        MethodHandleDesc staticSetterRef = MethodHandleDesc.ofField(STATIC_SETTER, testClass, "sf", CD_int);
-        MethodHandleDesc staticGetterRef = MethodHandleDesc.ofField(STATIC_GETTER, testClass, "sf", CD_int);
-        MethodHandleDesc staticGetterIRef = MethodHandleDesc.ofField(STATIC_GETTER, testInterface, "sf", CD_int);
-        MethodHandleDesc setterRef = MethodHandleDesc.ofField(SETTER, testClass, "f", CD_int);
-        MethodHandleDesc getterRef = MethodHandleDesc.ofField(GETTER, testClass, "f", CD_int);
+        MethodHandleDesc staticSetterDesc = MethodHandleDesc.ofField(STATIC_SETTER, testClass, "sf", CD_int);
+        MethodHandleDesc staticGetterDesc = MethodHandleDesc.ofField(STATIC_GETTER, testClass, "sf", CD_int);
+        MethodHandleDesc staticGetterIDesc = MethodHandleDesc.ofField(STATIC_GETTER, testInterface, "sf", CD_int);
+        MethodHandleDesc setterDesc = MethodHandleDesc.ofField(SETTER, testClass, "f", CD_int);
+        MethodHandleDesc getterDesc = MethodHandleDesc.ofField(GETTER, testClass, "f", CD_int);
 
-        for (MethodHandleDesc r : List.of(staticSetterRef, staticGetterRef, staticGetterIRef, setterRef, getterRef))
-            testMethodHandleRef(r);
+        for (MethodHandleDesc r : List.of(staticSetterDesc, staticGetterDesc, staticGetterIDesc, setterDesc, getterDesc))
+            testMethodHandleDesc(r);
 
-        staticSetterRef.resolveConstantDesc(LOOKUP).invokeExact(6); assertEquals(TestHelpers.TestClass.sf, 6);
-        assertEquals(6, (int) staticGetterRef.resolveConstantDesc(LOOKUP).invokeExact());
-        assertEquals(6, (int) staticGetterRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact());
-        staticSetterRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(7); assertEquals(TestHelpers.TestClass.sf, 7);
-        assertEquals(7, (int) staticGetterRef.resolveConstantDesc(LOOKUP).invokeExact());
-        assertEquals(7, (int) staticGetterRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact());
+        staticSetterDesc.resolveConstantDesc(LOOKUP).invokeExact(6); assertEquals(TestHelpers.TestClass.sf, 6);
+        assertEquals(6, (int) staticGetterDesc.resolveConstantDesc(LOOKUP).invokeExact());
+        assertEquals(6, (int) staticGetterDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact());
+        staticSetterDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(7); assertEquals(TestHelpers.TestClass.sf, 7);
+        assertEquals(7, (int) staticGetterDesc.resolveConstantDesc(LOOKUP).invokeExact());
+        assertEquals(7, (int) staticGetterDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact());
 
-        assertEquals(3, (int) staticGetterIRef.resolveConstantDesc(LOOKUP).invokeExact());
-        assertEquals(3, (int) staticGetterIRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact());
+        assertEquals(3, (int) staticGetterIDesc.resolveConstantDesc(LOOKUP).invokeExact());
+        assertEquals(3, (int) staticGetterIDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact());
 
-        setterRef.resolveConstantDesc(LOOKUP).invokeExact(instance, 6); assertEquals(instance.f, 6);
-        assertEquals(6, (int) getterRef.resolveConstantDesc(LOOKUP).invokeExact(instance));
-        assertEquals(6, (int) getterRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance));
-        setterRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 7); assertEquals(instance.f, 7);
-        assertEquals(7, (int) getterRef.resolveConstantDesc(LOOKUP).invokeExact(instance));
-        assertEquals(7, (int) getterRef.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance));
+        setterDesc.resolveConstantDesc(LOOKUP).invokeExact(instance, 6); assertEquals(instance.f, 6);
+        assertEquals(6, (int) getterDesc.resolveConstantDesc(LOOKUP).invokeExact(instance));
+        assertEquals(6, (int) getterDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance));
+        setterDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance, 7); assertEquals(instance.f, 7);
+        assertEquals(7, (int) getterDesc.resolveConstantDesc(LOOKUP).invokeExact(instance));
+        assertEquals(7, (int) getterDesc.resolveConstantDesc(TestHelpers.TestClass.LOOKUP).invokeExact(instance));
     }
 
     private void assertBadArgs(Supplier<MethodHandleDesc> supplier, String s) {
@@ -282,7 +280,7 @@
                     && ((f.getModifiers() & Modifier.PUBLIC) != 0)) {
                     MethodHandleDesc r = (MethodHandleDesc) f.get(null);
                     MethodHandle m = r.resolveConstantDesc(MethodHandles.lookup());
-                    testMethodHandleRef(r, m);
+                    testMethodHandleDesc(r, m);
                     ++tested;
                 }
             }
--- a/test/jdk/java/lang/constant/MethodTypeDescTest.java	Fri Oct 19 13:23:31 2018 -0400
+++ b/test/jdk/java/lang/constant/MethodTypeDescTest.java	Sat Oct 20 17:02:49 2018 -0400
@@ -4,9 +4,7 @@
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
  *
  * This code is distributed in the hope that it will be useful, but WITHOUT
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -44,12 +42,12 @@
  * @test
  * @compile MethodTypeDescTest.java
  * @run testng MethodTypeDescTest
- * @summary unit tests for java.lang.constant.MethodTypeRef
+ * @summary unit tests for java.lang.constant.MethodTypeDesc
  */
 @Test
 public class MethodTypeDescTest extends SymbolicDescTest {
 
-    private void testMethodTypeRef(MethodTypeDesc r) throws ReflectiveOperationException {
+    private void testMethodTypeDesc(MethodTypeDesc r) throws ReflectiveOperationException {
         testSymbolicDesc(r);
 
         // Tests accessors (rType, pType, pCount, pList, pArray, descriptorString),
@@ -63,46 +61,46 @@
                                                                    .toArray(ClassDesc[]::new)));
     }
 
-    private void testMethodTypeRef(MethodTypeDesc r, MethodType mt) throws ReflectiveOperationException {
-        testMethodTypeRef(r);
+    private void testMethodTypeDesc(MethodTypeDesc r, MethodType mt) throws ReflectiveOperationException {
+        testMethodTypeDesc(r);
 
         assertEquals(r.resolveConstantDesc(LOOKUP), mt);
         assertEquals(mt.describeConstable().get(), r);
 
         assertEquals(r.descriptorString(), mt.toMethodDescriptorString());
         assertEquals(r.parameterCount(), mt.parameterCount());
-        assertEquals(r.parameterList(), mt.parameterList().stream().map(SymbolicDescTest::classToRef).collect(toList()));
-        assertEquals(r.parameterArray(), Stream.of(mt.parameterArray()).map(SymbolicDescTest::classToRef).toArray(ClassDesc[]::new));
+        assertEquals(r.parameterList(), mt.parameterList().stream().map(SymbolicDescTest::classToDesc).collect(toList()));
+        assertEquals(r.parameterArray(), Stream.of(mt.parameterArray()).map(SymbolicDescTest::classToDesc).toArray(ClassDesc[]::new));
         for (int i=0; i<r.parameterCount(); i++)
-            assertEquals(r.parameterType(i), classToRef(mt.parameterType(i)));
-        assertEquals(r.returnType(), classToRef(mt.returnType()));
+            assertEquals(r.parameterType(i), classToDesc(mt.parameterType(i)));
+        assertEquals(r.returnType(), classToDesc(mt.returnType()));
     }
 
     private void assertMethodType(ClassDesc returnType,
                                   ClassDesc... paramTypes) throws ReflectiveOperationException {
         String descriptor = Stream.of(paramTypes).map(ClassDesc::descriptorString).collect(joining("", "(", ")"))
                             + returnType.descriptorString();
-        MethodTypeDesc mtRef = MethodTypeDesc.of(returnType, paramTypes);
+        MethodTypeDesc mtDesc = MethodTypeDesc.of(returnType, paramTypes);
 
-        // MTRef accessors
-        assertEquals(descriptor, mtRef.descriptorString());
-        assertEquals(returnType, mtRef.returnType());
-        assertEquals(paramTypes, mtRef.parameterArray());
-        assertEquals(Arrays.asList(paramTypes), mtRef.parameterList());
-        assertEquals(paramTypes.length, mtRef.parameterCount());
+        // MTDesc accessors
+        assertEquals(descriptor, mtDesc.descriptorString());
+        assertEquals(returnType, mtDesc.returnType());
+        assertEquals(paramTypes, mtDesc.parameterArray());
+        assertEquals(Arrays.asList(paramTypes), mtDesc.parameterList());
+        assertEquals(paramTypes.length, mtDesc.parameterCount());
         for (int i=0; i<paramTypes.length; i++)
-            assertEquals(paramTypes[i], mtRef.parameterType(i));
+            assertEquals(paramTypes[i], mtDesc.parameterType(i));
 
-        // Consistency between MT and MTRef
+        // Consistency between MT and MTDesc
         MethodType mt = MethodType.fromMethodDescriptorString(descriptor, null);
-        testMethodTypeRef(mtRef, mt);
+        testMethodTypeDesc(mtDesc, mt);
 
         // changeReturnType
         for (String r : returnDescs) {
             ClassDesc rc = ClassDesc.ofDescriptor(r);
-            MethodTypeDesc newRef = mtRef.changeReturnType(rc);
-            assertEquals(newRef, MethodTypeDesc.of(rc, paramTypes));
-            testMethodTypeRef(newRef, mt.changeReturnType(rc.resolveConstantDesc(LOOKUP)));
+            MethodTypeDesc newDesc = mtDesc.changeReturnType(rc);
+            assertEquals(newDesc, MethodTypeDesc.of(rc, paramTypes));
+            testMethodTypeDesc(newDesc, mt.changeReturnType(rc.resolveConstantDesc(LOOKUP)));
         }
 
         // changeParamType
@@ -111,9 +109,9 @@
                 ClassDesc pc = ClassDesc.ofDescriptor(p);
                 ClassDesc[] ps = paramTypes.clone();
                 ps[i] = pc;
-                MethodTypeDesc newRef = mtRef.changeParameterType(i, pc);
-                assertEquals(newRef, MethodTypeDesc.of(returnType, ps));
-                testMethodTypeRef(newRef, mt.changeParameterType(i, pc.resolveConstantDesc(LOOKUP)));
+                MethodTypeDesc newDesc = mtDesc.changeParameterType(i, pc);
+                assertEquals(newDesc, MethodTypeDesc.of(returnType, ps));
+                testMethodTypeDesc(newDesc, mt.changeParameterType(i, pc.resolveConstantDesc(LOOKUP)));
             }
         }
 
@@ -124,9 +122,9 @@
                                       .filter(j -> j != k)
                                       .mapToObj(j -> paramTypes[j])
                                       .toArray(ClassDesc[]::new);
-            MethodTypeDesc newRef = mtRef.dropParameterTypes(i, i + 1);
-            assertEquals(newRef, MethodTypeDesc.of(returnType, ps));
-            testMethodTypeRef(newRef, mt.dropParameterTypes(i, i+1));
+            MethodTypeDesc newDesc = mtDesc.dropParameterTypes(i, i + 1);
+            assertEquals(newDesc, MethodTypeDesc.of(returnType, ps));
+            testMethodTypeDesc(newDesc, mt.dropParameterTypes(i, i+1));
         }
 
         badDropParametersTypes(CD_void, paramDescs);
@@ -138,9 +136,9 @@
                 ClassDesc[] ps = IntStream.range(0, paramTypes.length + 1)
                                           .mapToObj(j -> (j < k) ? paramTypes[j] : (j == k) ? p : paramTypes[j-1])
                                           .toArray(ClassDesc[]::new);
-                MethodTypeDesc newRef = mtRef.insertParameterTypes(i, p);
-                assertEquals(newRef, MethodTypeDesc.of(returnType, ps));
-                testMethodTypeRef(newRef, mt.insertParameterTypes(i, p.resolveConstantDesc(LOOKUP)));
+                MethodTypeDesc newDesc = mtDesc.insertParameterTypes(i, p);
+                assertEquals(newDesc, MethodTypeDesc.of(returnType, ps));
+                testMethodTypeDesc(newDesc, mt.insertParameterTypes(i, p.resolveConstantDesc(LOOKUP)));
             }
         }
 
@@ -151,16 +149,16 @@
         ClassDesc[] paramTypes =
                 IntStream.rangeClosed(0, paramDescTypes.length - 1)
                         .mapToObj(i -> ClassDesc.ofDescriptor(paramDescTypes[i])).toArray(ClassDesc[]::new);
-        MethodTypeDesc mtRef = MethodTypeDesc.of(returnType, paramTypes);
+        MethodTypeDesc mtDesc = MethodTypeDesc.of(returnType, paramTypes);
         try {
-            MethodTypeDesc newRef = mtRef.insertParameterTypes(-1, paramTypes);
+            MethodTypeDesc newDesc = mtDesc.insertParameterTypes(-1, paramTypes);
             fail("pos < 0 should have failed");
         } catch (IndexOutOfBoundsException ex) {
             // good
         }
 
         try {
-            MethodTypeDesc newRef = mtRef.insertParameterTypes(paramTypes.length + 1, paramTypes);
+            MethodTypeDesc newDesc = mtDesc.insertParameterTypes(paramTypes.length + 1, paramTypes);
             fail("pos > current arguments length should have failed");
         } catch (IndexOutOfBoundsException ex) {
             // good
@@ -171,44 +169,44 @@
         ClassDesc[] paramTypes =
                 IntStream.rangeClosed(0, paramDescTypes.length - 1)
                         .mapToObj(i -> ClassDesc.ofDescriptor(paramDescTypes[i])).toArray(ClassDesc[]::new);
-        MethodTypeDesc mtRef = MethodTypeDesc.of(returnType, paramTypes);
+        MethodTypeDesc mtDesc = MethodTypeDesc.of(returnType, paramTypes);
         try {
-            MethodTypeDesc newRef = mtRef.dropParameterTypes(-1, 0);
+            MethodTypeDesc newDesc = mtDesc.dropParameterTypes(-1, 0);
             fail("start index < 0 should have failed");
         } catch (IndexOutOfBoundsException ex) {
             // good
         }
 
         try {
-            MethodTypeDesc newRef = mtRef.dropParameterTypes(paramTypes.length, 0);
+            MethodTypeDesc newDesc = mtDesc.dropParameterTypes(paramTypes.length, 0);
             fail("start index = arguments.length should have failed");
         } catch (IndexOutOfBoundsException ex) {
             // good
         }
 
         try {
-            MethodTypeDesc newRef = mtRef.dropParameterTypes(paramTypes.length + 1, 0);
+            MethodTypeDesc newDesc = mtDesc.dropParameterTypes(paramTypes.length + 1, 0);
             fail("start index > arguments.length should have failed");
         } catch (IndexOutOfBoundsException ex) {
             // good
         }
 
         try {
-            MethodTypeDesc newRef = mtRef.dropParameterTypes(0, paramTypes.length + 1);
+            MethodTypeDesc newDesc = mtDesc.dropParameterTypes(0, paramTypes.length + 1);
             fail("end index > arguments.length should have failed");
         } catch (IndexOutOfBoundsException ex) {
             // good
         }
 
         try {
-            MethodTypeDesc newRef = mtRef.dropParameterTypes(1, 0);
+            MethodTypeDesc newDesc = mtDesc.dropParameterTypes(1, 0);
             fail("start index > end index should have failed");
         } catch (IllegalArgumentException ex) {
             // good
         }
     }
 
-    public void testMethodTypeRef() throws ReflectiveOperationException {
+    public void testMethodTypeDesc() throws ReflectiveOperationException {
         for (String r : returnDescs) {
             assertMethodType(ClassDesc.ofDescriptor(r));
             for (String p1 : paramDescs) {
--- a/test/jdk/java/lang/constant/SymbolicDescTest.java	Fri Oct 19 13:23:31 2018 -0400
+++ b/test/jdk/java/lang/constant/SymbolicDescTest.java	Sat Oct 20 17:02:49 2018 -0400
@@ -4,9 +4,7 @@
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
  *
  * This code is distributed in the hope that it will be useful, but WITHOUT
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -37,17 +35,17 @@
 import static org.testng.Assert.assertEquals;
 
 /**
- * Base class for XxxRef tests
+ * Base class for XxxDesc tests
  */
 public abstract class SymbolicDescTest {
 
     public static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup();
 
-    static List<String> someRefs = List.of("Ljava/lang/String;", "Ljava/util/List;");
+    static List<String> someDescs = List.of("Ljava/lang/String;", "Ljava/util/List;");
     static String[] basicDescs = Stream.concat(Stream.of(Primitives.values())
                                                      .filter(p -> p != Primitives.VOID)
                                                      .map(p -> p.descriptor),
-                                               someRefs.stream())
+                                               someDescs.stream())
                                        .toArray(String[]::new);
     static String[] paramDescs = Stream.of(basicDescs)
                                        .flatMap(d -> Stream.of(d, "[" + d))
@@ -69,14 +67,14 @@
         public final String name;
         public final Class<?> clazz;
         public final Class<?> arrayClass;
-        public final ClassDesc classRef;
+        public final ClassDesc classDesc;
 
-        Primitives(String descriptor, String name, Class<?> clazz, Class<?> arrayClass, ClassDesc ref) {
+        Primitives(String descriptor, String name, Class<?> clazz, Class<?> arrayClass, ClassDesc desc) {
             this.descriptor = descriptor;
             this.name = name;
             this.clazz = clazz;
             this.arrayClass = arrayClass;
-            classRef = ref;
+            classDesc = desc;
         }
     }
 
@@ -84,31 +82,31 @@
         return MethodType.methodType(clazz).toMethodDescriptorString().substring(2);
     }
 
-    static ClassDesc classToRef(Class<?> c) {
+    static ClassDesc classToDesc(Class<?> c) {
         return ClassDesc.ofDescriptor(c.descriptorString());
     }
 
-    static<T> void testSymbolicDesc(ConstantDesc<T> ref) throws ReflectiveOperationException {
-        testSymbolicDesc(ref, false);
+    static<T> void testSymbolicDesc(ConstantDesc<T> desc) throws ReflectiveOperationException {
+        testSymbolicDesc(desc, false);
     }
 
-    static<T> void testSymbolicDescForwardOnly(ConstantDesc<T> ref) throws ReflectiveOperationException {
-        testSymbolicDesc(ref, true);
+    static<T> void testSymbolicDescForwardOnly(ConstantDesc<T> desc) throws ReflectiveOperationException {
+        testSymbolicDesc(desc, true);
     }
 
-    private static<T> void testSymbolicDesc(ConstantDesc<T> ref, boolean forwardOnly) throws ReflectiveOperationException {
+    private static<T> void testSymbolicDesc(ConstantDesc<T> desc, boolean forwardOnly) throws ReflectiveOperationException {
         // Round trip sym -> resolve -> toSymbolicDesc
-        Constable<ConstantDesc<T>> constable = (Constable<ConstantDesc<T>>) ref.resolveConstantDesc(LOOKUP);
+        Constable<ConstantDesc<T>> constable = (Constable<ConstantDesc<T>>) desc.resolveConstantDesc(LOOKUP);
         Optional<? extends ConstantDesc<ConstantDesc<T>>> described = constable.describeConstable();
         if (!forwardOnly) {
-            assertEquals(ref, described.orElseThrow());
+            assertEquals(desc, described.orElseThrow());
         }
 
         // Round trip sym -> quoted sym -> resolve
-        if (ref instanceof Constable) {
-            Optional<ConstantDesc<ConstantDesc<T>>> opt = (Optional<ConstantDesc<ConstantDesc<T>>>) ((Constable) ref).describeConstable();
+        if (desc instanceof Constable) {
+            Optional<ConstantDesc<ConstantDesc<T>>> opt = (Optional<ConstantDesc<ConstantDesc<T>>>) ((Constable) desc).describeConstable();
             ConstantDesc<T> sr = opt.orElseThrow().resolveConstantDesc(LOOKUP);
-            assertEquals(sr, ref);
+            assertEquals(sr, desc);
         }
     }
 }
--- a/test/jdk/java/lang/constant/TestHelpers.java	Fri Oct 19 13:23:31 2018 -0400
+++ b/test/jdk/java/lang/constant/TestHelpers.java	Sat Oct 20 17:02:49 2018 -0400
@@ -4,9 +4,7 @@
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
  *
  * This code is distributed in the hope that it will be useful, but WITHOUT
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/constant/TypeDescriptorTest.java	Fri Oct 19 13:23:31 2018 -0400
+++ b/test/jdk/java/lang/constant/TypeDescriptorTest.java	Sat Oct 20 17:02:49 2018 -0400
@@ -4,9 +4,7 @@
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
  *
  * This code is distributed in the hope that it will be useful, but WITHOUT
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
--- a/test/jdk/java/lang/constant/boottest/java.base/java/lang/constant/ConstantUtilsTest.java	Fri Oct 19 13:23:31 2018 -0400
+++ b/test/jdk/java/lang/constant/boottest/java.base/java/lang/constant/ConstantUtilsTest.java	Sat Oct 20 17:02:49 2018 -0400
@@ -4,9 +4,7 @@
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
+ * published by the Free Software Foundation.
  *
  * This code is distributed in the hope that it will be useful, but WITHOUT
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -41,7 +39,7 @@
  */
 @Test
 public class ConstantUtilsTest {
-    private static ClassDesc thisClass = ClassDesc.of("MethodHandleRefTest");
+    private static ClassDesc thisClass = ClassDesc.of("MethodHandleDescTest");
 
     public void testValidateMemberName() {
         try {