FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
Any type cast is inserted twice by javac.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile the sample code.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
One type casting is present in the byte code.
ACTUAL -
Two type castings are present in the byte code.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
void qux () {
Object o = null;
byte[] b = (byte[]) o;
}
---------- END SOURCE ----------
A DESCRIPTION OF THE PROBLEM :
Any type cast is inserted twice by javac.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Compile the sample code.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
One type casting is present in the byte code.
ACTUAL -
Two type castings are present in the byte code.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
void qux () {
Object o = null;
byte[] b = (byte[]) o;
}
---------- END SOURCE ----------
- duplicates
-
JDK-8067914 Redundant type cast nodes in AST (follow up from JDK-8043741)
-
- Closed
-