Commit 085dde3
authored
Fix SpotBugs SS_SHOULD_BE_STATIC warnings (#4380)
* Fix SpotBugs "Unread field: should this field be static?" warnings
Converted identified fields to static final constants where appropriate and removed unused fields in:
- CacheMap.java
- JavascriptContext.java
- MapComponent.java
- ArrowLinesLayer.java
- Component.java
- FlipTransition.java
- LookAndFeel.java
- DateSpinner3D.java
- Spinner3D.java
- SpinnerNode.java
- Tree.java
- CodenameOneMiGComponentWrapper.java
- MigLayout.java
Updated maven/core-unittests/pom.xml to fail on SpotBugs errors.
* Fix SpotBugs "Unread field: should this field be static?" warnings
Converted identified fields to static final constants where appropriate and removed unused fields in:
- CacheMap.java
- JavascriptContext.java
- MapComponent.java
- ArrowLinesLayer.java
- Component.java
- FlipTransition.java
- LookAndFeel.java
- DateSpinner3D.java
- Spinner3D.java
- SpinnerNode.java
- Tree.java
- CodenameOneMiGComponentWrapper.java
- MigLayout.java
Updated maven/core-unittests/pom.xml to fail on SpotBugs errors.
Updated .github/scripts/generate-quality-report.py to fail on SS_SHOULD_BE_STATIC.
* Fix SpotBugs "Unread field: should this field be static?" warnings
Converted identified fields to static final constants where appropriate and removed unused fields in:
- CacheMap.java
- JavascriptContext.java
- MapComponent.java
- ArrowLinesLayer.java
- Component.java
- FlipTransition.java
- LookAndFeel.java
- DateSpinner3D.java
- Spinner3D.java
- SpinnerNode.java
- Tree.java
- CodenameOneMiGComponentWrapper.java
- MigLayout.java
Updated maven/core-unittests/pom.xml to fail on SpotBugs errors.
Updated .github/scripts/generate-quality-report.py to fail on SS_SHOULD_BE_STATIC.
* Fix SpotBugs SS_SHOULD_BE_STATIC warnings and enforce build failure
Refactored several fields to be `static final` where appropriate to address "Unread field: should this field be static?" warnings. Removed unused fields in `MigLayout`, `CacheMap`, and `CodenameOneMiGComponentWrapper`.
Updated `maven/core-unittests/pom.xml` to fail on error and `.github/scripts/generate-quality-report.py` to forbid `SS_SHOULD_BE_STATIC`.
Modified files:
- `CodenameOne/src/com/codename1/io/CacheMap.java`
- `CodenameOne/src/com/codename1/javascript/JavascriptContext.java`
- `CodenameOne/src/com/codename1/maps/MapComponent.java`
- `CodenameOne/src/com/codename1/maps/layers/ArrowLinesLayer.java`
- `CodenameOne/src/com/codename1/ui/Component.java`
- `CodenameOne/src/com/codename1/ui/animations/FlipTransition.java`
- `CodenameOne/src/com/codename1/ui/layouts/mig/CodenameOneMiGComponentWrapper.java`
- `CodenameOne/src/com/codename1/ui/layouts/mig/MigLayout.java`
- `CodenameOne/src/com/codename1/ui/plaf/LookAndFeel.java`
- `CodenameOne/src/com/codename1/ui/spinner/DateSpinner3D.java`
- `CodenameOne/src/com/codename1/ui/spinner/SpinnerNode.java`
- `CodenameOne/src/com/codename1/ui/tree/Tree.java`
- `maven/core-unittests/pom.xml`
- `.github/scripts/generate-quality-report.py`
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>1 parent 7b86654 commit 085dde3
File tree
15 files changed
+16
-20
lines changed- .github/scripts
- CodenameOne/src/com/codename1
- io
- javascript
- maps
- layers
- ui
- animations
- layouts/mig
- plaf
- spinner
- tree
- maven/core-unittests
15 files changed
+16
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
808 | 808 | | |
809 | 809 | | |
810 | 810 | | |
811 | | - | |
| 811 | + | |
| 812 | + | |
812 | 813 | | |
813 | 814 | | |
814 | 815 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
54 | 53 | | |
55 | 54 | | |
56 | 55 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
| 85 | + | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
| 324 | + | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
| 65 | + | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
| |||
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | 86 | | |
88 | 87 | | |
89 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
| 133 | + | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
0 commit comments