Java 8 syntax change between b63 and b65 (original) (raw)

David Holmes david.holmes at oracle.com
Wed Jan 30 09:58:33 UTC 2013


Hi Frank,

Probably best to confirm this on lambda-dev but I suspect that default method support introduced a bug in b63 that was fixed by b65.

David

On 30/01/2013 12:06 PM, Frank Ding wrote:

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 cannot be applied to given types; listen(null); ^ required: no arguments found: 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