You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Andreas Lundblad <an...@gmail.com> on 2015/04/13 11:36:47 UTC

Diamonds in anonymous classes

Just wanted to let you all know that diamond syntax with anonymous classes
are available in JDK 9 as of build 59 [1].

I've often found myself writing code like

    add(new ListView<AnnoyingTypeParameterThatCantBeInferred>(.....) {
        ....
    });

so I think this feature is most welcomed by Wicket users :-)

[1] http://mail.openjdk.java.net/pipermail/jdk9-dev/2015-April/002130.html

-- Andreas

Re: Diamonds in anonymous classes

Posted by Martin Grigorov <mg...@apache.org>.
I've noticed this improvement too.
It will take a while until Java 9 is out and people start using it though.
We will start soon on Wicket 8 (requiring Java 8).

Martin Grigorov
Freelancer, available for hire!
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Apr 13, 2015 at 12:36 PM, Andreas Lundblad <
andreas.lundblad@gmail.com> wrote:

> Just wanted to let you all know that diamond syntax with anonymous classes
> are available in JDK 9 as of build 59 [1].
>
> I've often found myself writing code like
>
>     add(new ListView<AnnoyingTypeParameterThatCantBeInferred>(.....) {
>         ....
>     });
>
> so I think this feature is most welcomed by Wicket users :-)
>
> [1] http://mail.openjdk.java.net/pipermail/jdk9-dev/2015-April/002130.html
>
> -- Andreas
>