< prev index next >

src/java.base/share/classes/sun/reflect/generics/reflectiveObjects/GenericArrayTypeImpl.java

Print this page

        

@@ -63,19 +63,11 @@
     public Type getGenericComponentType() {
         return genericComponentType; // return cached component type
     }
 
     public String toString() {
-        Type componentType = getGenericComponentType();
-        StringBuilder sb = new StringBuilder();
-
-        if (componentType instanceof Class)
-            sb.append(((Class)componentType).getName() );
-        else
-            sb.append(componentType.toString());
-        sb.append("[]");
-        return sb.toString();
+        return getGenericComponentType().getTypeName() + "[]";
     }
 
     @Override
     public boolean equals(Object o) {
         if (o instanceof GenericArrayType) {
< prev index next >