You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(schedule10): clear the remaining SonarCloud findings
Follow-up to the code review. Every reported item is fixed; none was dismissed as
a false positive.
DANGLING JAVADOC (Critical). PERCENTAGE_CONVERTER had been inserted between the
CONVERTER_KEYS_BY_TARGET javadoc and its field, orphaning the doc block. Both
converter constants now sit above it. VOLUME_CONVERTER is extracted at the same
time, which also covers the third usage in the type-fallback branch.
JOIN THESE MULTIPLE ASSERTIONS (8). Seven came from the previous commit's
containsEntry conversion, which left runs of consecutive single-entry assertions
on the same subject; they are now chained. The eighth, in
Schedule10CheckStatusIT, was missed by that pass because the seven assertions
there are separated by comments -- now one chain with each link's reasoning kept
beside it. No consecutive same-subject runs remain in any Schedule 10 test.
TEST THE EMPTINESS OF THE LIST (2 Bugs). doesNotContain(...) passes on an empty
list, so "End Haul is checked nowhere" and "method N skips the gated rules" would
both have passed even if the rule engine returned nothing at all. Each now
asserts isEmpty() -- the actual claim -- plus a CONTROL that proves the engine
ran: one drives an unrelated field out of range and expects exactly that field,
the other asserts the same empty stabilizing block under method C does produce
issues. Suppression is now demonstrably the gate rather than a dead rule set.
METHOD HAS 8 PARAMETERS. requireRange's bounds and format are bundled into a Band
record, taking it to six. The band(lower, format, upper) factory preserves the
legacy argument ORDER at all 30 call sites, so the rewrite was a pure textual
wrap and the reordering happens once inside the factory -- no chance of a silent
transposition changing a reported bound. The emission-order and bound-formatting
tests, which assert exact rendered bounds, pass unchanged.
CLASS HAS 6 PARENTS. InvalidBecClassificationException now extends
BusinessException directly. The subtype relationship bought nothing: nothing
catches either type, both map to 400, and the only thing it required was a
protected constructor on the parent existing solely to pass this class's message
key through. That constructor is removed as dead.
MONSTER CLASS (21 dependencies). Resolved in the previous commit by deleting the
persist(Runnable) overload, which became unreachable once every call site carried
a resource-specific message key.
While fixing the Critical dangling javadoc, the identical mistake was made in
Schedule10CheckStatus -- the new Band record landed between requireRange's
javadoc and its method. Checkstyle caught it along with two over-long lines from
the same edit.
Verification: 1151 unit + 881 integration tests, 0 failures; 0 checkstyle
violations in schedule10 under the newly bumped 13.10.0.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments