Commit eb19cdd
committed
Fix UC_USELESS_CONDITION SpotBugs warnings across multiple files
This change resolves "Condition has no effect" (UC_USELESS_CONDITION) warnings reported by SpotBugs in several core classes including Component, MenuBar, CSSEngine, CSSParser, and MathUtil. It also updates the quality report generation script to enforce this rule in CI.
Key changes:
- `Component.java`: Refactored `paintLock` logic to remove redundant checks.
- `ComponentGroup.java`: Simplified boolean logic in `updateUIIDs` to avoid redundancy.
- `MenuBar.java`: Removed dead code related to deprecated ICS command behavior.
- `CSSEngine.java`: Made `fontSize` range check explicit.
- `CSSParser.java`: Improved EOF check readability in whitespace loop.
- `MathUtil.java`: Removed redundant floating-point precision checks in `asin` and `atan`.
- `.github/scripts/generate-quality-report.py`: Added `UC_USELESS_CONDITION` to the list of enforced rules.1 parent e20ec34 commit eb19cdd
File tree
7 files changed
+26
-25
lines changed- CodenameOne/src/com/codename1
- ui
- html
- util
7 files changed
+26
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7378 | 7378 | | |
7379 | 7379 | | |
7380 | 7380 | | |
7381 | | - | |
7382 | | - | |
7383 | | - | |
| 7381 | + | |
7384 | 7382 | | |
7385 | 7383 | | |
7386 | | - | |
7387 | | - | |
7388 | | - | |
7389 | | - | |
| 7384 | + | |
| 7385 | + | |
| 7386 | + | |
7390 | 7387 | | |
7391 | 7388 | | |
7392 | 7389 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1497 | 1497 | | |
1498 | 1498 | | |
1499 | 1499 | | |
1500 | | - | |
1501 | | - | |
1502 | | - | |
1503 | | - | |
1504 | | - | |
1505 | | - | |
1506 | | - | |
1507 | | - | |
1508 | | - | |
1509 | | - | |
1510 | | - | |
1511 | | - | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
1512 | 1506 | | |
1513 | 1507 | | |
1514 | 1508 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1360 | 1360 | | |
1361 | 1361 | | |
1362 | 1362 | | |
1363 | | - | |
| 1363 | + | |
1364 | 1364 | | |
1365 | 1365 | | |
1366 | 1366 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
954 | 954 | | |
955 | 955 | | |
956 | 956 | | |
957 | | - | |
958 | | - | |
959 | | - | |
| 957 | + | |
960 | 958 | | |
961 | 959 | | |
962 | 960 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
0 commit comments