Repository: incubator-geode Updated Branches: refs/heads/develop 0a51d86d5 -> 61fe7c647
GEODE-1938: Added conditional check to return on successful processing of pdx type Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/98c43a54 Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/98c43a54 Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/98c43a54 Branch: refs/heads/develop Commit: 98c43a54623997ab88cec1d2ce8d20121e857f0e Parents: f3b0d0e Author: Udo Kohlmeyer <ukohlme...@pivotal.io> Authored: Wed Oct 5 11:32:33 2016 +1100 Committer: Udo Kohlmeyer <ukohlme...@pivotal.io> Committed: Wed Oct 5 11:32:33 2016 +1100 ---------------------------------------------------------------------- .../apache/geode/pdx/internal/ClientTypeRegistration.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/98c43a54/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java ---------------------------------------------------------------------- diff --git a/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java b/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java index 8957e7f..09a0a18 100644 --- a/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java +++ b/geode-core/src/main/java/org/apache/geode/pdx/internal/ClientTypeRegistration.java @@ -21,6 +21,8 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Map; +import org.apache.logging.log4j.Logger; + import org.apache.geode.InternalGemFireError; import org.apache.geode.cache.CacheClosedException; import org.apache.geode.cache.client.Pool; @@ -39,7 +41,6 @@ import org.apache.geode.cache.wan.GatewaySender; import org.apache.geode.internal.cache.GemFireCacheImpl; import org.apache.geode.internal.cache.PoolManagerImpl; import org.apache.geode.internal.logging.LogService; -import org.apache.logging.log4j.Logger; public class ClientTypeRegistration implements TypeRegistration { @@ -263,12 +264,14 @@ public class ClientTypeRegistration implements TypeRegistration { for (Pool pool : pools) { try { sendTypeToPool(importedType, typeId, pool); - return; } catch (ServerConnectivityException e) { //ignore, try the next pool. lastException = e; } } + if (lastException == null) { + return; + } throw returnCorrectExceptionForFailure(pools, typeId, lastException); } @@ -285,6 +288,9 @@ public class ClientTypeRegistration implements TypeRegistration { lastException = e; } } + if (lastException == null) { + return; + } throw returnCorrectExceptionForFailure(pools, enumId, lastException); }