tephra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From poo...@apache.org
Subject incubator-tephra git commit: TEPHRA-267 Save the service reference in ReferenceCountedSupplier only if startup is successful
Date Tue, 01 May 2018 23:47:14 GMT
Repository: incubator-tephra
Updated Branches:
  refs/heads/master 305b0a1ff -> 69fec910d


TEPHRA-267 Save the service reference in ReferenceCountedSupplier only if startup is successful

This closes #73

Signed-off-by: poorna <poorna@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-tephra/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tephra/commit/69fec910
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tephra/tree/69fec910
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tephra/diff/69fec910

Branch: refs/heads/master
Commit: 69fec910d56adc086770f30ec87166457eb533c3
Parents: 305b0a1
Author: poorna <poorna@apache.org>
Authored: Wed Apr 25 17:15:48 2018 -0700
Committer: poorna <poorna@apache.org>
Committed: Tue May 1 16:46:44 2018 -0700

----------------------------------------------------------------------
 .../org/apache/tephra/coprocessor/ReferenceCountedSupplier.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/69fec910/tephra-core/src/main/java/org/apache/tephra/coprocessor/ReferenceCountedSupplier.java
----------------------------------------------------------------------
diff --git a/tephra-core/src/main/java/org/apache/tephra/coprocessor/ReferenceCountedSupplier.java
b/tephra-core/src/main/java/org/apache/tephra/coprocessor/ReferenceCountedSupplier.java
index c929d29..876767a 100644
--- a/tephra-core/src/main/java/org/apache/tephra/coprocessor/ReferenceCountedSupplier.java
+++ b/tephra-core/src/main/java/org/apache/tephra/coprocessor/ReferenceCountedSupplier.java
@@ -53,8 +53,8 @@ public class ReferenceCountedSupplier<T extends Service> {
 
         // Instance has not been instantiated
         T serviceInstance = instanceSupplier.get();
-        instance.set(serviceInstance);
         serviceInstance.startAndWait();
+        instance.set(serviceInstance);
       }
       int newCount = refCount.incrementAndGet();
       if (LOG.isDebugEnabled()) {


Mime
View raw message