Java 8 syntax change between b63 and b65

Frank Ding dingxmin at linux.vnet.ibm.com
Wed Jan 30 02:06:23 UTC 2013


Hi guys,
I noticed there is a change in Java 8 between b63 and b65. The change 
can be illustrated by compiling following Issue class.

public class Issue {
interface Handler {
public void handle();
}

interface Listener {
public void listen();
}

Handler handlerImpl = new Handler() {
public void listen(Object... obj) {
// do nothing
}

@Override
public void handle() {
new Listener() {

@Override
public void listen() {
listen(null);
}
};
}
};
}

With OpenJDK 8 b65, compilation goes well whereas b63 failed, 
complaining that

Issue.java:22: error: method listen in class <anonymous Listener> cannot 
be applied to given types;
listen(null);
^
required: no arguments
found: <null>
reason: actual and formal argument lists differ in length
1 error

Could anybody kindly take a look at it and point out what Oracle bug or 
feature has been built into b65 which is not available in b63? It would 
be very helpful.

Best regards,
Frank




More information about the core-libs-dev mailing list