Community
Participate
Working Groups
Created attachment 279957 [details] The unit test demonstrating the problem Eclipse compiles code that behaves unexpectedly. When calling an interface method via java.lang.Proxy, the proxy is passed with a java.lang.Method instance, that does not correspond to any existing method, and is lacking method annotations. Simple example: Let's have the following interfaces: public interface GenericBase<X> { @GBase void run(X arg); } public interface GenericSpecial extends GenericBase<String> { @GSpecial void run(String arg); } GenericSpecial genericSpecialInstance = Proxy.newProxyInstance(...); genericSpecialInstance.run(""); // proxy is passed with the correct method GenericSpecial.run(String) GenericBase<String> genericReference = genericSpecialInstance; genericReference.run(""); // proxy is passed with GenericSpecial.run(Object), which does not exist, and is lacking annotations; See attached full JUnit test code. If the code is compiled with AdoptOpenJDK/jdk-8.0.222.10-hotspot, the unit test succeeds (although the proxy is also passed with method GenericSpecial.run(Object), i.e. the argument is not specialized, but the method does not lack the annotation).
Created attachment 279958 [details] The unit test demonstrating the problem
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.