From a0ea02fe173cbe1b097db147470f3a77e3d880f2 Mon Sep 17 00:00:00 2001 From: "David G. Young" Date: Mon, 30 Dec 2019 11:44:27 -0500 Subject: [PATCH 1/2] Fix ConcurrentModificationException crash reported in issue #929 --- CHANGELOG.md | 3 +++ lib/src/main/java/org/altbeacon/beacon/service/ScanJob.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2fd104b04..f7bec2a89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +### Development +- Fix ConcurrentModificationException crash on background detection reported in #929. (#937, David G. Young) + ### 2.16.3 / 2019-09-18 - Fix thread leak with 0 regions and settings applied, (#888, David G. Young) diff --git a/lib/src/main/java/org/altbeacon/beacon/service/ScanJob.java b/lib/src/main/java/org/altbeacon/beacon/service/ScanJob.java index ede97b84f..062aab6ae 100644 --- a/lib/src/main/java/org/altbeacon/beacon/service/ScanJob.java +++ b/lib/src/main/java/org/altbeacon/beacon/service/ScanJob.java @@ -77,7 +77,7 @@ public void run() { LogManager.i(TAG, "Running periodic scan job: instance is "+ScanJob.this); } - List queuedScanResults = ScanJobScheduler.getInstance().dumpBackgroundScanResultQueue(); + List queuedScanResults = new ArrayList<>(ScanJobScheduler.getInstance().dumpBackgroundScanResultQueue()); LogManager.d(TAG, "Processing %d queued scan resuilts", queuedScanResults.size()); for (ScanResult result : queuedScanResults) { ScanRecord scanRecord = result.getScanRecord(); From 98b8093ed0b7f1597a29e63ea94afa98049eb03c Mon Sep 17 00:00:00 2001 From: "David G. Young" Date: Fri, 3 Jan 2020 17:14:54 +0300 Subject: [PATCH 2/2] update changelog PR number --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7bec2a89..0e59b1f43 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ ### Development -- Fix ConcurrentModificationException crash on background detection reported in #929. (#937, David G. Young) +- Fix ConcurrentModificationException crash on background detection reported in #929. (#940, David G. Young) ### 2.16.3 / 2019-09-18