[ODLPARENT-164] Nullable detection should be enabled in SpotBugs Created: 14/Sep/18 Updated: 30/May/23 |
|
| Status: | Open |
| Project: | odlparent |
| Component/s: | General |
| Affects Version/s: | None |
| Fix Version/s: | 14.0.0 |
| Type: | Bug | Priority: | Medium |
| Reporter: | Stephen Kitt | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Description |
|
SportBugs doesn't handle Guava 25.1's @Nullable annotations correctly, and ends up flagging false-positive errors related to null-handling (see SpotBugs issue 743). ODL Parent currently disables the corresponding checks to avoid these false-positives, but this is undesirable. As soon as the SpotBugs issue is fixed, ODL Parent should re-enable the corresponding checks. |
| Comments |
| Comment by Robert Varga [ 10/Sep/21 ] |
|
This needs to be re-evaluated during SB-4 integration. There certainly has been some TYPE_USE change, hence this might just work (or cause a headache). |
| Comment by Robert Varga [ 01/Mar/22 ] |
|
The SpotBugs situation is actually getting slightly worse, as they have trouble keeping up with the various constructs being introduced to Java (i.e. lambdas trigger false positives), Guava introducing more annotations (@CheckForNull) and corresponding problems (i.e. checkArgument(foo != null) not recognized as a guard). Meanwhile SpotBugs has also turned on some ugly heuristics, https://github.com/spotbugs/spotbugs/issues/1601 . The way things are going we will sooner replace SB with EP... |