Modify ↓
Opened 4 hours ago
#24949 new defect
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)
Note:
See TracTickets
for help on using tickets.


