mirror of
https://github.com/OMGeeky/ATCS.git
synced 2026-02-23 15:38:23 +01:00
refactor: improve bounds checking in getElementAt method in CommonEditor
This commit is contained in:
@@ -213,7 +213,7 @@ public final class CommonEditor {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public E getElementAt(int index) {
|
public E getElementAt(int index) {
|
||||||
if (getInner() == null) return null;
|
if (index < 0 || index >= getSize()) return null;
|
||||||
return getInner().get(index);
|
return getInner().get(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user