The least intrusive way I found out to workaround this bug is, for every parameterized bean type of a bean class C
that should have the form T<A>
but Weld
is incorrectly changing the actual type parameter A
with a type variable, create a new empty interface that extends T<A>
and add this pilot interface to the implemented interfaces list of C
and to any other bean class that indirectly extends T<A>
.
In particular, for the code above, the bean type BaseType<SomeType1>
of the bean class BeanClass1
is incorrectly changed by Weld
to BaseType<T>
. So, the pilot interface required to workaround the issue would be:
public interface PilotInterface1 extends BaseType<SomeType1> {}
And the bean class with the workaround applied would be:
@Dependent
public static class BeanClass1 implements DerivedType<SomeType1>, PilotInterface1 {}
I suggest putting all the pilot interfaces together in a separate package or file in order to easily delete them when the bug is fixed.