-
Bug
-
Resolution: Fixed
-
P4
-
None
-
8u212
-
x86
-
linux_ubuntu
A DESCRIPTION OF THE PROBLEM :
When explaining the hazards of type erasure and bridge methods, the documentation(https://docs.oracle.com/javase/tutorial/java/generics/bridgeMethods.html) says that a ClassCastException is thrown at a certain statement, when it actually gets thrown in the previous statement. It is not just a typo, the last statement is purposefully used to demonstrate the issue, but the issue is actually in the assignment that the compiler generates in the bridge method.
Please see this Stack Overflow question from 2016 for further details https://stackoverflow.com/questions/35970031/type-erasure-tutorial-on-java.
When explaining the hazards of type erasure and bridge methods, the documentation(https://docs.oracle.com/javase/tutorial/java/generics/bridgeMethods.html) says that a ClassCastException is thrown at a certain statement, when it actually gets thrown in the previous statement. It is not just a typo, the last statement is purposefully used to demonstrate the issue, but the issue is actually in the assignment that the compiler generates in the bridge method.
Please see this Stack Overflow question from 2016 for further details https://stackoverflow.com/questions/35970031/type-erasure-tutorial-on-java.