FALSE NEGATIVE: NULLPTR_DEREFERENCE misses a static final null field
- Dominant language
- OCaml
- Stars
- 15.7k
- Forks
- 2.1k
- Avg merge
- 19h 36m
- Merged PRs (30d)
- 13
Description
Hi, I found a false negative in Infer 1.3.0 when a static final field initialized to null is dereferenced.
**Affected checker**
`Infer NULLPTR_DEREFERENCE`
**Minimal reproducer**
```java
class InferNullStaticField {
static final Object VALUE = null;
void test() {
VALUE.toString();
}
}
```
**Reproduction command**
```bash
infer --version
infer run --pulse --enable-issue-type NULLPTR_DEREFERENCE -- javac infer-nullptr-fn-static-null-field.java
```
**Current behavior**
Infer completes successfully but produces no `NULLPTR_DEREFERENCE` finding.
**Expected behavior**
Infer should report `NULLPTR_DEREFERENCE` at line 5 because `VALUE` is initialized to null and dereferenced.
Contributor guide
Assessment
This issue has not been assessed yet.