This is an automated email from the ASF dual-hosted git repository.

ningjiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-saga.git


The following commit(s) were added to refs/heads/master by this push:
     new 01d39bb  change type of CompensationContext.contexts from HashMap to 
ConcurrentHashMap
01d39bb is described below

commit 01d39bba10aa69f20e0ba37ce55fe08cc672e67f
Author: Daniel Qian <[email protected]>
AuthorDate: Thu Mar 22 16:14:21 2018 +0800

    change type of CompensationContext.contexts from HashMap to 
ConcurrentHashMap
---
 .../apache/servicecomb/saga/omega/context/CompensationContext.java  | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/CompensationContext.java
 
b/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/CompensationContext.java
index 118b033..067af92 100644
--- 
a/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/CompensationContext.java
+++ 
b/omega/omega-context/src/main/java/org/apache/servicecomb/saga/omega/context/CompensationContext.java
@@ -20,15 +20,15 @@ package org.apache.servicecomb.saga.omega.context;
 import java.lang.invoke.MethodHandles;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-import java.util.HashMap;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class CompensationContext {
   private static final Logger LOG = 
LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
-  private final Map<String, CompensationContextInternal> contexts = new 
HashMap<>();
+  private final Map<String, CompensationContextInternal> contexts = new 
ConcurrentHashMap<>();
 
   public void addCompensationContext(Method compensationMethod, Object target) 
{
     compensationMethod.setAccessible(true);
@@ -58,4 +58,4 @@ public class CompensationContext {
       this.compensationMethod = compensationMethod;
     }
   }
-}
\ No newline at end of file
+}

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to