tkobayas commented on code in PR #6708:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6708#discussion_r3264903936


##########
drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/PackageModel.java:
##########
@@ -154,7 +155,7 @@ public class PackageModel {
 
     private final List<MethodDeclaration> functions = new ArrayList<>();
 
-    private final List<TypeDeclaration> generatedPOJOs = new ArrayList<>();
+    private final List<TypeDeclaration> generatedPOJOs = new 
CopyOnWriteArrayList<>();

Review Comment:
   During build, helper classes like `accumulate5Accumulate68` are added to 
this list. With a plain `ArrayList`, the added class may be lost under 
concurrency and result in a build error.
   
   We may have to fix other lists in `PackageModel`, but so far I can only 
reproduce this issue, so the fix is only this one.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to