fix(build): keep the OCP suppression list in step with the renamed setters - #409
Conversation
…tters The Publish run on main fails its SpotBugs gate with two OCP_OVERLY_CONCRETE_PARAMETER findings, both introduced by #408: setFlashAttn(FlashAttn): 1st parameter 'mode' could be declared as CliArg setLazyMode(LazyMode): 1st parameter 'mode' could be declared as CliArg Widening either to CliArg is exactly what the surrounding comment says must not happen -- setFlashAttn(CacheType.Q8_0) would then compile and emit a nonsense CLI value the native code rejects at runtime. So these belong in the existing design-intent suppression, not in the code. The block lists methods by name, which makes it silently wrong after a rename: #408 renamed setTensorReadLazy to setLazyMode, so that entry has been matching nothing since, while the new setLazyMode and setFlashAttn were never covered. Both are added and the dead entry dropped. Not caught before the merge because spotbugs:check binds to verify, so neither mvn test nor mvn package runs it -- the same gap that produced the equivalent miss in srcmorph. Verified here with the exact command the CI job runs: mvn -B -f llama/pom.xml -DskipTests -Denforcer.skip=true compile spotbugs:check -> BugInstance size is 0, BUILD SUCCESS.
Code Review ✅This is a straightforward and correct maintenance fix that resolves the SpotBugs gate failure introduced by #408. Changes Verified
XML Validation
AssessmentThis fix is minimal, focused, and correct. It properly addresses the root cause of the SpotBugs failure without introducing unnecessary changes. The dead-code removal ( |
|



Summary
mainis red. The Publish run on2d29615fails its SpotBugs gate with twoOCP_OVERLY_CONCRETE_PARAMETERfindings, both introduced by feat!: llama.cpp b10731, value-taking flash-attn, and the --lazy-mode rename #408:spotbugs-exclude.xmland not in the code. Widening either parameter toCliArgis exactly what the comment already sitting above that block forbids:setFlashAttn(CacheType.Q8_0)would then compile and emit a nonsense CLI value that the native layer rejects at runtime. The narrow enum type is the API contract.setTensorReadLazytosetLazyMode; that entry has matched nothing since, while the newsetLazyModeandsetFlashAttnwere never covered. Both are added, the dead entry dropped, and the block's own comment updated to name the current enum set.Why it reached
mainspotbugs:checkbinds toverify, so neithermvn testnormvn packageruns it — #408 was validated with both and still shipped this. Worth noting because it is the second time this exact gap has bitten in this line of work (the equivalent miss happened in srcmorph and was diagnosed as a Spotless failure at first). The gate itself did its job; only the local pre-push loop was blind.Test plan
mvn -B --no-transfer-progress -f llama/pom.xml -DskipTests -Denforcer.skip=true compile spotbugs:check→
BugInstance size is 0,BUILD SUCCESS(wasTotal bugs: 2before the change)setTensorReadLazyin the tree is a javadoc line documenting the renameRelated issues / PRs
Fixes the SpotBugs failure introduced by #408. Unblocks the 5.2.0 snapshot/release, which
bernardladenthin/srcmorphmainis currently waiting on (it pinsnet.ladenthin:llama:5.2.0).Checklist
CONTRIBUTING.mdandCODE_OF_CONDUCT.mdGenerated by Claude Code