From 94b5d0d393b59e47fb6530f50b00fa8bcdf66e0d Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Wed, 8 Aug 2018 10:59:49 +0300 Subject: [PATCH] Fix ConcurrentModificationException in #673 --- .../djrapitops/plan/data/store/mutators/GeoInfoMutator.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Plan/src/main/java/com/djrapitops/plan/data/store/mutators/GeoInfoMutator.java b/Plan/src/main/java/com/djrapitops/plan/data/store/mutators/GeoInfoMutator.java index 7be669b7a..03f982bce 100644 --- a/Plan/src/main/java/com/djrapitops/plan/data/store/mutators/GeoInfoMutator.java +++ b/Plan/src/main/java/com/djrapitops/plan/data/store/mutators/GeoInfoMutator.java @@ -36,7 +36,6 @@ public class GeoInfoMutator { if (geoInfo.isEmpty()) { return Optional.empty(); } - geoInfo.sort(new GeoInfoComparator()); - return Optional.of(geoInfo.get(0)); + return geoInfo.stream().min(new GeoInfoComparator()); } } \ No newline at end of file