This is an automated email from the ASF dual-hosted git repository. dschneider pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push: new 735b44e GEODE-4575: remove getAnyInstance call in CacheCreation (#1406) 735b44e is described below commit 735b44e41563f91e1f9deed614f21ee6064cd204 Author: Darrel Schneider <dschnei...@pivotal.io> AuthorDate: Fri Feb 9 10:30:22 2018 -0800 GEODE-4575: remove getAnyInstance call in CacheCreation (#1406) Changed getInternalDistributedSystem to throw an exception if it is called. It appears that this method is never used on a CacheCreation but because this class implements the InternalCache interface it has to have an implementation. * fixed a place the GatewaySender was asking for the InternalDistributedSystem during xml parsing --- .../org/apache/geode/internal/cache/wan/AbstractGatewaySender.java | 4 ++-- .../java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java index 9f6ac57..a134e1e 100644 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/wan/AbstractGatewaySender.java @@ -255,11 +255,11 @@ public abstract class AbstractGatewaySender implements GatewaySender, Distributi // if dispatcherThreads is 1 then maxMemoryPerDispatcherQueue will be same as maximumQueueMemory // of sender this.maxMemoryPerDispatcherQueue = this.queueMemory / this.dispatcherThreads; - this.myDSId = - this.cache.getInternalDistributedSystem().getDistributionManager().getDistributedSystemId(); this.serialNumber = DistributionAdvisor.createSerialNumber(); this.isMetaQueue = attrs.isMetaQueue(); if (!(this.cache instanceof CacheCreation)) { + this.myDSId = this.cache.getInternalDistributedSystem().getDistributionManager() + .getDistributedSystemId(); this.stopper = new Stopper(cache.getCancelCriterion()); this.senderAdvisor = GatewaySenderAdvisor.createGatewaySenderAdvisor(this); if (!this.isForInternalUse()) { diff --git a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java index aca2088..a192e04 100755 --- a/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java +++ b/geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheCreation.java @@ -1473,7 +1473,7 @@ public class CacheCreation implements InternalCache { @Override public InternalDistributedSystem getInternalDistributedSystem() { - return InternalDistributedSystem.getAnyInstance(); + throw new UnsupportedOperationException(LocalizedStrings.SHOULDNT_INVOKE.toLocalizedString()); } @Override -- To stop receiving notification emails like this one, please contact dschnei...@apache.org.