line number of bridge method
robert.field at oracle.com
Tue Dec 9 23:28:31 UTC 2014
I believe the downside of having line numbers is you then would, in a
debugger, step into the bridge.
On 12/09/14 14:55, Mike Duigou wrote:
> 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
> at com.foo.bar.MyHashMap.put(MyHashMap.java:18)
> MyHashMap is declared as "extends HashMap<String,Object>" so there is
> a put(String, Object) bridge method in addition to the put(Object,
> Object) method.
> 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