[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:
Relates
relates to ODLPARENT-161 SpotBugs flags errors due to Guava nu... Resolved
relates to ODLPARENT-255 Upgrade to SpotBugs 4.5.3 Resolved

 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...

Generated at Wed Feb 07 20:27:48 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.