You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might be intended behavior, but I found it surprising, and I didn't see documentation of it in the manual.
I had figured that, in a stub file, <T extends Object> would be interpreted as <T extends @NonNull Object>, as it is when compiling from source. But it seems to be interpreted as <T extends @Nullable Object>, as it is when reading an unannotated class file.
This might be intended behavior, but I found it surprising, and I didn't see documentation of it in the manual.
I had figured that, in a stub file,
<T extends Object>
would be interpreted as<T extends @NonNull Object>
, as it is when compiling from source. But it seems to be interpreted as<T extends @Nullable Object>
, as it is when reading an unannotated class file.Without the stub file, the Checker Framework uses the annotations from its built-in JDK stubs, which have the right bound:
But when I include my stub file, the Checker Framework accepts the code, rather than rejecting it as I'd expected:
Caller.java
ConcurrentHashMap.astub
The text was updated successfully, but these errors were encountered: