-
Bug
-
Resolution: Not an Issue
-
P3
-
None
-
7
-
x86
-
windows_7
FULL PRODUCT VERSION :
All java 7 versions after Changeset: d3ead6731a91 improperly purporting to "fix" the "bug" (which wasn't actually a bug) 6979683
ADDITIONAL OS VERSION INFORMATION :
Windows 7 Enterprise 64-bit
A DESCRIPTION OF THE PROBLEM :
javac was changed in changeset d3ead6731a91 to accept many casting conversions that are not specified in the JLS. This must be fixed before the product is released, otherise the existence of customer code depending on this misfeature will prevent the bug fix. In other words, if fixed after the next product release, it would be a breaking change.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile these lines in a method:
Object o = 3;
int i = (int) o;
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Should fail to compile.
ACTUAL -
Compiles without error.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
none (unfortunately)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
See steps to reproduce
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Use jdk 6
All java 7 versions after Changeset: d3ead6731a91 improperly purporting to "fix" the "bug" (which wasn't actually a bug) 6979683
ADDITIONAL OS VERSION INFORMATION :
Windows 7 Enterprise 64-bit
A DESCRIPTION OF THE PROBLEM :
javac was changed in changeset d3ead6731a91 to accept many casting conversions that are not specified in the JLS. This must be fixed before the product is released, otherise the existence of customer code depending on this misfeature will prevent the bug fix. In other words, if fixed after the next product release, it would be a breaking change.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile these lines in a method:
Object o = 3;
int i = (int) o;
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Should fail to compile.
ACTUAL -
Compiles without error.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
none (unfortunately)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
See steps to reproduce
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Use jdk 6
- relates to
-
JDK-6979683 inconsistent interaction of reference cast with box/unbox conversions leaves out a useful case
- Closed
-
JDK-6526446 Fixes to JLS5.5 Casting Conversion
- Closed