The Existing class currently only permits specifying a custom Class that is a sub-class of the specified value. While this is fine for most use-cases, it fails to allow up-casting.
For example, the following won't compile because Object is not a sub-class of String.
Existing<Object> = new Existing("Hello", Object.class);
However, it's perfectly legal to perform a cast like this:
Object object = (Object)"Hello";
Resolving this issue is important as it will allow future casting between types, specially from Object to something else and vice-versa.
The change in method signature is completely backwards compatible as it simply removes a type restriction.
The Existing class currently only permits specifying a custom Class that is a sub-class of the specified value. While this is fine for most use-cases, it fails to allow up-casting.
For example, the following won't compile because Object is not a sub-class of String.
However, it's perfectly legal to perform a cast like this: Object object = (Object)"Hello";
Resolving this issue is important as it will allow future casting between types, specially from Object to something else and vice-versa.
The change in method signature is completely backwards compatible as it simply removes a type restriction.