You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 null List<Name> will cause a NullPointerException 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()
The text was updated successfully, but these errors were encountered:
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.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()
The text was updated successfully, but these errors were encountered: