Repository navigation
Commit 7914b3d
committed
fix: address Sonar-flagged reliability bugs
- ToStringBuilder: release the ThreadLocal registry entry once it
unwinds back to empty instead of retaining it for the thread's
lifetime (S5164).
- IndexData/UsageMap: mask promoted byte values with & 0xFF before
the bit-test shift, making the sign-extension safety explicit
(S3034).
- IndexPageCache.updateEntry: getParentPage() can return null; fail
fast instead of silently wrapping null into a CacheDataPage that
would NPE downstream (javabugs:S2259).
- AbstractBaseTest: merge the two @beforeeach methods into one, since
JUnit doesn't guarantee their relative execution order (S8745).
A few other Sonar bug findings (ThreadLocal reuse buffer in
GeneralLegacyIndexCodes, BigDecimal(double, MathContext) in
NumberFormatter, Duration.between(LocalDateTime) in ColumnImpl) are
intentional and documented, resolved as Won't Fix in SonarCloud
rather than changed in code.1 parent 0c4aaad commit 7914b3d
5 files changed
Lines changed: 16 additions & 9 deletions
File tree
- src
- main/java/io/github/spannm/jackcess
- impl
- util
- test/java/io/github/spannm/jackcess/test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1162 | 1162 | | |
1163 | 1163 | | |
1164 | 1164 | | |
1165 | | - | |
| 1165 | + | |
1166 | 1166 | | |
1167 | 1167 | | |
1168 | 1168 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
313 | 320 | | |
314 | 321 | | |
315 | 322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
175 | 179 | | |
176 | 180 | | |
177 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | 73 | | |
79 | 74 | | |
80 | 75 | | |
| |||
88 | 83 | | |
89 | 84 | | |
90 | 85 | | |
91 | | - | |
| 86 | + | |
| 87 | + | |
92 | 88 | | |
93 | 89 | | |
94 | 90 | | |
| |||
0 commit comments