From 8feb7ccbc4542b115952a664025c63cbb9ea92f5 Mon Sep 17 00:00:00 2001 From: Programmist73 Date: Fri, 2 Dec 2022 18:27:25 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=B0=D1=8F=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B0=D0=B2=D0=BA=D0=B0=207-=D0=B9=20=D0=BB=D0=B0=D0=B1?= =?UTF-8?q?=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=BD=D0=BE=D0=B9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Project/src/SetPlanesGeneric.java | 5 +++++ 1 file changed, 5 insertions(+) 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);