FULL PRODUCT VERSION :
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux shadow 3.13.6-gentoo-20 #11 SMP Thu Apr 3 15:34:27 NOVT 2014 x86_64 Intel(R) Core(TM) i7-3540M CPU @ 3.00GHz GenuineIntel GNU/Linux
A DESCRIPTION OF THE PROBLEM :
javac 1.8 fails to compile code previously valid for 1.7
REGRESSION. Last worked in version 7u60
ADDITIONAL REGRESSION INFORMATION:
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile code from example with javac 1.7 and javac 1.8
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No errors
ACTUAL -
Buggy.java:5: error: incomparable types: boolean and Object
boolean flag = true == new Object();
^
1 error
using javac 1.8
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
class Buggy {
boolean flag = true == new Object();
}
---------- END SOURCE ----------