ottlinger commented on code in PR #240:
URL: https://github.com/apache/creadur-rat/pull/240#discussion_r1581906606


##########
apache-rat-core/src/main/java/org/apache/rat/report/claim/ClaimStatistic.java:
##########
@@ -57,45 +58,71 @@ public int getCounter(Counter counter) {
         return count == null ? 0 : count[0];
     }
 
-    /**
-     * @return Returns a map with the file types. The map keys
-     * are file type names and the map values
-     * are integers with the number of resources matching
-     * the file type.
-     */
-    public Map<Counter, int[]> getCounterMap() {
-        return counterMap;
+    public void incCounter(Counter key, int value) {
+        final int[] num = counterMap.get(key);
+
+        if (num == null) {
+            counterMap.put(key, new int[] { value });
+        } else {
+            num[0] += value;

Review Comment:
   are we running into problems here, when we do multithreaded analysis? Do we 
need AtomicInteger here?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@creadur.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to