Commit 64a2e8e
authored
Fix SpotBugs NP_ALWAYS_NULL warnings (#4364)
* Fix SpotBugs NP_ALWAYS_NULL warnings in Form and UIFragment
Fixes "Null pointer dereference" warnings reported by SpotBugs.
- In `Form.java`, fix potential NPE in `getFormLayeredPane` and safely handle `formLayeredPane` using a local variable.
- In `UIFragment.java`, initialize `el` before dereferencing it in `buildXMLFromJSONNotation` when the first element is not a String.
- Update `.github/scripts/generate-quality-report.py` to fail on `NP_ALWAYS_NULL` violations.
* Fix SpotBugs NP_ALWAYS_NULL warnings in Form and UIFragment
Fixes "Null pointer dereference" warnings reported by SpotBugs.
- In `Form.java`, fix potential NPE in `getFormLayeredPane` by handling the null case for class `c` correctly and safely handling `formLayeredPane` using a local variable.
- In `UIFragment.java`, initialize `el` before dereferencing it in `buildXMLFromJSONNotation` when the first element is not a String.
- Update `.github/scripts/generate-quality-report.py` to fail on `NP_ALWAYS_NULL` violations.
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>1 parent e1b6c87 commit 64a2e8e
File tree
3 files changed
+9
-6
lines changed- .github/scripts
- CodenameOne/src/com/codename1/ui
3 files changed
+9
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
758 | 758 | | |
759 | 759 | | |
760 | 760 | | |
| 761 | + | |
761 | 762 | | |
762 | 763 | | |
763 | 764 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1568 | 1568 | | |
1569 | 1569 | | |
1570 | 1570 | | |
| 1571 | + | |
1571 | 1572 | | |
1572 | 1573 | | |
1573 | 1574 | | |
1574 | 1575 | | |
1575 | 1576 | | |
1576 | | - | |
| 1577 | + | |
1577 | 1578 | | |
1578 | 1579 | | |
1579 | 1580 | | |
| |||
1583 | 1584 | | |
1584 | 1585 | | |
1585 | 1586 | | |
1586 | | - | |
1587 | | - | |
| 1587 | + | |
| 1588 | + | |
1588 | 1589 | | |
1589 | 1590 | | |
1590 | 1591 | | |
1591 | 1592 | | |
1592 | 1593 | | |
1593 | 1594 | | |
1594 | 1595 | | |
1595 | | - | |
| 1596 | + | |
1596 | 1597 | | |
1597 | 1598 | | |
1598 | 1599 | | |
| |||
1603 | 1604 | | |
1604 | 1605 | | |
1605 | 1606 | | |
1606 | | - | |
| 1607 | + | |
1607 | 1608 | | |
1608 | | - | |
| 1609 | + | |
1609 | 1610 | | |
1610 | 1611 | | |
1611 | 1612 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
912 | 912 | | |
913 | 913 | | |
914 | 914 | | |
| 915 | + | |
915 | 916 | | |
916 | 917 | | |
917 | 918 | | |
| |||
0 commit comments