Commit c3a26b9
committed
spotbugs: flip pom to Max+Low at the gate; clear remaining 8 source-level findings
Pom now enforces effort=Max + threshold=Low (matches BAF, plugin, sb
that all already gate on it). With the gate flipped, the remaining 8
findings surface and are dispatched in one sweep:
Source fixes (2):
- LlamaModel.java — move OBJECT_MAPPER static field to the top of the
class body so static fields precede instance fields
(IMC_IMMATURE_CLASS_WRONG_FIELD_ORDER).
- ModelParameters.java — same reorder: statics before the instance
serializer field.
Narrow <Match> suppressions added to spotbugs-exclude.xml with rationale (6):
- CancellationToken + ChatTranscript: IMC_NO_EQUALS — both are
identity-managed lifecycle handles (cancellation flag observed across
threads, append-only transcript owned by one Session). Documented in
their Javadocs as intentionally non-value-shaped.
- TimingsLogger: LO_SUSPECT_LOG_CLASS — the documented public logger
name "net.ladenthin.llama.timings" is the operator-visible contract
(see README + CLAUDE.md System Properties Reference), NOT the FQN of
the enclosing class.
- Java8CompatibilityHelper.formatted: FORMAT_STRING_MANIPULATION — the
wrapper exists specifically to accept runtime format strings as a
Java 8 backport of String#formatted().
- ToolHandler.invoke: THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION —
functional-interface contract for user-supplied handlers; the agent
loop catches broad Exception and reports back as {"error":"..."}.
- ChatMessage.requireNonNull: WEM_WEAK_EXCEPTION_MESSAGING — precondition
guard with no state-dependent context to add to the message.
Verification: mvn clean compile spotbugs:check -> BugInstance size is 0,
BUILD SUCCESS.1 parent 14091bf commit c3a26b9
4 files changed
Lines changed: 82 additions & 8 deletions
File tree
- src/main/java/net/ladenthin/llama
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
597 | | - | |
598 | | - | |
| 597 | + | |
| 598 | + | |
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
289 | 363 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| |||
697 | 700 | | |
698 | 701 | | |
699 | 702 | | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | 703 | | |
704 | 704 | | |
705 | 705 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | 26 | | |
30 | 27 | | |
31 | 28 | | |
| |||
35 | 32 | | |
36 | 33 | | |
37 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
0 commit comments