< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java

Print this page

        

*** 30,39 **** --- 30,40 ---- import java.lang.annotation.*; import java.lang.reflect.Array; import java.lang.reflect.Method; import java.util.LinkedHashMap; import java.util.Map; + import java.util.stream.Collectors; import sun.reflect.annotation.*; import javax.lang.model.type.MirroredTypeException; import javax.lang.model.type.MirroredTypesException; import javax.lang.model.type.TypeMirror;
*** 290,300 **** type = t; typeString = t.toString(); } public String toString() { ! return typeString; } public int hashCode() { return (type != null ? type : typeString).hashCode(); } --- 291,301 ---- type = t; typeString = t.toString(); } public String toString() { ! return typeString + ".class"; } public int hashCode() { return (type != null ? type : typeString).hashCode(); }
*** 333,343 **** types = ts; typeStrings = ts.toString(); } public String toString() { ! return typeStrings; } public int hashCode() { return (types != null ? types : typeStrings).hashCode(); } --- 334,346 ---- types = ts; typeStrings = ts.toString(); } public String toString() { ! return types.stream() ! .map(t -> t.toString() + ".class") ! .collect(Collectors.joining(", ", "{", "}")); } public int hashCode() { return (types != null ? types : typeStrings).hashCode(); }
< prev index next >