[Minor] Allow empty Locator
This commit is contained in:
parent
7969873a46
commit
83624b2101
|
@ -68,7 +68,7 @@ public class Locator {
|
||||||
* if the path is invalid, meaning has less than two elements in it
|
* if the path is invalid, meaning has less than two elements in it
|
||||||
*/
|
*/
|
||||||
private Locator(List<String> pathElements) throws StrolchException {
|
private Locator(List<String> pathElements) throws StrolchException {
|
||||||
if (pathElements == null || pathElements.isEmpty()) {
|
if (pathElements == null) {
|
||||||
throw new StrolchException("The path elements may not be null and must contain at least 1 item"); //$NON-NLS-1$
|
throw new StrolchException("The path elements may not be null and must contain at least 1 item"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
this.pathElements = Collections.unmodifiableList(new ArrayList<>(pathElements));
|
this.pathElements = Collections.unmodifiableList(new ArrayList<>(pathElements));
|
||||||
|
|
Loading…
Reference in New Issue