Open ppkarwasz opened 11 months ago
This is related to #1850.
Also a few new places in the DI system (some of which is difficult to express within the limitations of the Java type system).
In fact, there are numerous places in the DI system abusing this. I'd be open to cleaning that up as it might also allow for the Key<T>
class to be turned into a Key
record class instead as only the Type
reference is needed.
As described in TypeParameterUnusedInFormals, these methods provide developers a false sense of type safety, whereas in reality they can cause
ClassCastException
s at runtime:Changing/removing these methods is a binary compatible, but source incompatible change, hence this must be done in a major release.