fjtirado commented on code in PR #2166:
URL: 
https://github.com/apache/incubator-kie-kogito-apps/pull/2166#discussion_r1893892372


##########
data-index/data-index-common/src/main/java/org/kie/kogito/index/CommonUtils.java:
##########
@@ -18,15 +18,56 @@
  */
 package org.kie.kogito.index;
 
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.util.Set;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import graphql.schema.idl.SchemaParser;
+import graphql.schema.idl.TypeDefinitionRegistry;
+
 public class CommonUtils {
 
     public static final int ERROR_STATE = 5;
     private static final Set<String> finalStates = Set.of("Completed", 
"Aborted");
+    private static final Logger logger = 
LoggerFactory.getLogger(CommonUtils.class);

Review Comment:
   I prefer logger, according to this 
https://stackoverflow.com/a/12069687/16843807, which refers to the proper 
section of Java coding style. The rationale is that Logger or other object 
references that are not inmutable or used as a service/helper (which is the 
case of logger), should be in lowercase. They try to reflect that with the . 
convention rule, which is ambigous, but I think the spirit should be clear. In 
the case of logger, which is inmutable is the reference, not necesarily the 
object being referenced (there is a long argument of a guy that study which 
loggers are mutable and which ones are inmutable. This path is dangerous, 
because if we switch from an imutable to a mutable, we will have to change 
case.  therefore I prefer to focus on the usage, we are not ussing logger as it 
was a literal constant or a collection of constants, but as a helper service to 
log, therefore it is irrelevant if the object internal state does not change 
when we call info or if we forgot to add 
 the final to the variable holding the reference) 
   I know we are using both in our codebase (according to the taste of each 
developer), so my policy is to not change the ones already existing, but if 
adding a new one, use the lowercase form (because I think using uppercase to 
something that is not really a constant is confusing, although Im not going to 
ask anyone that prefers the uppercase form to start using the lowercase 
approach)



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