nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi] ijokarumawak commented on a change in pull request #3552: NIFI-6395: Thread-safety bug fixed and added new flag property to han…
Date Tue, 05 Nov 2019 11:44:01 GMT
ijokarumawak commented on a change in pull request #3552: NIFI-6395: Thread-safety bug fixed
and added new flag property to han…
URL: https://github.com/apache/nifi/pull/3552#discussion_r342518406
 
 

 ##########
 File path: nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/CountText.java
 ##########
 @@ -213,10 +221,10 @@ public void onTrigger(ProcessContext context, ProcessSession processSession)
thr
         }
         AtomicBoolean error = new AtomicBoolean();
 
-        lineCount = 0;
-        lineNonEmptyCount = 0;
-        wordCount = 0;
-        characterCount = 0;
+        final AtomicInteger lineCount = new AtomicInteger(0);
+        final AtomicInteger lineNonEmptyCount = new AtomicInteger(0);
+        final AtomicInteger wordCount = new AtomicInteger(0);
+        final AtomicInteger characterCount = new AtomicInteger(0);
 
 Review comment:
   Thanks for the explanation. I was looking at the only changed code and didn't pay attention
to the lambda part. That makes sense.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message