Closed
Description
When working on improving the test coverage of Lookup
I realised that the semantics of searchPath is a bit surprising and it might make sense to clean this up at some point.
- The search Path returned by getDefaultSearchPath is always a list, that might be empty.
- However, there is a conditional for searchPath being null, however it takes a bit of effort to trigger that path. Calling
setSearchPath()
with a nullList<Name>
will cause aNullPointerException
as will a null String or null Name. It turns out that to trigger the conditional you will need to provide a(String[]) null
.
I propose we address this by disallowing a null searchPath, and always set it to emptyList()
Metadata
Metadata
Assignees
Labels
No labels