diff --git a/Project/src/SetPlanesGeneric.java b/Project/src/SetPlanesGeneric.java index 3ffbb31..8deeb53 100644 --- a/Project/src/SetPlanesGeneric.java +++ b/Project/src/SetPlanesGeneric.java @@ -55,6 +55,11 @@ public class SetPlanesGeneric implements Iterable throw new PlaneNotFoundException(position); } + if (_places.get(position) == null) + { + throw new PlaneNotFoundException(position); + } + // удаление объекта из массива, присовив элементу массива значение null T temp = _places.get(position); _places.remove(position);