fjtirado commented on code in PR #3980:
URL: 
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3980#discussion_r2192996667


##########
api/kogito-services/src/main/java/org/kie/kogito/services/jobs/impl/StaticJobService.java:
##########
@@ -20,12 +20,11 @@
 
 public class StaticJobService {
 
-    private static InMemoryJobService INSTANCE;
+    private static class InstanceHolder {
+        private static InMemoryJobService INSTANCE = new InMemoryJobService();
+    }
 
     public static InMemoryJobService staticJobService() {
-        if (INSTANCE == null) {

Review Comment:
   This might cause double initilization of the static intance when multi 
threading



-- 
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