line number of bridge method

Mike Duigou openjdk at
Tue Dec 9 22:55:04 UTC 2014

Would it be possible to have the debug line number of a bridge method be 
the line number of the method it is a bridge for rather than the first 
line of the class?

java.lang.ClassCastException: java.lang.Byte cannot be cast to 

MyHashMap is declared as "extends HashMap<String,Object>" so there is a 
put(String, Object) bridge method in addition to the put(Object, Object) 

Understandably if MyHashMap were to not override put(Object, Object) and 
just use HashMap's implementation it would probably be necessary to use 
the current "first line of the class" solution for the put(String, 
Object) bridge method.



More information about the compiler-dev mailing list