typetools / typetools/checker-framework
Confusing wildcard-related error with Resource Leak Checker
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 440
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 134
Description
So most of the problems went away. However, now I can see a weird one:
[javac] Compiling 1 source file to /home/jlewandowski/dev/cassandra/c18239-static-analysis/build/checkerframework-output
[javac] /home/jlewandowski/dev/cassandra/c18239-static-analysis/src/java/org/apache/cassandra/utils/IntervalTree.java
[javac] /home/jlewandowski/dev/cassandra/c18239-static-analysis/src/java/org/apache/cassandra/utils/IntervalTree.java:345: error: [mustcall:bound] incompatible bounds in wildcard
[javac] C min = pointSerializer.deserialize(in);
[javac] ^
[javac] type: ?[ extends @MustCall Object super C[ extends @MustCallUnknown Comparable<?> super @MustCallUnknown Void]]
[javac] upper bound: @MustCall Object
[javac] lower bound: C[ extends @MustCallUnknown Comparable<?[ extends @MustCall Object super C]> super @MustCallUnknown Void]
[javac] /home/jlewandowski/dev/cassandra/c18239-static-analysis/src/java/org/apache/cassandra/utils/IntervalTree.java:346: error: [mustcall:bound] incompatible bounds in wildcard
[javac] C max = pointSerializer.deserialize(in);
[javac] ^
[javac] type: ?[ extends @MustCall Object super C[ extends @MustCallUnknown Comparable<?> super @MustCallUnknown Void]]
[javac] upper bound: @MustCall Object
[javac] lower bound: C[ extends @MustCallUnknown Comparable<?[ extends @MustCall Object super C]> super @MustCallUnknown Void]
[javac] 2 errors
That can be reproduced with the following command:
ant cf-only '-Dcf.check.only=**/IntervalTree.java'
on this branch: https://github.com/jacek-lewandowski/cassandra/tree/checker-framework-testing
Originally posted by @jacek-lewandowski in https://github.com/typetools/checker-framework/issues/6077#issuecomment-1640221392
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report with ant cf-only '-Dcf.check.only=**/IntervalTree.java' on the checker-framework-testing branch. Start at src/java/org/apache/cassandra/utils/IntervalTree.java, especially lines 345–346, and investigate the Resource Leak Checker’s wildcard-bound errors. Done means the cause is explained and the checker behavior is corrected or clearly resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100