Add in missing Java std::list listIterator index range checking
This commit is contained in:
parent
fccf5c29b4
commit
44cd658a53
3 changed files with 38 additions and 0 deletions
|
|
@ -55,6 +55,8 @@ namespace std {
|
|||
private Iterator last;
|
||||
|
||||
private java.util.ListIterator<$typemap(jboxtype, T)> init(int index) {
|
||||
if (index < 0 || index > $javaclassname.this.size())
|
||||
throw new IndexOutOfBoundsException("Index: " + index);
|
||||
pos = $javaclassname.this.begin();
|
||||
pos = pos.advance_unchecked(index);
|
||||
return this;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue