void (String path, Map<String, AtomicInteger> countMap) { AtomicInteger counter = countMap.get(path); if (counter == null) { counter = countMap.put(path, new AtomicInteger(1)); } if (counter != null) { counter.incrementAndGet(); } }