refactor: improve bounds checking in getElementAt method in CommonEditor

This commit is contained in:
OMGeeky
2025-06-18 13:53:49 +02:00
parent bec4ddb71c
commit 775aba3a3f

View File

@@ -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);
}