Java 8 syntax change between b63 and b65

bitter_fox bitterfoxc at gmail.com
Wed Jan 30 18:30:01 PST 2013


Hi, Frank.

Producing compile-time error is a correct behavior.

You can refer this thread on type-annotation-dev:
[non-308] Scoping problem with Resolve and javac 6 vs. 7 vs. Eclipse
http://mail.openjdk.java.net/pipermail/type-annotations-dev/2013-January/000417.html

Regards,
bitter_fox


2013/1/31 Frank Ding <dingxmin at linux.vnet.ibm.com>

> Hi David,
>    Thanks for your info.
>
> To lambda-dev guys
>    Could you please help to take a look at the compilation issue below?
>
> Best regards,
> Frank
> On 1/30/2013 5:58 PM, David Holmes wrote:
> > 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 <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 lambda-dev mailing list