[Minor] Allow empty Locator

This commit is contained in:
Robert von Burg 2018-01-04 14:48:41 +01:00
parent 7969873a46
commit 83624b2101
1 changed files with 1 additions and 1 deletions

View File

@ -68,7 +68,7 @@ public class Locator {
* if the path is invalid, meaning has less than two elements in it
*/
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$
}
this.pathElements = Collections.unmodifiableList(new ArrayList<>(pathElements));