JDK-4836743 - Java Issue Tracker
If the array is empty, there are no elements to access, and the returned pointer should not be used. The fix for bug 4804447 handled this special (empty array) ...
If the array is empty, there are no elements to access, and the returned pointer should not be used. The fix for bug 4804447 handled this special (empty array) ...
are returned by its iterator, this method must return the elements in - * the same order. + * the same order. The returned array's {@linkplain Class#getComponentType + * runtime component type} is {@code Object}. * * &
Turns out changing the logic results in the same user-visible behavior: - If one return type is a primitive and one is a reference, then the old logic says they're both more specific than the other, and the new logic says neither is more specific. Either way, ambiguity error.
Name: dbT83986 Date: 03/22/99 Java's second biggest problem, in my opinion, is the lack of support for multiple return values. I've personally written over 30,000 lines of Java code so far and have been heading up a large Java development project, so I do have some experience with Java programming. This lack of multiple return values has been a major pain. Whenever I want to return more than ...
GenericTest.java:6: error: array required, but CAP#1 found return foo.call()[0]This fails to account for the possibility that the expression has a type variable type with an array upper bound. Other potentially-sensitive areas: member access (length, clone); enhanced for loop.
I fail to see the issue, your code compiles with ? extends because here you don't use the return type. If the callsite is: Comparator<String> c = mycomparing((Object e) -> e.toString()); the version with ? extends fails to compile too which is the expected behavior.