< prev index next >

src/java.base/share/classes/java/lang/invoke/MemberName.java

Print this page
rev 15320 : 8163370: Reduce number of classes loaded by common usage of java.lang.invoke
Reviewed-by: igerasim, psandoz

*** 1000,1010 **** if (bufs != null) { for (MemberName[] buf0 : bufs) { Collections.addAll(result, buf0); } } ! result.addAll(Arrays.asList(buf).subList(0, bufCount)); // Signature matching is not the same as type matching, since // one signature might correspond to several types. // So if matchType is a Class or MethodType, refilter the results. if (matchType != null && matchType != matchSig) { for (Iterator<MemberName> it = result.iterator(); it.hasNext();) { --- 1000,1012 ---- if (bufs != null) { for (MemberName[] buf0 : bufs) { Collections.addAll(result, buf0); } } ! for (int i = 0; i < bufCount; i++) { ! result.add(buf[i]); ! } // Signature matching is not the same as type matching, since // one signature might correspond to several types. // So if matchType is a Class or MethodType, refilter the results. if (matchType != null && matchType != matchSig) { for (Iterator<MemberName> it = result.iterator(); it.hasNext();) {
< prev index next >