Details
-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b33
Description
diff -r 2ac93efc62ed src/java.base/share/classes/java/lang/invoke/LambdaFormBuffer.java
--- a/src/java.base/share/classes/java/lang/invoke/LambdaFormBuffer.java Thu Nov 16 20:25:45 2017 +0000
+++ b/src/java.base/share/classes/java/lang/invoke/LambdaFormBuffer.java Fri Nov 17 00:30:29 2017 +0100
@@ -115,9 +115,9 @@
return true;
}
- private static int indexOf(NamedFunction fn, NamedFunction[] fns) {
- for (int i = 0; i < fns.length; i++) {
- if (fns[i] == fn) return i;
+ private static int indexOf(NamedFunction fn, List<NamedFunction> fns) {
+ for (int i = 0; i < fns.size(); i++) {
+ if (fns.get(i) == fn) return i;
}
return -1;
}
@@ -333,7 +333,7 @@
if (oldFns.isEmpty()) return this;
for (int i = arity; i < length; i++) {
Name n = names[i];
- int nfi = oldFns.indexOf(n.function);
+ int nfi = indexOf(n.function, oldFns);
if (nfi >= 0 && Arrays.equals(n.arguments, forArguments)) {
changeName(i, new Name(newFns.get(nfi), n.arguments));
}
Attachments
Issue Links
- relates to
-
JDK-8184777 Factor out species generation logic from BoundMethodHandle
-
- Resolved
-