JDK-4030374 - Java Issue Tracker
Feb 5, 1997 ... ... code generation error in JDK 1.1.7B compiler. It appears that non-local variables that are referenced in an anonymous class are not properly ...
Feb 5, 1997 ... ... code generation error in JDK 1.1.7B compiler. It appears that non-local variables that are referenced in an anonymous class are not properly ...
A DESCRIPTION OF THE PROBLEM : public String[] split(String regex). The above method does not work at all if the regex passed to it is "."ERROR MESSAGES/STACK TRACES THAT OCCUR : java.lang.ArrayIndexOutOfBoundsException: 0.
When run with Java 1.6_21 the code works fine regardless of the access specifier of arr. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - The console should read
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.