[Minor] AbstractListParameter.getValue(int) throws meaningful exception if out of bounds

This commit is contained in:
Robert von Burg 2021-08-30 09:37:25 +02:00
parent a876509eb1
commit 3220777b72
1 changed files with 2 additions and 0 deletions

View File

@ -93,6 +93,8 @@ public abstract class AbstractListParameter<E> extends AbstractParameter<List<E>
@Override
public E getValue(int index) {
if (this.value.isEmpty() || this.value.size() < index)
throw new IllegalStateException("No value at index " + index + " for " + getLocator());
return this.value.get(index);
}