changeset 53406:d1bdbb71f3a0 intrinsics-project

Automatic merge with jep-334
author mcimadamore
date Tue, 13 Nov 2018 15:00:34 +0100
parents 30b442c98ce4 23d27d946185
children 20cad94ca972
files
diffstat 1 files changed, 4 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/test/jdk/java/lang/constant/ClassDescTest.java	Tue Nov 13 14:45:40 2018 +0100
+++ b/test/jdk/java/lang/constant/ClassDescTest.java	Tue Nov 13 15:00:34 2018 +0100
@@ -155,25 +155,16 @@
         testClassDesc(thisClassDesc, ClassDescTest.class);
     }
 
-    private void testBadPackageName(ClassDesc cr) {
-        try {
-            cr.packageName();
-            fail("");
-        } catch (IllegalStateException e) {
-            // good
-        }
-    }
-
     public void testPackageName() {
         assertEquals("com.foo", ClassDesc.of("com.foo.Bar").packageName());
         assertEquals("com.foo", ClassDesc.of("com.foo.Bar").inner("Baz").packageName());
         assertEquals("", ClassDesc.of("Bar").packageName());
         assertEquals("", ClassDesc.of("Bar").inner("Baz").packageName());
 
-        testBadPackageName(ConstantDescs.CD_int);
-        testBadPackageName(ConstantDescs.CD_int.arrayType());
-        testBadPackageName(ConstantDescs.CD_String.arrayType());
-        testBadPackageName(ClassDesc.of("Bar").arrayType());
+        assertEquals("", ConstantDescs.CD_int.packageName());
+        assertEquals("", ConstantDescs.CD_int.arrayType().packageName());
+        assertEquals("", ConstantDescs.CD_String.arrayType().packageName());
+        assertEquals("", ClassDesc.of("Bar").arrayType().packageName());
     }
 
     private void testBadArrayRank(ClassDesc cr) {