Commit c43fc81
Fix SpotBugs SF_SWITCH_NO_DEFAULT warnings (#4350)
* Fix SpotBugs SF_SWITCH_NO_DEFAULT warnings and enforce as error
This commit addresses missing default cases in switch statements across the codebase, as flagged by SpotBugs (SF_SWITCH_NO_DEFAULT).
Key changes:
- Added `default: break;` or appropriate fallback logic to switch statements in `CodenameOne/src` files including Charts, Components, UI, Layouts, and Utils.
- Updated `.github/scripts/generate-quality-report.py` to treat `SF_SWITCH_NO_DEFAULT` as a forbidden rule, causing the build to fail if new violations are introduced.
- Verified compilation of `codenameone-core` to ensure no syntax errors (e.g., duplicate labels) were introduced.
* Fixed verification issues due to merge
* More issues due to the merge problem
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Shai Almog <[email protected]>1 parent 47ebae4 commit c43fc81
File tree
54 files changed
+280
-27
lines changed- .github/scripts
- CodenameOne/src/com/codename1
- charts/transitions
- cloud
- components
- impl
- io
- l10n
- properties
- push
- ui
- animations
- geom
- html
- layouts
- plaf
- scene
- spinner
- table
- util
- util
- promise
- regex
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
54 files changed
+280
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
760 | 760 | | |
761 | 761 | | |
762 | 762 | | |
763 | | - | |
| 763 | + | |
| 764 | + | |
764 | 765 | | |
765 | 766 | | |
766 | 767 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
114 | 117 | | |
115 | 118 | | |
116 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
765 | 765 | | |
766 | 766 | | |
767 | 767 | | |
| 768 | + | |
| 769 | + | |
768 | 770 | | |
769 | 771 | | |
770 | 772 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| 179 | + | |
| 180 | + | |
179 | 181 | | |
180 | 182 | | |
181 | 183 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
492 | 492 | | |
493 | 493 | | |
494 | 494 | | |
495 | | - | |
| 495 | + | |
| 496 | + | |
496 | 497 | | |
497 | 498 | | |
498 | 499 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
292 | 295 | | |
293 | 296 | | |
294 | 297 | | |
| |||
Lines changed: 36 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2696 | 2696 | | |
2697 | 2697 | | |
2698 | 2698 | | |
| 2699 | + | |
| 2700 | + | |
2699 | 2701 | | |
2700 | 2702 | | |
2701 | 2703 | | |
| |||
5867 | 5869 | | |
5868 | 5870 | | |
5869 | 5871 | | |
| 5872 | + | |
| 5873 | + | |
5870 | 5874 | | |
5871 | 5875 | | |
5872 | 5876 | | |
| |||
5926 | 5930 | | |
5927 | 5931 | | |
5928 | 5932 | | |
| 5933 | + | |
| 5934 | + | |
5929 | 5935 | | |
5930 | 5936 | | |
5931 | 5937 | | |
| |||
7970 | 7976 | | |
7971 | 7977 | | |
7972 | 7978 | | |
7973 | | - | |
7974 | | - | |
7975 | | - | |
7976 | | - | |
7977 | | - | |
7978 | | - | |
7979 | | - | |
7980 | | - | |
7981 | | - | |
7982 | | - | |
7983 | | - | |
7984 | | - | |
7985 | | - | |
7986 | | - | |
7987 | | - | |
7988 | | - | |
7989 | | - | |
7990 | | - | |
7991 | 7979 | | |
7992 | 7980 | | |
7993 | 7981 | | |
| |||
8110 | 8098 | | |
8111 | 8099 | | |
8112 | 8100 | | |
| 8101 | + | |
| 8102 | + | |
| 8103 | + | |
| 8104 | + | |
| 8105 | + | |
| 8106 | + | |
| 8107 | + | |
| 8108 | + | |
| 8109 | + | |
| 8110 | + | |
| 8111 | + | |
| 8112 | + | |
| 8113 | + | |
8113 | 8114 | | |
8114 | 8115 | | |
8115 | 8116 | | |
| |||
8129 | 8130 | | |
8130 | 8131 | | |
8131 | 8132 | | |
| 8133 | + | |
| 8134 | + | |
| 8135 | + | |
| 8136 | + | |
| 8137 | + | |
| 8138 | + | |
| 8139 | + | |
8132 | 8140 | | |
8133 | 8141 | | |
8134 | 8142 | | |
| |||
8237 | 8245 | | |
8238 | 8246 | | |
8239 | 8247 | | |
| 8248 | + | |
| 8249 | + | |
8240 | 8250 | | |
8241 | 8251 | | |
8242 | 8252 | | |
| |||
8266 | 8276 | | |
8267 | 8277 | | |
8268 | 8278 | | |
| 8279 | + | |
| 8280 | + | |
8269 | 8281 | | |
8270 | 8282 | | |
8271 | 8283 | | |
| |||
8295 | 8307 | | |
8296 | 8308 | | |
8297 | 8309 | | |
| 8310 | + | |
| 8311 | + | |
8298 | 8312 | | |
8299 | 8313 | | |
8300 | 8314 | | |
| |||
8381 | 8395 | | |
8382 | 8396 | | |
8383 | 8397 | | |
| 8398 | + | |
| 8399 | + | |
8384 | 8400 | | |
8385 | 8401 | | |
8386 | 8402 | | |
| |||
8570 | 8586 | | |
8571 | 8587 | | |
8572 | 8588 | | |
| 8589 | + | |
| 8590 | + | |
8573 | 8591 | | |
8574 | 8592 | | |
8575 | 8593 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
601 | 604 | | |
602 | 605 | | |
603 | 606 | | |
| |||
877 | 880 | | |
878 | 881 | | |
879 | 882 | | |
| 883 | + | |
| 884 | + | |
880 | 885 | | |
881 | 886 | | |
882 | 887 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
474 | 474 | | |
475 | 475 | | |
476 | 476 | | |
| 477 | + | |
| 478 | + | |
477 | 479 | | |
478 | 480 | | |
479 | 481 | | |
| |||
615 | 617 | | |
616 | 618 | | |
617 | 619 | | |
| 620 | + | |
| 621 | + | |
618 | 622 | | |
619 | 623 | | |
620 | 624 | | |
| |||
0 commit comments