curator-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From randg...@apache.org
Subject [2/4] curator git commit: added validation for DYNAMIC_SEQUENTIAL service type added a break in switch case
Date Mon, 28 Mar 2016 22:39:56 GMT
added validation for DYNAMIC_SEQUENTIAL service type
added a break in switch case


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/b75f92bf
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/b75f92bf
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/b75f92bf

Branch: refs/heads/master
Commit: b75f92bf2dbacd755c770373195a8444338041c8
Parents: 6ebc697
Author: nirdothan <nir.dothan@gmail.com>
Authored: Mon Mar 21 12:09:48 2016 +0200
Committer: nirdothan <nir.dothan@gmail.com>
Committed: Mon Mar 21 12:09:48 2016 +0200

----------------------------------------------------------------------
 .../apache/curator/x/discovery/server/rest/DiscoveryResource.java  | 2 +-
 .../apache/curator/x/discovery/details/ServiceDiscoveryImpl.java   | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/b75f92bf/curator-x-discovery-server/src/main/java/org/apache/curator/x/discovery/server/rest/DiscoveryResource.java
----------------------------------------------------------------------
diff --git a/curator-x-discovery-server/src/main/java/org/apache/curator/x/discovery/server/rest/DiscoveryResource.java
b/curator-x-discovery-server/src/main/java/org/apache/curator/x/discovery/server/rest/DiscoveryResource.java
index b4d9cb7..49c550b 100644
--- a/curator-x-discovery-server/src/main/java/org/apache/curator/x/discovery/server/rest/DiscoveryResource.java
+++ b/curator-x-discovery-server/src/main/java/org/apache/curator/x/discovery/server/rest/DiscoveryResource.java
@@ -90,7 +90,7 @@ public abstract class DiscoveryResource<T>
             return Response.status(Response.Status.BAD_REQUEST).build();
         }
         
-        if ( instance.getServiceType() == ServiceType.DYNAMIC )
+        if ( instance.getServiceType() == ServiceType.DYNAMIC || instance.getServiceType()
== ServiceType.DYNAMIC_SEQUENTIAL )
         {
             log.info("Service type cannot be dynamic");
             return Response.status(Response.Status.BAD_REQUEST).build();

http://git-wip-us.apache.org/repos/asf/curator/blob/b75f92bf/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceDiscoveryImpl.java
----------------------------------------------------------------------
diff --git a/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceDiscoveryImpl.java
b/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceDiscoveryImpl.java
index dd4d6ce..d0f21d4 100644
--- a/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceDiscoveryImpl.java
+++ b/curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/ServiceDiscoveryImpl.java
@@ -230,6 +230,7 @@ public class ServiceDiscoveryImpl<T> implements ServiceDiscovery<T>
             		break; 
             	default:
             		mode = CreateMode.PERSISTENT;
+            		break; 
             	}
                 client.create().creatingParentContainersIfNeeded().withMode(mode).forPath(path,
bytes);
                 isDone = true;


Mime
View raw message