Commit bb262dc
fix(schedule10): address the PR #305 review comments
All three "should fix" items from SScholefield's review.
1. DEAD persist(Runnable) OVERLOAD -- already gone. Removed during the SonarCloud
pass for the same reason the review gives: once all seven call sites carried a
resource-specific message key, the generic overload was unreachable. The
ScheduleNotSavedException import went with it.
2. IDENTICAL if/else BODIES at the duplicate-cost branch. Real, and mine: when the
read path changed from summing duplicates to last-row-wins, both branches became
the same put. Collapsed to a conditional LOG.warn followed by one put. The
containsKey check stays -- a present-but-null entry is a real cost row, so
get() != null would miss a duplicate. Now in Schedule10DocumentAssembler.
3. THE "22 KEYS" CLAIM in InvalidTflNumberException. Real, and worse than the
review could see from the diff. Recounting showed BOTH tables now hold 20
identical live TFL keys -- so the "21 versus 20" correction went stale inside the
very commit that demoted 52B. That is a hard-coded count drifting for the third
time in this story.
So rather than write a fourth number, both javadocs now state the PROPERTY the
code actually depends on: the two tables accept and reject the same values, and
here a single table answers both the accept question and the derive question. 52B
keeps a sentence because it is the one real difference in the two tables' history.
Each note says explicitly why no count is quoted, so the next reader does not
helpfully add one back.
Verification: 1151 unit tests, 0 failures, including the six cost-map guards that
cover the collapsed branch; 0 checkstyle violations in schedule10.
Not addressed here, by agreement: the ROAD_CONSTRUCTION_REPORT_SEQ pre-deploy
item is a process blocker rather than a code change, and is being linked from the
PR description instead.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 66d01c4 commit bb262dc
3 files changed
Lines changed: 26 additions & 21 deletions
File tree
- backend/src/main/java/ca/bc/gov/nrs/ilcr/schedule10
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
| |||
Lines changed: 13 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
102 | 101 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
113 | 112 | | |
114 | 113 | | |
115 | 114 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
| 149 | + | |
148 | 150 | | |
149 | 151 | | |
150 | 152 | | |
151 | 153 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | 154 | | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
0 commit comments