WillemJiang commented on a change in pull request #210: [SCB-244] enable 
servicecomb and add demo
URL: 
https://github.com/apache/incubator-servicecomb-saga/pull/210#discussion_r197404834
 
 

 ##########
 File path: 
omega/omega-transport/omega-transport-servicecomb/src/main/java/org/apache/servicecomb/saga/omega/transport/servicecomb/SagaConsumerHandler.java
 ##########
 @@ -30,24 +30,23 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.google.common.annotations.VisibleForTesting;
-
 public class SagaConsumerHandler implements Handler {
 
   private static final Logger LOG = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
 
-  private OmegaContext omegaContext;
+  private final OmegaContext omegaContext;
 
   public SagaConsumerHandler() {
+    OmegaContext context = null;
     try {
-      omegaContext = BeanUtils.getBean("omegaContext");
+      context = BeanUtils.getBean("omegaContext");
     } catch (NullPointerException npe) {
-      LOG.warn("The OmegaContext is not injected, The SagaConsumerHandler is 
disabled.");
+      LOG.warn("SagaConsumerHandler is not disabled, it's just cannot inject 
transaction ID.");
 
 Review comment:
   The waring message should be "The OmegaContext is null, SagaConsumer cannot 
inject transaction ID"

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to