< 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,11 +1000,13 @@
             if (bufs != null) {
                 for (MemberName[] buf0 : bufs) {
                     Collections.addAll(result, buf0);
                 }
             }
-            result.addAll(Arrays.asList(buf).subList(0, bufCount));
+            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 >