[Minor] AbstractListParameter.getValue(int) throws meaningful exception if out of bounds
This commit is contained in:
parent
a876509eb1
commit
3220777b72
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue