< prev index next >

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

Print this page

        

*** 30,39 **** --- 30,40 ---- import java.lang.reflect.WildcardType; import sun.reflect.generics.factory.GenericsFactory; import sun.reflect.generics.tree.FieldTypeSignature; import sun.reflect.generics.visitor.Reifier; import java.util.Arrays; + import java.util.StringJoiner; /** * Implementation of WildcardType interface for core reflection. */
*** 154,171 **** return "?"; } assert bounds.length > 0; ! boolean first = true; for(Type bound: bounds) { ! if (!first) ! sb.append(" & "); ! ! first = false; ! sb.append(bound.getTypeName()); } return sb.toString(); } @Override public boolean equals(Object o) { --- 155,170 ---- return "?"; } assert bounds.length > 0; ! StringJoiner sj = new StringJoiner(" & "); for(Type bound: bounds) { ! sj.add(bound.getTypeName()); } + sb.append(sj.toString()); + return sb.toString(); } @Override public boolean equals(Object o) {
< prev index next >