Commit ce8b466
committed
spotbugs: suppress USBR on equals/hashCode/canEqual/toString (Lombok)
Lombok-generated equals / hashCode / canEqual / toString carry the
textbook polynomial-hash pattern (int result = 1; result = result * 59
+ ...; return result;) which fb-contrib's USBR detector reads at the
bytecode level as a store-then-immediate-return.
SpotBugs core already skips its own detectors on members carrying
@lombok.Generated (emitted by lombok.config's
lombok.addLombokGeneratedAnnotation = true), but fb-contrib runs as a
separate plugin family and does not honour that annotation. A method-
name-based <Match> covers every member Lombok can emit.
Clears 18 jllama findings at SpotBugs Max+Low. The collateral cost is
small: any handwritten equals/hashCode/toString that genuinely
stores-then-immediately-returns is either a debugger-friendly local-
variable pattern or a micro-optimisation, both intentional here.
https://claude.ai/code/session_01LzoKmqzgtQsELS5tsH4Wog1 parent 9be73a3 commit ce8b466
1 file changed
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
176 | 208 | | |
0 commit comments