From 7ea8cb63d27dc1d913e6e0861e03586f748c746e Mon Sep 17 00:00:00 2001 From: Denny Sheirer Date: Sun, 11 Feb 2024 04:26:54 -0500 Subject: [PATCH] #1843 Map entity plotter concurrent modification exception (#1844) Co-authored-by: Dennis Sheirer --- .../github/dsheirer/map/PlottableEntityHistory.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/java/io/github/dsheirer/map/PlottableEntityHistory.java b/src/main/java/io/github/dsheirer/map/PlottableEntityHistory.java index f99c9a9f3..301bfa824 100644 --- a/src/main/java/io/github/dsheirer/map/PlottableEntityHistory.java +++ b/src/main/java/io/github/dsheirer/map/PlottableEntityHistory.java @@ -1,7 +1,6 @@ /* - * ****************************************************************************** - * sdrtrunk - * Copyright (C) 2014-2018 Dennis Sheirer + * ***************************************************************************** + * Copyright (C) 2014-2024 Dennis Sheirer * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,7 +14,7 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see - * ***************************************************************************** + * **************************************************************************** */ package io.github.dsheirer.map; @@ -23,11 +22,9 @@ import io.github.dsheirer.identifier.Identifier; import io.github.dsheirer.identifier.IdentifierCollection; import io.github.dsheirer.module.decode.event.PlottableDecodeEvent; -import org.jdesktop.swingx.mapviewer.GeoPosition; - import java.util.ArrayList; -import java.util.Collections; import java.util.List; +import org.jdesktop.swingx.mapviewer.GeoPosition; /** * Plottable entity history with location history. @@ -52,7 +49,7 @@ public PlottableEntityHistory(Identifier identifier, PlottableDecodeEvent event) */ public List getLocationHistory() { - return Collections.unmodifiableList(mLocationHistory); + return new ArrayList<>(mLocationHistory); } /**