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
import org.checkerframework.checker.nullness.qual.NonNull;
import java.util.*;
class A {
public HashMap<Integer, Date> call_hashmap = new HashMap<>();
public HashMap<Integer, Date> getMap() {return call_hashmap;}
}
class NonNullMapValue {
public void process_unmatched_procedure_entries(A a) {
for (Integer i : a.getMap().keySet()) {
@NonNull Date d = a.getMap().get(i);
}
}
}
gets false positive as
case/KeyForDemo.java:33: error: [assignment.type.incompatible] incompatible types in assignment. @nonnull Date d = a.getMap().get(i);
^
found : @initialized@nullable Date
required: @UnknownInitialization @nonnull Date
1 error
The text was updated successfully, but these errors were encountered:
wmdietl
transferred this issue from opprop/checker-framework-inference
Jul 21, 2021
wmdietl
pushed a commit
to zcai1/checker-framework
that referenced
this issue
Apr 29, 2022
The following test case works with https://github.com/typetools/checker-framework, while gets false positive with the opprop version.
gets false positive as
case/KeyForDemo.java:33: error: [assignment.type.incompatible] incompatible types in assignment.
@nonnull Date d = a.getMap().get(i);
^
found : @initialized @nullable Date
required: @UnknownInitialization @nonnull Date
1 error
The text was updated successfully, but these errors were encountered: