Huston, we have a problem !

Florian Weimer fweimer at
Fri Feb 18 06:45:38 PST 2011

* Rémi Forax:

> public class DiamondRaw {
>    public static void main(String[] args) {
>      String s = new String<>("foo");
>    }
> }

After seeing this example, I've been wondering why the diamond is
needed at all.  Wouldn't it be sufficient to suppress the raw type
warning in all places where you could add a diamond, without
introducing a compilation error?  What crucial piece of information
does the presence of a diamond provide?

Florian Weimer                <fweimer at>
BFK edv-consulting GmbH
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99

More information about the coin-dev mailing list