SGF-447 - Fix Spring Data GemFire due to recent changes to Apache Geode that removed various internal utility classes in favor of external Spring classes.

(cherry picked from commit 042af996e6)
Signed-off-by: John Blum <jblum@pivotal.io>
This commit is contained in:
John Blum
2015-11-30 11:52:18 -08:00
parent 5567e0ecfb
commit 842fdcab24
13 changed files with 16 additions and 16 deletions

View File

@@ -16,8 +16,9 @@
package org.springframework.data.gemfire; package org.springframework.data.gemfire;
import org.springframework.util.StringUtils;
import com.gemstone.gemfire.cache.Scope; import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.management.internal.cli.util.spring.StringUtils;
/** /**
* The ScopeType enum is an enumeration of GemFire Scopes. * The ScopeType enum is an enumeration of GemFire Scopes.

View File

@@ -22,9 +22,9 @@ import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.wiring.BeanConfigurerSupport; import org.springframework.beans.factory.wiring.BeanConfigurerSupport;
import org.springframework.beans.factory.wiring.BeanWiringInfo; import org.springframework.beans.factory.wiring.BeanWiringInfo;
import org.springframework.beans.factory.wiring.BeanWiringInfoResolver; import org.springframework.beans.factory.wiring.BeanWiringInfoResolver;
import org.springframework.util.StringUtils;
import com.gemstone.gemfire.cache.Declarable; import com.gemstone.gemfire.cache.Declarable;
import com.gemstone.gemfire.management.internal.cli.util.spring.StringUtils;
/** /**
* Dedicated {@link Declarable} support class for wiring the declaring instance through the Spring container. * Dedicated {@link Declarable} support class for wiring the declaring instance through the Spring container.

View File

@@ -19,9 +19,9 @@ package org.springframework.data.gemfire.snapshot.event;
import static org.springframework.data.gemfire.snapshot.SnapshotServiceFactoryBean.SnapshotMetadata; import static org.springframework.data.gemfire.snapshot.SnapshotServiceFactoryBean.SnapshotMetadata;
import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationEvent;
import org.springframework.util.StringUtils;
import com.gemstone.gemfire.cache.Region; import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.management.internal.cli.util.spring.StringUtils;
/** /**
* The SnapshotApplicationEvent class is a Spring ApplicationEvent signaling a GemFire Cache or Region snapshot event, * The SnapshotApplicationEvent class is a Spring ApplicationEvent signaling a GemFire Cache or Region snapshot event,

View File

@@ -25,9 +25,9 @@ import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.FactoryBean; import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.InitializingBean;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import com.gemstone.gemfire.cache.Cache; import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.management.internal.cli.util.spring.StringUtils;
/** /**
* Base class for GemFire WAN Gateway component factory beans. * Base class for GemFire WAN Gateway component factory beans.

View File

@@ -21,13 +21,13 @@ import java.util.List;
import org.springframework.data.gemfire.wan.GatewayProxy.GatewayQueue; import org.springframework.data.gemfire.wan.GatewayProxy.GatewayQueue;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import com.gemstone.gemfire.cache.Cache; import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.util.Gateway; import com.gemstone.gemfire.cache.util.Gateway;
import com.gemstone.gemfire.cache.util.GatewayEventListener; import com.gemstone.gemfire.cache.util.GatewayEventListener;
import com.gemstone.gemfire.cache.util.GatewayHub; import com.gemstone.gemfire.cache.util.GatewayHub;
import com.gemstone.gemfire.cache.util.GatewayQueueAttributes; import com.gemstone.gemfire.cache.util.GatewayQueueAttributes;
import com.gemstone.gemfire.management.internal.cli.util.spring.StringUtils;
/** /**
* FactoryBean for creating a GemFire {@link GatewayHub} (deprecated in Gemfire 7). * FactoryBean for creating a GemFire {@link GatewayHub} (deprecated in Gemfire 7).

View File

@@ -21,12 +21,12 @@ import java.util.List;
import org.springframework.context.SmartLifecycle; import org.springframework.context.SmartLifecycle;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import com.gemstone.gemfire.cache.Cache; import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.wan.GatewayReceiver; import com.gemstone.gemfire.cache.wan.GatewayReceiver;
import com.gemstone.gemfire.cache.wan.GatewayReceiverFactory; import com.gemstone.gemfire.cache.wan.GatewayReceiverFactory;
import com.gemstone.gemfire.cache.wan.GatewayTransportFilter; import com.gemstone.gemfire.cache.wan.GatewayTransportFilter;
import com.gemstone.gemfire.management.internal.cli.util.spring.StringUtils;
/** /**
* Spring FactoryBean for creating a GemFire {@link GatewayReceiver}. * Spring FactoryBean for creating a GemFire {@link GatewayReceiver}.

View File

@@ -30,10 +30,10 @@ import org.springframework.data.gemfire.function.sample.HelloFunctionExecution;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import com.gemstone.gemfire.cache.execute.Function; import com.gemstone.gemfire.cache.execute.Function;
import com.gemstone.gemfire.cache.execute.FunctionContext; import com.gemstone.gemfire.cache.execute.FunctionContext;
import com.gemstone.gemfire.management.internal.cli.util.spring.StringUtils;
/** /**
* The LazyWiringDeclarableSupportFunctionBasedIntegrationTest class is a test suite of test cases testing the contract * The LazyWiringDeclarableSupportFunctionBasedIntegrationTest class is a test suite of test cases testing the contract

View File

@@ -31,6 +31,7 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.BeanNameAware; import org.springframework.beans.factory.BeanNameAware;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.util.StringUtils;
import com.gemstone.gemfire.cache.CacheListener; import com.gemstone.gemfire.cache.CacheListener;
import com.gemstone.gemfire.cache.CacheLoader; import com.gemstone.gemfire.cache.CacheLoader;
@@ -51,7 +52,6 @@ import com.gemstone.gemfire.cache.RegionEvent;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEvent; import com.gemstone.gemfire.cache.asyncqueue.AsyncEvent;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventListener; import com.gemstone.gemfire.cache.asyncqueue.AsyncEventListener;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter; import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.management.internal.cli.util.spring.StringUtils;
/** /**
* The LookupRegionMutationIntegrationTest class is a test suite of test cases testing the contract and integrated * The LookupRegionMutationIntegrationTest class is a test suite of test cases testing the contract and integrated
@@ -140,7 +140,7 @@ public class LookupRegionMutationIntegrationTest {
assertEquals("AEQ", example.getAttributes().getAsyncEventQueueIds().iterator().next()); assertEquals("AEQ", example.getAttributes().getAsyncEventQueueIds().iterator().next());
} }
protected static interface Nameable extends BeanNameAware { protected interface Nameable extends BeanNameAware {
String getName(); String getName();
void setName(String name); void setName(String name);
} }

View File

@@ -42,6 +42,7 @@ import org.springframework.beans.factory.BeanInitializationException;
import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.data.gemfire.TestUtils; import org.springframework.data.gemfire.TestUtils;
import org.springframework.data.gemfire.config.GemfireConstants; import org.springframework.data.gemfire.config.GemfireConstants;
import org.springframework.util.ObjectUtils;
import com.gemstone.gemfire.cache.CacheClosedException; import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.GemFireCache; import com.gemstone.gemfire.cache.GemFireCache;
@@ -49,7 +50,6 @@ import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory; import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.Pool; import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.distributed.DistributedSystem; import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.lang.ClassUtils;
import com.gemstone.gemfire.pdx.PdxSerializer; import com.gemstone.gemfire.pdx.PdxSerializer;
/** /**
@@ -404,7 +404,7 @@ public class ClientCacheFactoryBeanTest {
assertTrue(expected.getMessage(), expected.getMessage().startsWith(String.format( assertTrue(expected.getMessage(), expected.getMessage().startsWith(String.format(
"no bean of type '%1$s' having name '%2$s' was found; a ClientCache requires a Pool", "no bean of type '%1$s' having name '%2$s' was found; a ClientCache requires a Pool",
Pool.class.getName(), GemfireConstants.DEFAULT_GEMFIRE_POOL_NAME))); Pool.class.getName(), GemfireConstants.DEFAULT_GEMFIRE_POOL_NAME)));
assertTrue(String.format("Cause was: %1$s!", ClassUtils.getClassName(expected.getCause())), assertTrue(String.format("Cause was: %1$s!", ObjectUtils.nullSafeClassName(expected.getCause())),
expected.getCause() instanceof IllegalArgumentException); expected.getCause() instanceof IllegalArgumentException);
assertEquals("TEST", expected.getCause().getMessage()); assertEquals("TEST", expected.getCause().getMessage());
throw expected; throw expected;

View File

@@ -19,9 +19,9 @@ import java.io.Serializable;
import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Id;
import org.springframework.data.gemfire.mapping.Region; import org.springframework.data.gemfire.mapping.Region;
import org.springframework.util.ObjectUtils;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.gemstone.gemfire.management.internal.cli.util.spring.ObjectUtils;
/** /**
* The Person class models a person. * The Person class models a person.

View File

@@ -44,10 +44,10 @@ import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import com.gemstone.gemfire.cache.Region; import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.snapshot.SnapshotFilter; import com.gemstone.gemfire.cache.snapshot.SnapshotFilter;
import com.gemstone.gemfire.management.internal.cli.util.spring.StringUtils;
/** /**
* The SnapshotApplicationEventTriggeredImportsExportsIntegrationTest class is a test suite of test cases testing * The SnapshotApplicationEventTriggeredImportsExportsIntegrationTest class is a test suite of test cases testing

View File

@@ -24,11 +24,11 @@ import java.util.Random;
import org.mockito.invocation.InvocationOnMock; import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer; import org.mockito.stubbing.Answer;
import org.springframework.util.StringUtils;
import com.gemstone.gemfire.cache.wan.GatewayReceiver; import com.gemstone.gemfire.cache.wan.GatewayReceiver;
import com.gemstone.gemfire.cache.wan.GatewayReceiverFactory; import com.gemstone.gemfire.cache.wan.GatewayReceiverFactory;
import com.gemstone.gemfire.cache.wan.GatewayTransportFilter; import com.gemstone.gemfire.cache.wan.GatewayTransportFilter;
import com.gemstone.gemfire.management.internal.cli.util.spring.StringUtils;
/** /**
* @author David Turanski * @author David Turanski

View File

@@ -24,8 +24,7 @@ import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import com.gemstone.gemfire.management.internal.cli.util.spring.StringUtils;
/** /**
* The FileUtils class is a utility class for processing files, working with java.io.File objects. * The FileUtils class is a utility class for processing files, working with java.io.File objects.