From 7962363255e507efc6a7de5d47e48acb8bceb305 Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Mon, 27 Aug 2018 16:54:12 +0300 Subject: [PATCH] Disabled BOOKKEEPING flag for normal use Also fixed all compilation warnings from the file. gitlab #5 Change-Id: I5697ade4a1443df565dd19f78fa1ce044ae97169 --- .../simantics/db/impl/graph/AsyncBarrierImpl.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/graph/AsyncBarrierImpl.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/graph/AsyncBarrierImpl.java index 232e5cbd7..af0604ae6 100644 --- a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/graph/AsyncBarrierImpl.java +++ b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/graph/AsyncBarrierImpl.java @@ -26,14 +26,14 @@ final public class AsyncBarrierImpl extends AtomicInteger implements AsyncBarrie private static final long serialVersionUID = 4724463372850048672L; - static final HashMap> reverseLookup = new HashMap>(); - public static final HashMap debuggerMap = new HashMap(); - static final HashMap entryMap = new HashMap(); - static final HashMap restartMap = new HashMap(); + static final HashMap> reverseLookup = new HashMap<>(); + public static final HashMap debuggerMap = new HashMap<>(); + static final HashMap> entryMap = new HashMap<>(); + static final HashMap restartMap = new HashMap<>(); static final int WAIT_TIME = 600; - public static final boolean BOOKKEEPING = true; + public static final boolean BOOKKEEPING = false; public static final boolean PRINT = false; static final boolean RESTART_GUARD = true; @@ -41,7 +41,7 @@ final public class AsyncBarrierImpl extends AtomicInteger implements AsyncBarrie //private final Semaphore sema = new Semaphore(0); - public AsyncBarrierImpl(AsyncBarrierImpl caller, CacheEntry entry) { + public AsyncBarrierImpl(AsyncBarrierImpl caller, CacheEntry entry) { super(0); if (BOOKKEEPING) { synchronized (entryMap) { @@ -208,7 +208,7 @@ final public class AsyncBarrierImpl extends AtomicInteger implements AsyncBarrie } public static String report(AsyncBarrierImpl barrier) { - CacheEntry e = entryMap.get(barrier); + CacheEntry e = entryMap.get(barrier); if(e != null) return e.toString(); else return "Barrier@" + System.identityHashCode(barrier); } -- 2.47.1