Modify ↓
Opened 3 days ago
Closed 3 days ago
#24949 closed defect (duplicate)
refactor: return empty array instead of null in getSelectedDirection
| Reported by: | Owned by: | team | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core | Version: | |
| Keywords: | Cc: |
Description
Changes the getSelectedDirection method to return an empty array
instead of null when no valid direction is found. This avoids potential
NullPointerExceptions and follows the Null Object Pattern.
- Updated
getSelectedDirectionto reuse a staticEMPTY_DIRECTIONconstant - Adjusted
actionPerformedandupdateEnabledStateto check for array length - Fixed unit test to assert an empty array instead of null
Attachments (1)
Change History (3)
by , 3 days ago
| Attachment: | 24949.patch added |
|---|
comment:1 by , 3 days ago
comment:2 by , 3 days ago
| Resolution: | → duplicate |
|---|---|
| Status: | new → closed |
Closed as duplicate of #24951.
Note:
See TracTickets
for help on using tickets.



This was code I added, I've addressed this in the patch attached to #24951.