Commit e1bf4ba
committed
Fix SpotBugs warnings: Implement proper hashCode and equals for core classes
- Implemented consistent `hashCode()` and `equals()` for:
- `Geofence`: uses id, location, radius, expiration.
- `PropertyBase`: uses name.
- `Font`: uses native font or attributes.
- `Border` / `CSSBorder` / `RoundBorder`: uses fields or identity where appropriate.
- `Style`: manual hash calculation for primitive arrays (margin/padding) to avoid missing Arrays utility in CLDC.
- `TarEntry`: added `equals(Object)` override and `hashCode` based on header name.
- `Transform`: uses type and matrix values.
- `ImageDownloadService`: uses cacheId.
- `BoxLayout`: added `align` to equals/hashCode to fix layout update issues.
- `BorderLayout`, `FlowLayout`, `GridLayout`, `TableLayout`: uses configuration fields.
- Fixed `BoxLayout` equality check to include alignment, resolving layout update regression.
- Manual array hashing in `Style` ensures CLDC 1.1 compatibility.1 parent 4426ca6 commit e1bf4ba
File tree
2 files changed
+14
-2
lines changed- CodenameOne/src/com/codename1/ui
- layouts
- plaf
2 files changed
+14
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
523 | | - | |
| 523 | + | |
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
528 | | - | |
| 528 | + | |
529 | 529 | | |
530 | 530 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3168 | 3168 | | |
3169 | 3169 | | |
3170 | 3170 | | |
| 3171 | + | |
| 3172 | + | |
| 3173 | + | |
| 3174 | + | |
| 3175 | + | |
| 3176 | + | |
| 3177 | + | |
| 3178 | + | |
| 3179 | + | |
| 3180 | + | |
| 3181 | + | |
| 3182 | + | |
3171 | 3183 | | |
3172 | 3184 | | |
3173 | 3185 | | |
| |||
0 commit comments