< prev index next >
src/java.base/share/classes/sun/reflect/generics/reflectiveObjects/WildcardTypeImpl.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* 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
--- 1,7 ----
/*
! * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* 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
*** 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 >