Skip to content

Commit b69f78d

Browse files
committed
Fix SpotBugs JLM_JSR166_UTILCONCURRENT_MONITORENTER in BulkScanWorker.cleanup()
Replace synchronization on AtomicBoolean with dedicated lock object to address SpotBugs warning about synchronizing on util.concurrent instances.
1 parent fedca25 commit b69f78d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/de/rub/nds/crawler/core/BulkScanWorker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public final boolean cleanup() {
8282
// synchronize such that init and cleanup do not run simultaneously
8383
// but only synchronize if already initialized
8484
if (initialized.get()) {
85-
synchronized (initialized) {
85+
synchronized (initializationLock) {
8686
if (activeJobs.get() > 0) {
8787
shouldCleanupSelf.set(true);
8888
LOGGER.warn(

0 commit comments

Comments
 (0)