From 8bc5d89b8d14e54178aaab8617452977101b53b0 Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 9 Nov 2016 09:40:54 -0800 Subject: [PATCH] SGF-565 - Stackoverflow error when the 'locators' attribute is specified in any of the XCacheApplication annotations. (cherry picked from commit 61d23e3892b4d6d02eeebf6d456f3d6843d5d078) Signed-off-by: John Blum --- .../config/annotation/AbstractCacheConfiguration.java | 4 ++-- .../annotation/PeerCacheApplicationIntegrationTests.java | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/springframework/data/gemfire/config/annotation/AbstractCacheConfiguration.java b/src/main/java/org/springframework/data/gemfire/config/annotation/AbstractCacheConfiguration.java index ab598c83..04d8a881 100644 --- a/src/main/java/org/springframework/data/gemfire/config/annotation/AbstractCacheConfiguration.java +++ b/src/main/java/org/springframework/data/gemfire/config/annotation/AbstractCacheConfiguration.java @@ -686,7 +686,7 @@ public abstract class AbstractCacheConfiguration implements BeanClassLoaderAware /* (non-Javadoc) */ void setLocators(String locators) { this.locators = locators; - setMcastPort(DEFAULT_MCAST_PORT); + this.mcastPort = DEFAULT_MCAST_PORT; } protected String locators() { @@ -713,7 +713,7 @@ public abstract class AbstractCacheConfiguration implements BeanClassLoaderAware void setMcastPort(Integer mcastPort) { this.mcastPort = mcastPort; - setLocators(DEFAULT_LOCATORS); + this.locators = DEFAULT_LOCATORS; } protected Integer mcastPort() { diff --git a/src/test/java/org/springframework/data/gemfire/config/annotation/PeerCacheApplicationIntegrationTests.java b/src/test/java/org/springframework/data/gemfire/config/annotation/PeerCacheApplicationIntegrationTests.java index 840de2c1..b0d4e560 100644 --- a/src/test/java/org/springframework/data/gemfire/config/annotation/PeerCacheApplicationIntegrationTests.java +++ b/src/test/java/org/springframework/data/gemfire/config/annotation/PeerCacheApplicationIntegrationTests.java @@ -58,7 +58,10 @@ public class PeerCacheApplicationIntegrationTests { assertThat(echo.get("Test")).isEqualTo("Test"); } - @PeerCacheApplication(name = "PeerCacheApplicationIntegrationTests", logLevel = "warn") + //@EnableLocator + //@PeerCacheApplication(name = "PeerCacheApplicationIntegrationTests", + // logLevel = "warn", locators="localhost[10334]") + @PeerCacheApplication(name = "PeerCacheApplicationIntegrationTests", logLevel="warn") static class PeerCacheApplicationConfiguration { @Bean("Echo")