mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-26 15:57:22 +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
|
||||
public E getElementAt(int index) {
|
||||
if (getInner() == null) return null;
|
||||
if (index < 0 || index >= getSize()) return null;
|
||||
return getInner().get(index);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user