Cannot apply multiple (implicit) conversions in assignment

Richard Kolb rjdkolb at
Thu Apr 23 07:58:55 UTC 2015


I would like to start a discussion on a little issue on double conversions
in Java.

Since Java 5 a simple boxing statement like this would fail :
Long l = 250;
And this passes :
Long l = 250L;

This has to do with the fact that a double conversion needs to take place :

For Java 9, is it possible to make the compiler clever enough to accept
double conversions in cases like these ?


More information about the adoption-discuss mailing list