Actually, the referenced JDK bugs are not the only problems we've found. We're not able to attach the generic info properly if a method return type or parameters use a type variable declared deeper in the class hierarchy, e.g.:
class Foo extends Bar<String> {
|
}
|
class Bar<T> {
|
T get() {
|
}
|
}
|
If a proxy class extends Foo, it also declares a method get() with signature TT;. However, T is not available in the scope of Foo (even if we add a class signature which would be something like LBar<Ljava/lang/String;>;) and the reflection API returns corrupted data. I'm not quite sure whether it should work or not. But this is how it's implemented in Oracle JDK 7 and 8.
So we've decided to add a special marker interface into the Weld API to allow to detect a Weld proxy/subclass.
|