T executeAndextract(String functionId, Set> keys, Object... args);
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/gemfire/listener/adapter/ContinuousQueryListenerAdapter.java b/src/main/java/org/springframework/data/gemfire/listener/adapter/ContinuousQueryListenerAdapter.java
index 1c32a3eb..2ee8ade8 100644
--- a/src/main/java/org/springframework/data/gemfire/listener/adapter/ContinuousQueryListenerAdapter.java
+++ b/src/main/java/org/springframework/data/gemfire/listener/adapter/ContinuousQueryListenerAdapter.java
@@ -43,18 +43,18 @@ import com.gemstone.gemfire.cache.query.CqQuery;
* Allows listener methods to operate on event content types, completely
* independent from the GemFire API.
*
- * Modeled as much as possible after the JMS MessageListenerAdapter in
+ * Modeled as much as possible after the JMS MessageListenerAdapter in
* Spring Framework.
*
* By default, the content of incoming GemFire events gets extracted before
* being passed into the target listener method, to let the target method
* operate on event content types such as Object or Operation instead of
- * the raw {@link CqEvent}.
+ * the raw {@link CqEvent}.
*
* Find below some examples of method signatures compliant with this
* adapter class. This first example handles all CqEvent types
* and gets passed the contents of each event type as an
- * argument.
+ * argument.
*
* public interface PojoListener {
* void handleEvent(CqEvent event);
@@ -69,7 +69,6 @@ import com.gemstone.gemfire.cache.query.CqQuery;
* @author Juergen Hoeller
* @author Costin Leau
* @author Oliver Gierke
- * @see org.springframework.jms.listener.adapter.MessageListenerAdapter
*/
public class ContinuousQueryListenerAdapter implements ContinuousQueryListener {
@@ -334,4 +333,4 @@ public class ContinuousQueryListenerAdapter implements ContinuousQueryListener {
throw new GemfireListenerExecutionFailedException("Failed to invoke target method '" + methodName, ex);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/gemfire/mapping/Region.java b/src/main/java/org/springframework/data/gemfire/mapping/Region.java
index 54052560..cedeae80 100644
--- a/src/main/java/org/springframework/data/gemfire/mapping/Region.java
+++ b/src/main/java/org/springframework/data/gemfire/mapping/Region.java
@@ -36,7 +36,7 @@ public @interface Region {
/**
* The name, or fully-qualified bean name of the {@link com.gemstone.gemfire.cache.Region} the entity
* shall be stored in (e.g. "Users", or "/Local/Admin/Users").
- *
+ *
* @return the name or qualified path of the Region the entity shall be persisted in.
*/
String value() default "";
diff --git a/src/main/java/org/springframework/data/gemfire/mapping/Regions.java b/src/main/java/org/springframework/data/gemfire/mapping/Regions.java
index 2000aca9..5d08c842 100644
--- a/src/main/java/org/springframework/data/gemfire/mapping/Regions.java
+++ b/src/main/java/org/springframework/data/gemfire/mapping/Regions.java
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.springframework.data.gemfire.mapping;
import java.util.Collections;
@@ -27,7 +28,7 @@ import com.gemstone.gemfire.cache.Region;
/**
* Simple value object to abstract access to regions by name and mapped type.
- *
+ *
* @author Oliver Gierke
* @author John Blum
*/
@@ -79,7 +80,7 @@ public class Regions implements Iterable> {
/**
* Returns the {@link Region} with the given name or path.
- *
+ *
* @param namePath must not be {@literal null}, and either identifies the Region by name or the fully-qualified path.
* @return the {@link Region} with the given name or path.
*/
diff --git a/src/main/java/org/springframework/data/gemfire/package-info.java b/src/main/java/org/springframework/data/gemfire/package-info.java
index 12ed9c55..c101cb37 100644
--- a/src/main/java/org/springframework/data/gemfire/package-info.java
+++ b/src/main/java/org/springframework/data/gemfire/package-info.java
@@ -1,14 +1,12 @@
/**
- *
- * Package providing integration of
+ * Package providing integration of
* GemFire
* with Spring concepts.
*
- * Contains helper classes, a template plus callback for GemFire
+ * Contains helper classes, a template plus callback for GemFire
* access and an implementation of Spring's transaction SPI for local
* GemFire transactions.
- *
*/
package org.springframework.data.gemfire;
diff --git a/src/main/java/org/springframework/data/gemfire/repository/GemfireRepository.java b/src/main/java/org/springframework/data/gemfire/repository/GemfireRepository.java
index ec4b935c..65446e44 100644
--- a/src/main/java/org/springframework/data/gemfire/repository/GemfireRepository.java
+++ b/src/main/java/org/springframework/data/gemfire/repository/GemfireRepository.java
@@ -17,14 +17,31 @@ package org.springframework.data.gemfire.repository;
import java.io.Serializable;
+import org.springframework.data.domain.Sort;
import org.springframework.data.repository.CrudRepository;
/**
* Gemfire-specific extension of the {@link CrudRepository} interface.
- *
+ *
* @author Oliver Gierke
+ * @author John Blum
+ * @see java.io.Serializable
+ * @see org.springframework.data.repository.CrudRepository
*/
+@SuppressWarnings("unused")
public interface GemfireRepository extends CrudRepository {
+ /**
+ * Returns all entities sorted by the given options.
+ *
+ * @param sort the Spring Data Commons Sort type defining the ordering criteria.
+ * @return all entities sorted by the given options.
+ * @see org.springframework.data.repository.PagingAndSortingRepository#findAll(org.springframework.data.domain.Sort)
+ * @see org.springframework.data.domain.Sort
+ * @see java.lang.Iterable
+ */
+ Iterable findAll(Sort sort);
+
T save(Wrapper wrapper);
+
}
diff --git a/src/main/java/org/springframework/data/gemfire/repository/query/DefaultGemfireEntityInformation.java b/src/main/java/org/springframework/data/gemfire/repository/query/DefaultGemfireEntityInformation.java
index ff7dde84..d95b5975 100644
--- a/src/main/java/org/springframework/data/gemfire/repository/query/DefaultGemfireEntityInformation.java
+++ b/src/main/java/org/springframework/data/gemfire/repository/query/DefaultGemfireEntityInformation.java
@@ -25,7 +25,7 @@ import org.springframework.data.repository.core.support.PersistentEntityInformat
/**
* Implementation of {@link GemfireEntityInformation} to return the region name stored in the backing
* {@link PersistentEntity}.
- *
+ *
* @author Oliver Gierke
* @author John Blum
* @see org.springframework.data.gemfire.mapping.GemfirePersistentEntity
diff --git a/src/main/java/org/springframework/data/gemfire/repository/support/SimpleGemfireRepository.java b/src/main/java/org/springframework/data/gemfire/repository/support/SimpleGemfireRepository.java
index 0c4ae16e..25f2da5d 100644
--- a/src/main/java/org/springframework/data/gemfire/repository/support/SimpleGemfireRepository.java
+++ b/src/main/java/org/springframework/data/gemfire/repository/support/SimpleGemfireRepository.java
@@ -5,6 +5,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import org.springframework.data.domain.Sort;
import org.springframework.data.gemfire.GemfireCallback;
import org.springframework.data.gemfire.GemfireTemplate;
import org.springframework.data.gemfire.repository.GemfireRepository;
@@ -101,12 +102,44 @@ public class SimpleGemfireRepository implements Gemf
@Override
public Collection findAll() {
SelectResults results = template.find("select * from " + template.getRegion().getFullPath());
- return (Collection)results.asList();
+ return results.asList();
}
/*
* (non-Javadoc)
- *
+ * @see org.springframework.data.gemfire.repository.GemfireRepository.sor(:org.springframework.data.domain.Sort)
+ */
+ @Override
+ public Iterable findAll(final Sort sort) {
+ SelectResults selectResults = template.find(String.format("SELECT * FROM %1$s%2$s",
+ template.getRegion().getFullPath(), toString(sort)));
+ return selectResults.asList();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.springframework.data.domain.Sort
+ */
+ private String toString(final Sort sort) {
+ if (sort != null) {
+ StringBuilder orderClause = new StringBuilder(" ORDER BY ");
+ int count = 0;
+
+ for (Sort.Order order : sort) {
+ orderClause.append(count++ > 0 ? ", " : "");
+ orderClause.append(String.format("%1$s %2$s", order.getProperty(), order.getDirection()));
+ }
+
+ return orderClause.toString();
+ }
+
+ return "";
+ }
+
+ /*
+ * (non-Javadoc)
+ *
* @see
* org.springframework.data.repository.CrudRepository#findAll(java.lang.
* Iterable)
diff --git a/src/main/java/org/springframework/data/gemfire/serialization/WiringInstantiator.java b/src/main/java/org/springframework/data/gemfire/serialization/WiringInstantiator.java
index 1670523e..71c1d92b 100644
--- a/src/main/java/org/springframework/data/gemfire/serialization/WiringInstantiator.java
+++ b/src/main/java/org/springframework/data/gemfire/serialization/WiringInstantiator.java
@@ -33,12 +33,10 @@ import com.gemstone.gemfire.Instantiator;
* either by relying on an existing bean definition (which acts as a template) or by providing an embedded
* configuration through annotations.
*
- *
* Can reuse existing instantiators to optimize instance creation. If one is not provided, it will fallback
* to reflection invocation.
*
- *
- * By default, on initialization, the class will register itself as an {@link Instantiator} through
+ * By default, on initialization, the class will register itself as an {@link Instantiator} through
* {@link #register(Instantiator)}. This behaviour can be disabled through {@link #setAutoRegister(boolean)}.
* Additionally, the instantiator registration is not distributed by default, to allow the application context
* to be reused. This can be changed through {@link #setDistribute(boolean)}.
@@ -47,8 +45,7 @@ import com.gemstone.gemfire.Instantiator;
* @see org.springframework.beans.factory.wiring.BeanWiringInfoResolver
* @see org.springframework.beans.factory.annotation.Autowired
* @see javax.annotation.Resource
- * @see javax.inject.Inject
- *
+ *
* @author Costin Leau
*/
public class WiringInstantiator extends Instantiator implements BeanFactoryAware, InitializingBean, DisposableBean {
@@ -140,4 +137,4 @@ public class WiringInstantiator extends Instantiator implements BeanFactoryAware
public void setDistribute(boolean distribute) {
this.distribute = distribute;
}
-}
\ No newline at end of file
+}
diff --git a/src/main/java/org/springframework/data/gemfire/server/CacheServerFactoryBean.java b/src/main/java/org/springframework/data/gemfire/server/CacheServerFactoryBean.java
index 243e0da2..59036076 100644
--- a/src/main/java/org/springframework/data/gemfire/server/CacheServerFactoryBean.java
+++ b/src/main/java/org/springframework/data/gemfire/server/CacheServerFactoryBean.java
@@ -35,12 +35,13 @@ import com.gemstone.gemfire.cache.server.ServerLoadProbe;
/**
* FactoryBean for easy creation and configuration of GemFire {@link CacheServer} instances.
- *
+ *
* @author Costin Leau
* @author John Blum
*/
+@SuppressWarnings("unused")
public class CacheServerFactoryBean implements FactoryBean, InitializingBean, DisposableBean,
- SmartLifecycle {
+ SmartLifecycle {
private boolean autoStartup = true;
private boolean notifyBySubscription = CacheServer.DEFAULT_NOTIFY_BY_SUBSCRIPTION;
@@ -68,7 +69,7 @@ public class CacheServerFactoryBean implements FactoryBean, Initial
private String hostNameForClients = CacheServer.DEFAULT_HOSTNAME_FOR_CLIENTS;
private String subscriptionDiskStore;
- private String[] serverGroups = CacheServer.DEFAULT_GROUPS;
+ private String[] serverGroups = {};
private SubscriptionEvictionPolicy subscriptionEvictionPolicy = SubscriptionEvictionPolicy.valueOf(
ClientSubscriptionConfig.DEFAULT_EVICTION_POLICY.toUpperCase());
@@ -85,6 +86,7 @@ public class CacheServerFactoryBean implements FactoryBean, Initial
return true;
}
+ @SuppressWarnings("deprecation")
public void afterPropertiesSet() throws IOException {
Assert.notNull(cache, "A GemFire Cache is required.");
diff --git a/src/main/java/org/springframework/data/gemfire/support/ClientRegionShortcutWrapper.java b/src/main/java/org/springframework/data/gemfire/support/ClientRegionShortcutWrapper.java
index 2b2fc10c..5e58d266 100644
--- a/src/main/java/org/springframework/data/gemfire/support/ClientRegionShortcutWrapper.java
+++ b/src/main/java/org/springframework/data/gemfire/support/ClientRegionShortcutWrapper.java
@@ -23,7 +23,7 @@ import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
/**
* The ClientRegionShortcutWrapper enum is a Java enumerated type that wraps GemFire's ClientRegionShortcuts
* with Spring Data GemFire ClientRegionShortcutWrapper enumerated values.
- *
+ *
* @author John Blum
* @see com.gemstone.gemfire.cache.client.ClientRegionShortcut
* @since 1.4.0
diff --git a/src/main/java/org/springframework/data/gemfire/support/GemfireCache.java b/src/main/java/org/springframework/data/gemfire/support/GemfireCache.java
index 475f6f60..0ed9b5d9 100644
--- a/src/main/java/org/springframework/data/gemfire/support/GemfireCache.java
+++ b/src/main/java/org/springframework/data/gemfire/support/GemfireCache.java
@@ -23,10 +23,13 @@ import com.gemstone.gemfire.cache.GemFireCache;
import com.gemstone.gemfire.cache.Region;
/**
- * Spring Framework {@link Cache} implementation using a GemFire {@link Region} underneath.
- * Supports Gemfire 6.5 or higher.
- *
+ * Spring Framework {@link Cache} implementation backed by a GemFire {@link Region}.
+ *
+ * Supports GemFire 6.5 or higher.
+ *
* @author Costin Leau
+ * @author John Blum
+ *
*/
public class GemfireCache implements Cache {
@@ -64,7 +67,9 @@ public class GemfireCache implements Cache {
return (value == null ? null : new SimpleValueWrapper(value));
}
+ @SuppressWarnings("unchecked")
public void put(Object key, Object value) {
region.put(key, value);
}
-}
\ No newline at end of file
+
+}
diff --git a/src/main/java/org/springframework/data/gemfire/support/JSONRegionAdvice.java b/src/main/java/org/springframework/data/gemfire/support/JSONRegionAdvice.java
index 5bef37da..57511226 100644
--- a/src/main/java/org/springframework/data/gemfire/support/JSONRegionAdvice.java
+++ b/src/main/java/org/springframework/data/gemfire/support/JSONRegionAdvice.java
@@ -48,7 +48,7 @@ public class JSONRegionAdvice {
/**
* Sets names of regions to be included for JSON conversion. By default, all regions will be included
- * @param regions a List of region names to include
+ * @param regionNames a List of region names to include
*/
public void setIncludedRegionNames(List regionNames) {
this.includedRegions = regionNames;
diff --git a/src/main/java/org/springframework/data/gemfire/support/RegionShortcutWrapper.java b/src/main/java/org/springframework/data/gemfire/support/RegionShortcutWrapper.java
index 669214fa..66a99294 100644
--- a/src/main/java/org/springframework/data/gemfire/support/RegionShortcutWrapper.java
+++ b/src/main/java/org/springframework/data/gemfire/support/RegionShortcutWrapper.java
@@ -23,7 +23,6 @@ import com.gemstone.gemfire.cache.RegionShortcut;
/**
* The RegionShortcutWrapper enum is a Java enumerated type that wraps GemFire's RegionShortcuts
* with Spring Data GemFire RegionShortcutWrapper enumerated values.
- *
*
* @author John Blum
* @see com.gemstone.gemfire.cache.RegionShortcut
diff --git a/src/main/java/org/springframework/data/gemfire/support/SpringContextBootstrappingInitializer.java b/src/main/java/org/springframework/data/gemfire/support/SpringContextBootstrappingInitializer.java
index 11cafc20..571abe32 100644
--- a/src/main/java/org/springframework/data/gemfire/support/SpringContextBootstrappingInitializer.java
+++ b/src/main/java/org/springframework/data/gemfire/support/SpringContextBootstrappingInitializer.java
@@ -39,8 +39,9 @@ import com.gemstone.gemfire.cache.Declarable;
* mostly configured with Spring Data GemFire's XML namespace. The Cache itself is the only resource that cannot be
* configured and initialized in a Spring context since the initializer is not invoked until after GemFire creates
* and initializes the Cache for use.
- *
+ *
* @author John Blum
+ * @see java.util.Properties
* @see org.springframework.context.ApplicationContext
* @see org.springframework.context.ApplicationListener
* @see org.springframework.context.ConfigurableApplicationContext
@@ -50,9 +51,9 @@ import com.gemstone.gemfire.cache.Declarable;
* @see org.springframework.context.event.SimpleApplicationEventMulticaster
* @see org.springframework.context.support.ClassPathXmlApplicationContext
* @see com.gemstone.gemfire.cache.Declarable
- * @since 1.3.4
- * @link http://pubs.vmware.com/vfabric53/topic/com.vmware.vfabric.gemfire.7.0/basic_config/the_cache/setting_cache_initializer.html
- * @link https://jira.springsource.org/browse/SGF-248
+ * @since 1.4.0
+ * @see Setting Cache Initializer
+ * @see SGF-248
*/
@SuppressWarnings("unused")
public class SpringContextBootstrappingInitializer implements Declarable, ApplicationListener {
@@ -73,7 +74,7 @@ public class SpringContextBootstrappingInitializer implements Declarable, Applic
/**
* Gets a reference to the Spring ApplicationContext constructed, configured and initialized inside the GemFire
* Server-based JVM process.
- *
+ *
* @return a reference to the Spring ApplicationContext bootstrapped by GemFire.
* @see org.springframework.context.ConfigurableApplicationContext
*/
@@ -86,7 +87,7 @@ public class SpringContextBootstrappingInitializer implements Declarable, Applic
* Registers a Spring ApplicationListener to be notified when the Spring ApplicationContext is created by GemFire
* when instantiating and initializing declared Initializers from the GemFire native configuration file
* (e.g. cache.xml).
- *
+ *
* @param the Class type of the Spring ApplicationListener.
* @param listener the ApplicationListener to register for ContextRefreshedEvents by this
* SpringContextBootstrappingInitializer.
@@ -111,7 +112,7 @@ public class SpringContextBootstrappingInitializer implements Declarable, Applic
* ApplicationContext was previously created, initialized and refreshed before any ApplicationListeners interested
* in ContextRefreshedEvents get registered so that application components (such as LazyWiringDeclarableSupport
* objects) arriving late to the game that also require configuration (auto-wiring) get wired accordingly too.
- *
+ *
* @param listener a Spring ApplicationListener requiring notification of any ContextRefreshedEvents after the
* ApplicationContext has already been created, initialized and/or refreshed.
* @see org.springframework.context.ApplicationListener#onApplicationEvent(org.springframework.context.ApplicationEvent)
@@ -131,7 +132,7 @@ public class SpringContextBootstrappingInitializer implements Declarable, Applic
/**
* Unregisters the Spring ApplicationListener from this SpringContextBootstrappingInitializer in order to stop
* receiving ApplicationEvents on Spring context refreshes.
- *
+ *
* @param the Class type of the Spring ApplicationListener.
* @param listener the ApplicationListener to unregister from receiving ContextRefreshedEvents by this
* SpringContextBootstrappingInitializer.
@@ -154,7 +155,7 @@ public class SpringContextBootstrappingInitializer implements Declarable, Applic
* Creates (constructs and configures) a ConfigurableApplicationContext instance based on the specified locations
* of the context configuration meta-data files. The created ConfigurableApplicationContext is not automatically
* "refreshed" and therefore must be "refreshed" by the caller manually.
- *
+ *
* @param configLocations a String array indicating the locations of the context configuration meta-data files
* used to configure the ConfigurableApplicationContext instance.
* @return a newly constructed and configured instance of the ConfigurableApplicationContext class. Note, the
@@ -175,12 +176,12 @@ public class SpringContextBootstrappingInitializer implements Declarable, Applic
* specified locations of context configuration meta-data files used to configure the context. The created
* ConfigurableApplicationContext is not automatically "refreshed" and therefore must be "refreshed"
* by the caller manually.
- *
+ *
* When basePackages are specified, an instance of AnnotationConfigApplicationContext is returned; otherwise
* an instance of the ClassPathXmlApplicationContext is initialized with the configLocations and returned.
* This method prefers the ClassPathXmlApplicationContext to the AnnotationConfigApplicationContext when both
* basePackages and configLocations are specified.
- *
+ *
* @param basePackages the base application packages to scan for application @Components and @Configuration classes. *
* @param configLocations a String array indicating the locations of the context configuration meta-data files
* used to configure the ConfigurableApplicationContext instance.
@@ -211,7 +212,7 @@ public class SpringContextBootstrappingInitializer implements Declarable, Applic
/**
* Initializes a Spring ApplicationContext with the given parameters from a GemFire Initializer in GemFire native
* configuration meta-data (e.g. cache.xml).
- *
+ *
* @param parameters a Properties object containing the configuration parameters and settings defined in the
* GemFire cache.xml >initializer/< element.
* @see #createApplicationContext
@@ -239,6 +240,7 @@ public class SpringContextBootstrappingInitializer implements Declarable, Applic
applicationContext = createApplicationContext(basePackagesArray, configLocations);
Assert.notNull(applicationContext, "The 'created' ConfigurableApplicationContext cannot be null!");
+ assert applicationContext != null;
applicationContext.addApplicationListener(this);
applicationContext.registerShutdownHook();
applicationContext.refresh();
@@ -252,7 +254,7 @@ public class SpringContextBootstrappingInitializer implements Declarable, Applic
/**
* Gets the the ID of the Spring ApplicationContext in a null-safe manner.
- *
+ *
* @param applicationContext the Spring ApplicationContext to retrieve the ID for.
* @return the ID of the given Spring ApplicationContext or null if the ApplicationContext reference is null.
* @see org.springframework.context.ApplicationContext#getId()
@@ -265,7 +267,7 @@ public class SpringContextBootstrappingInitializer implements Declarable, Applic
* Gets notified when the Spring ApplicationContext gets created and refreshed by GemFire. The handler method
* proceeds in notifying any other GemFire components that need to be aware that the Spring ApplicationContext
* now exists and is ready for use, such as other Declarable GemFire objects requiring auto-wiring support, etc.
- *
+ *
* @param event the ContextRefreshedEvent signaling that the Spring ApplicationContext has been created
* and refreshed by GemFire.
* @see org.springframework.context.event.ContextRefreshedEvent
diff --git a/src/main/java/org/springframework/data/gemfire/support/package-info.java b/src/main/java/org/springframework/data/gemfire/support/package-info.java
index 61b59613..092e5f7e 100644
--- a/src/main/java/org/springframework/data/gemfire/support/package-info.java
+++ b/src/main/java/org/springframework/data/gemfire/support/package-info.java
@@ -1,10 +1,8 @@
/**
- *
* Support package for Spring Gemfire integration.
*
- * Provides Spring 3.1 caching support (Cache and CacheManager implementations on top of Gemfire APIs).
- *
+ * Provides Spring 3.1 caching support (Cache and CacheManager implementations on top of Gemfire APIs).
*/
package org.springframework.data.gemfire.support;
diff --git a/src/main/java/org/springframework/data/gemfire/wan/AbstractWANComponentFactoryBean.java b/src/main/java/org/springframework/data/gemfire/wan/AbstractWANComponentFactoryBean.java
index f80346b2..40ef2d6d 100644
--- a/src/main/java/org/springframework/data/gemfire/wan/AbstractWANComponentFactoryBean.java
+++ b/src/main/java/org/springframework/data/gemfire/wan/AbstractWANComponentFactoryBean.java
@@ -30,7 +30,7 @@ import com.gemstone.gemfire.cache.Cache;
/**
* Base class for GemFire WAN Gateway component factory beans.
- *
+ *
* @author David Turanski
* @author John Blum
*/
diff --git a/src/main/java/org/springframework/data/gemfire/wan/AsyncEventQueueFactoryBean.java b/src/main/java/org/springframework/data/gemfire/wan/AsyncEventQueueFactoryBean.java
index c8f4e891..ac23bc49 100644
--- a/src/main/java/org/springframework/data/gemfire/wan/AsyncEventQueueFactoryBean.java
+++ b/src/main/java/org/springframework/data/gemfire/wan/AsyncEventQueueFactoryBean.java
@@ -26,7 +26,7 @@ import com.gemstone.gemfire.cache.util.Gateway;
/**
* FactoryBean for creating GemFire {@link AsyncEventQueue}s.
- *
+ *
* @author David Turanski
* @author John Blum
*/
@@ -51,7 +51,7 @@ public class AsyncEventQueueFactoryBean extends AbstractWANComponentFactoryBean<
/**
* Constructs an instance of the AsyncEventQueueFactoryBean for creating an GemFire AsyncEventQueue.
- *
+ *
* @param cache the GemFire Cache reference.
* @see #AsyncEventQueueFactoryBean(com.gemstone.gemfire.cache.Cache, com.gemstone.gemfire.cache.asyncqueue.AsyncEventListener)
*/
@@ -61,7 +61,7 @@ public class AsyncEventQueueFactoryBean extends AbstractWANComponentFactoryBean<
/**
* Constructs an instance of the AsyncEventQueueFactoryBean for creating an GemFire AsyncEventQueue.
- *
+ *
* @param cache the GemFire Cache reference.
* @param asyncEventListener required {@link AsyncEventListener}
*/
diff --git a/src/main/java/org/springframework/data/gemfire/wan/GatewaySenderFactoryBean.java b/src/main/java/org/springframework/data/gemfire/wan/GatewaySenderFactoryBean.java
index 3d0e95b3..6cea311e 100644
--- a/src/main/java/org/springframework/data/gemfire/wan/GatewaySenderFactoryBean.java
+++ b/src/main/java/org/springframework/data/gemfire/wan/GatewaySenderFactoryBean.java
@@ -30,10 +30,11 @@ import com.gemstone.gemfire.cache.wan.GatewayTransportFilter;
/**
* FactoryBean for creating a parallel or serial GemFire {@link GatewaySender}.
- *
+ *
* @author David Turanski
* @author John Blum
*/
+@SuppressWarnings("unused")
public class GatewaySenderFactoryBean extends AbstractWANComponentFactoryBean
implements SmartLifecycle {
@@ -65,7 +66,7 @@ public class GatewaySenderFactoryBean extends AbstractWANComponentFactoryBean
+ *
* @param cache the Gemfire cache reference.
* @see com.gemstone.gemfire.cache.Cache
*/
diff --git a/src/test/java/org/springframework/data/gemfire/CacheServerIntegrationTest.java b/src/test/java/org/springframework/data/gemfire/CacheServerIntegrationTest.java
index 63676a10..c084b989 100644
--- a/src/test/java/org/springframework/data/gemfire/CacheServerIntegrationTest.java
+++ b/src/test/java/org/springframework/data/gemfire/CacheServerIntegrationTest.java
@@ -35,7 +35,7 @@ import com.gemstone.gemfire.cache.server.CacheServer;
/**
* The CacheServerIntegrationTest class is a test suite of test cases testing the functionality of GemFire Cache Servers
* configured using the Spring Data GemFire XML namespace.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.springframework.data.gemfire.server.CacheServerFactoryBean
@@ -79,6 +79,7 @@ public class CacheServerIntegrationTest {
}
@Test
+ @SuppressWarnings("deprecation")
public void testCacheServerRunningWithSubscription() {
assertNotNull(cacheServer);
assertTrue(cacheServer.isRunning());
diff --git a/src/test/java/org/springframework/data/gemfire/ClientRegionShortcutConverterTest.java b/src/test/java/org/springframework/data/gemfire/ClientRegionShortcutConverterTest.java
index e32bea75..6536d07b 100644
--- a/src/test/java/org/springframework/data/gemfire/ClientRegionShortcutConverterTest.java
+++ b/src/test/java/org/springframework/data/gemfire/ClientRegionShortcutConverterTest.java
@@ -25,7 +25,7 @@ import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
/**
* The ClientRegionShortcutConverterTest class is a test suite of test cases testing the contract and functionality
* of the ClientRegionShortcutConverter class
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.springframework.data.gemfire.ClientRegionShortcutConverter
diff --git a/src/test/java/org/springframework/data/gemfire/ColocatedRegionIntegrationTest.java b/src/test/java/org/springframework/data/gemfire/ColocatedRegionIntegrationTest.java
index eed5bed4..18f972ef 100644
--- a/src/test/java/org/springframework/data/gemfire/ColocatedRegionIntegrationTest.java
+++ b/src/test/java/org/springframework/data/gemfire/ColocatedRegionIntegrationTest.java
@@ -30,7 +30,7 @@ import com.gemstone.gemfire.cache.Region;
/**
* The ColocatedRegionIntegrationTest class is a test suite class containing test cases for JIRA issue SGF-195,
* concerning colocated Regions in GemFire.
- *
+ *
* @author John Blum
* @link https://jira.springsource.org/browse/SGF-195
* @see org.junit.Test
diff --git a/src/test/java/org/springframework/data/gemfire/DiskStoreBeanUsingPropertyPlaceholdersIntegrationTest.java b/src/test/java/org/springframework/data/gemfire/DiskStoreBeanUsingPropertyPlaceholdersIntegrationTest.java
index dbddc911..4a89e79c 100644
--- a/src/test/java/org/springframework/data/gemfire/DiskStoreBeanUsingPropertyPlaceholdersIntegrationTest.java
+++ b/src/test/java/org/springframework/data/gemfire/DiskStoreBeanUsingPropertyPlaceholdersIntegrationTest.java
@@ -35,7 +35,7 @@ import com.gemstone.gemfire.cache.DiskStore;
* The DiskStoreBeanUsingPropertyPlaceholdersIntegrationTest class is a test suite of integration tests testing the use
* of Spring PropertyPlaceholders to configure and initialize a Disk Store bean's properties using property placeholders
* in the SDG XML namespace <disk-store> bean definition attributes.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.junit.runner.RunWith
diff --git a/src/test/java/org/springframework/data/gemfire/DiskStoreFactoryBeanTest.java b/src/test/java/org/springframework/data/gemfire/DiskStoreFactoryBeanTest.java
index fd21161c..2213617c 100644
--- a/src/test/java/org/springframework/data/gemfire/DiskStoreFactoryBeanTest.java
+++ b/src/test/java/org/springframework/data/gemfire/DiskStoreFactoryBeanTest.java
@@ -24,7 +24,7 @@ import org.junit.Test;
/**
* The DiskStoreFactoryBeanTest class is a test suite of test cases testing the contract and functionality of the
* DiskStoreFactoryBean class.
- *
+ *
*
* @author John Blum
* @see org.junit.Test
diff --git a/src/test/java/org/springframework/data/gemfire/GemfireUtilsTest.java b/src/test/java/org/springframework/data/gemfire/GemfireUtilsTest.java
index 3e3ab4d3..8a775146 100644
--- a/src/test/java/org/springframework/data/gemfire/GemfireUtilsTest.java
+++ b/src/test/java/org/springframework/data/gemfire/GemfireUtilsTest.java
@@ -26,7 +26,7 @@ import com.gemstone.gemfire.internal.GemFireVersion;
/**
* The GemfireUtilsTest class is a test suite of test cases testing the contract and functionality of the GemfireUtils
* abstract utility class.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.springframework.data.gemfire.GemfireUtils
diff --git a/src/test/java/org/springframework/data/gemfire/InvalidRegionDataPolicyShortcutsTest.java b/src/test/java/org/springframework/data/gemfire/InvalidRegionDataPolicyShortcutsTest.java
index f6cf6557..5e534e55 100644
--- a/src/test/java/org/springframework/data/gemfire/InvalidRegionDataPolicyShortcutsTest.java
+++ b/src/test/java/org/springframework/data/gemfire/InvalidRegionDataPolicyShortcutsTest.java
@@ -26,7 +26,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* The InvalidRegionDataPolicyShortcutsIntegrationTest class is a test suite of test cases testing and setting up
* some invalid, or illegal uses of the Region data-policy and/or shortcut XML namespace attributes.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @since 1.4.0
diff --git a/src/test/java/org/springframework/data/gemfire/LazyWiringDeclarableSupportIntegrationTest.java b/src/test/java/org/springframework/data/gemfire/LazyWiringDeclarableSupportIntegrationTest.java
index 69d4629d..e3d3c1dd 100644
--- a/src/test/java/org/springframework/data/gemfire/LazyWiringDeclarableSupportIntegrationTest.java
+++ b/src/test/java/org/springframework/data/gemfire/LazyWiringDeclarableSupportIntegrationTest.java
@@ -39,7 +39,7 @@ import org.springframework.util.Assert;
* The LazyWiringDeclarableSupportIntegrationTest class is a test suite of integration test cases testing
* a LazyWiringDeclarableSupport object/component's wiring configuration and initialization in
* a Spring container context.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.junit.runner.RunWith
diff --git a/src/test/java/org/springframework/data/gemfire/LazyWiringDeclarableSupportTest.java b/src/test/java/org/springframework/data/gemfire/LazyWiringDeclarableSupportTest.java
index 06d25566..8671e47e 100644
--- a/src/test/java/org/springframework/data/gemfire/LazyWiringDeclarableSupportTest.java
+++ b/src/test/java/org/springframework/data/gemfire/LazyWiringDeclarableSupportTest.java
@@ -38,7 +38,7 @@ import org.springframework.data.gemfire.support.SpringContextBootstrappingInitia
* of the LazyWiringDeclarableSupport class. This test class focuses on testing isolated units of functionality
* in the Declarable class directly, mocking any dependencies as appropriate, in order for the class to uphold
* it's contract.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.mockito.Mockito
diff --git a/src/test/java/org/springframework/data/gemfire/LocalRegionFactoryBeanTest.java b/src/test/java/org/springframework/data/gemfire/LocalRegionFactoryBeanTest.java
index 2b3556b5..00ce1aea 100644
--- a/src/test/java/org/springframework/data/gemfire/LocalRegionFactoryBeanTest.java
+++ b/src/test/java/org/springframework/data/gemfire/LocalRegionFactoryBeanTest.java
@@ -34,7 +34,7 @@ import com.gemstone.gemfire.cache.RegionShortcut;
/**
* The PartitionedRegionFactoryBeanTest class is a test suite of test cases testing the component functionality
* and correct behavior of the PartitionedRegionFactoryBean class.
- *
+ *
*
* @author David Turanski
* @author John Blum
diff --git a/src/test/java/org/springframework/data/gemfire/LookupSubRegionTest.java b/src/test/java/org/springframework/data/gemfire/LookupSubRegionTest.java
index 623884bb..d2c3ca24 100644
--- a/src/test/java/org/springframework/data/gemfire/LookupSubRegionTest.java
+++ b/src/test/java/org/springframework/data/gemfire/LookupSubRegionTest.java
@@ -32,7 +32,7 @@ import com.gemstone.gemfire.cache.Region;
/**
* The LookupSubRegionTest class is a test suite of test cases testing the contract and functionality of Region lookups
* using Spring Data GemFire configuration and GemFire native cache.xml.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.springframework.context.ApplicationContext
diff --git a/src/test/java/org/springframework/data/gemfire/PartitionAttributesFactoryBeanTest.java b/src/test/java/org/springframework/data/gemfire/PartitionAttributesFactoryBeanTest.java
index d78ade57..4d3133f5 100644
--- a/src/test/java/org/springframework/data/gemfire/PartitionAttributesFactoryBeanTest.java
+++ b/src/test/java/org/springframework/data/gemfire/PartitionAttributesFactoryBeanTest.java
@@ -29,7 +29,7 @@ import com.gemstone.gemfire.cache.PartitionResolver;
/**
* The PartitionAttributesFactoryBeanTest class is test suite of test cases testing the contract and functionality of
* the PartitionAttributesFactoryBean class.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.springframework.data.gemfire.PartitionAttributesFactoryBean
diff --git a/src/test/java/org/springframework/data/gemfire/PartitionedRegionFactoryBeanTest.java b/src/test/java/org/springframework/data/gemfire/PartitionedRegionFactoryBeanTest.java
index f4fb5713..0d520b86 100644
--- a/src/test/java/org/springframework/data/gemfire/PartitionedRegionFactoryBeanTest.java
+++ b/src/test/java/org/springframework/data/gemfire/PartitionedRegionFactoryBeanTest.java
@@ -30,7 +30,7 @@ import com.gemstone.gemfire.cache.RegionFactory;
/**
* The PartitionedRegionFactoryBeanTest class is a test suite of test cases testing the component functionality
* and correct behavior of the PartitionedRegionFactoryBean class.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.mockito.Mockito
diff --git a/src/test/java/org/springframework/data/gemfire/PdxDiskStoreIntegrationTest.java b/src/test/java/org/springframework/data/gemfire/PdxDiskStoreIntegrationTest.java
index ac98c604..d6c38673 100644
--- a/src/test/java/org/springframework/data/gemfire/PdxDiskStoreIntegrationTest.java
+++ b/src/test/java/org/springframework/data/gemfire/PdxDiskStoreIntegrationTest.java
@@ -38,7 +38,7 @@ import com.gemstone.gemfire.cache.Region;
/**
* The PdxDiskStoreTest class is a test suite containing tests to reproduce the issue in JIRA SGF-197.
- *
+ *
* @author John Blum
* @link https://jira.springsource.org/browse/SGF-197
* @see org.junit.Test
@@ -130,6 +130,7 @@ public class PdxDiskStoreIntegrationTest {
}
}
+ @SuppressWarnings("unused")
public static class KeyHolder extends AbstractHolderSupport {
private T key;
@@ -178,6 +179,7 @@ public class PdxDiskStoreIntegrationTest {
}
}
+ @SuppressWarnings("unused")
public static class ValueHolder extends AbstractHolderSupport {
private T value;
diff --git a/src/test/java/org/springframework/data/gemfire/RegionDataPolicyShortcutsIntegrationTest.java b/src/test/java/org/springframework/data/gemfire/RegionDataPolicyShortcutsIntegrationTest.java
index 88eee25c..31b943ff 100644
--- a/src/test/java/org/springframework/data/gemfire/RegionDataPolicyShortcutsIntegrationTest.java
+++ b/src/test/java/org/springframework/data/gemfire/RegionDataPolicyShortcutsIntegrationTest.java
@@ -36,7 +36,7 @@ import com.gemstone.gemfire.cache.Region;
/**
* The RegionShortcutsIntegrationTest class is a test suite of test cases testing the use of RegionShortcuts in the
* Spring Data GemFire XML Namespace!
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.junit.runner.RunWith
diff --git a/src/test/java/org/springframework/data/gemfire/RegionFactoryBeanTest.java b/src/test/java/org/springframework/data/gemfire/RegionFactoryBeanTest.java
index 4dd1944e..43eaeda1 100644
--- a/src/test/java/org/springframework/data/gemfire/RegionFactoryBeanTest.java
+++ b/src/test/java/org/springframework/data/gemfire/RegionFactoryBeanTest.java
@@ -55,7 +55,7 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
/**
* The RegionFactoryBeanTest class is a test suite of test cases testing the contract and functionality of the
* RegionFactoryBean class.
- *
+ *
* @author David Turanski
* @author John Blum
* @see org.springframework.data.gemfire.RegionFactoryBean
diff --git a/src/test/java/org/springframework/data/gemfire/RegionLookupIntegrationTests.java b/src/test/java/org/springframework/data/gemfire/RegionLookupIntegrationTests.java
index a3c82adc..56fb6d5a 100644
--- a/src/test/java/org/springframework/data/gemfire/RegionLookupIntegrationTests.java
+++ b/src/test/java/org/springframework/data/gemfire/RegionLookupIntegrationTests.java
@@ -37,7 +37,7 @@ import com.gemstone.gemfire.cache.Scope;
/**
* The RegionLookupIntegrationTests class is a test suite of test cases testing the lookup functionality for various
* peer Region types.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.springframework.context.ConfigurableApplicationContext
diff --git a/src/test/java/org/springframework/data/gemfire/RegionShortcutConverterTest.java b/src/test/java/org/springframework/data/gemfire/RegionShortcutConverterTest.java
index d64141cf..a15c4140 100644
--- a/src/test/java/org/springframework/data/gemfire/RegionShortcutConverterTest.java
+++ b/src/test/java/org/springframework/data/gemfire/RegionShortcutConverterTest.java
@@ -25,7 +25,7 @@ import com.gemstone.gemfire.cache.RegionShortcut;
/**
* The RegionShortcutConverterTest class is a test suite of test cases testing the contract and functionality of the
* RegionShortcutConverter class
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.springframework.data.gemfire.RegionShortcutConverter
diff --git a/src/test/java/org/springframework/data/gemfire/ReplicatedRegionFactoryBeanTest.java b/src/test/java/org/springframework/data/gemfire/ReplicatedRegionFactoryBeanTest.java
index 8e28194a..5a61d879 100644
--- a/src/test/java/org/springframework/data/gemfire/ReplicatedRegionFactoryBeanTest.java
+++ b/src/test/java/org/springframework/data/gemfire/ReplicatedRegionFactoryBeanTest.java
@@ -30,7 +30,7 @@ import com.gemstone.gemfire.cache.RegionFactory;
/**
* The ReplicatedRegionFactoryBeanTest class is a test suite of test cases testing the component functionality
* and correct behavior of the ReplicatedRegionFactoryBean class.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.mockito.Mockito
diff --git a/src/test/java/org/springframework/data/gemfire/SimpleObjectSizer.java b/src/test/java/org/springframework/data/gemfire/SimpleObjectSizer.java
index 850f00af..cd9da6ce 100644
--- a/src/test/java/org/springframework/data/gemfire/SimpleObjectSizer.java
+++ b/src/test/java/org/springframework/data/gemfire/SimpleObjectSizer.java
@@ -17,14 +17,13 @@
package org.springframework.data.gemfire;
import com.gemstone.gemfire.cache.util.ObjectSizer;
-import com.gemstone.gemfire.cache.util.ObjectSizerImpl;
/**
* @author Costin Leau
*/
public class SimpleObjectSizer implements ObjectSizer {
- private static final ObjectSizer sizer = new ObjectSizerImpl();
+ private static final ObjectSizer sizer = ObjectSizer.DEFAULT;
@Override
public int sizeof(Object o) {
diff --git a/src/test/java/org/springframework/data/gemfire/SubRegionIntegrationTest.java b/src/test/java/org/springframework/data/gemfire/SubRegionIntegrationTest.java
index 6dcccd3c..51ee499d 100644
--- a/src/test/java/org/springframework/data/gemfire/SubRegionIntegrationTest.java
+++ b/src/test/java/org/springframework/data/gemfire/SubRegionIntegrationTest.java
@@ -47,7 +47,7 @@ import com.gemstone.gemfire.cache.SubscriptionAttributes;
* The SubRegionIntegrationTest class is a test suite of test cases testing the functionality of SubRegions in GemFire
* configured with Spring Data GemFire's XML namespace configuration meta-data. This test class tests a complex
* SubRegion configuration in order to ensure functional completeness.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.junit.runner.RunWith
@@ -58,6 +58,7 @@ import com.gemstone.gemfire.cache.SubscriptionAttributes;
*/
@ContextConfiguration("complex-subregion.xml")
@RunWith(SpringJUnit4ClassRunner.class)
+@SuppressWarnings("unused")
public class SubRegionIntegrationTest {
@Autowired
diff --git a/src/test/java/org/springframework/data/gemfire/client/ClientRegionWithCacheLoaderWriterTest.java b/src/test/java/org/springframework/data/gemfire/client/ClientRegionWithCacheLoaderWriterTest.java
index dfbb3b2b..4707b4ac 100644
--- a/src/test/java/org/springframework/data/gemfire/client/ClientRegionWithCacheLoaderWriterTest.java
+++ b/src/test/java/org/springframework/data/gemfire/client/ClientRegionWithCacheLoaderWriterTest.java
@@ -46,7 +46,7 @@ import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
/**
* The ClientRegionWithCacheLoaderWriterTest class is a test suite of test cases testing the addition of CacheLoaders
* and CacheWriters to a client, local Region inside a GemFire Cache.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.junit.runner.RunWith
diff --git a/src/test/java/org/springframework/data/gemfire/client/ClientSubRegionTest.java b/src/test/java/org/springframework/data/gemfire/client/ClientSubRegionTest.java
index f321b6b3..75841a29 100644
--- a/src/test/java/org/springframework/data/gemfire/client/ClientSubRegionTest.java
+++ b/src/test/java/org/springframework/data/gemfire/client/ClientSubRegionTest.java
@@ -38,14 +38,13 @@ import com.gemstone.gemfire.cache.client.ClientCache;
/**
* The ClientSubRegionTest class is a test suite of test cases testing SubRegion functionality from a client
* GemFire Cache.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.junit.runner.RunWith
* @see org.springframework.test.context.ContextConfiguration
* @see org.springframework.test.context.junit4.SpringJUnit4ClassRunner
* @since 1.4.0
- * @since 7.0.1 (GemFire)
*/
@ContextConfiguration("clientcache-with-subregion-config.xml")
@RunWith(SpringJUnit4ClassRunner.class)
diff --git a/src/test/java/org/springframework/data/gemfire/config/AbstractRegionParserTest.java b/src/test/java/org/springframework/data/gemfire/config/AbstractRegionParserTest.java
index 47bec9d1..988a01c1 100644
--- a/src/test/java/org/springframework/data/gemfire/config/AbstractRegionParserTest.java
+++ b/src/test/java/org/springframework/data/gemfire/config/AbstractRegionParserTest.java
@@ -35,7 +35,7 @@ import org.w3c.dom.Node;
/**
* The AbstractRegionParserTest class is a test suite of test cases testing the contract and functionality of the
* AbstractRegionParser class.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.mockito.Mockito
diff --git a/src/test/java/org/springframework/data/gemfire/config/CacheServerNamespaceTest.java b/src/test/java/org/springframework/data/gemfire/config/CacheServerNamespaceTest.java
index 2e389b7f..b4159feb 100644
--- a/src/test/java/org/springframework/data/gemfire/config/CacheServerNamespaceTest.java
+++ b/src/test/java/org/springframework/data/gemfire/config/CacheServerNamespaceTest.java
@@ -35,7 +35,7 @@ import com.gemstone.gemfire.cache.server.ClientSubscriptionConfig;
/**
* The CacheServerNamespaceTest class is a test suite of test cases testing the functionality of the SDG XML namespace
* when configuring a GemFire Cache Servers and Client Subscription.
- *
+ *
* @author Costin Leau
* @author David Turanski
* @author John Blum
@@ -49,12 +49,14 @@ import com.gemstone.gemfire.cache.server.ClientSubscriptionConfig;
*/
@ContextConfiguration(locations="server-ns.xml", initializers=GemfireTestApplicationContextInitializer.class)
@RunWith(SpringJUnit4ClassRunner.class)
+@SuppressWarnings("unused")
public class CacheServerNamespaceTest {
@Autowired
private ApplicationContext context;
@Test
+ @SuppressWarnings("deprecation")
public void testBasicCacheServer() throws Exception {
CacheServer cacheServer = context.getBean("advanced-config", CacheServer.class);
diff --git a/src/test/java/org/springframework/data/gemfire/config/CacheUsingPdxNamespaceTest.java b/src/test/java/org/springframework/data/gemfire/config/CacheUsingPdxNamespaceTest.java
index b7c7efd9..62021f6f 100644
--- a/src/test/java/org/springframework/data/gemfire/config/CacheUsingPdxNamespaceTest.java
+++ b/src/test/java/org/springframework/data/gemfire/config/CacheUsingPdxNamespaceTest.java
@@ -35,7 +35,7 @@ import com.gemstone.gemfire.pdx.PdxSerializer;
/**
* The CacheUsingPdxNamespaceTest class is a test suite of test case testing the Spring Data GemFire XML namespace
* when PDX is configured in GemFire.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.junit.runner.RunWith
diff --git a/src/test/java/org/springframework/data/gemfire/config/ClientRegionNamespaceTest.java b/src/test/java/org/springframework/data/gemfire/config/ClientRegionNamespaceTest.java
index 01d0366f..58db8dcd 100644
--- a/src/test/java/org/springframework/data/gemfire/config/ClientRegionNamespaceTest.java
+++ b/src/test/java/org/springframework/data/gemfire/config/ClientRegionNamespaceTest.java
@@ -114,8 +114,8 @@ public class ClientRegionNamespaceTest {
assertEquals(5, attrs.getEvictionAttributes().getMaximum());
}
- @SuppressWarnings("rawtypes")
@Test
+ @SuppressWarnings({ "deprecation", "rawtypes" })
public void testPersistent() throws Exception {
assertTrue(context.containsBean("persistent"));
Region region = context.getBean("persistent", Region.class);
diff --git a/src/test/java/org/springframework/data/gemfire/config/ClientRegionUsingDataPolicyAndShortcutTest.java b/src/test/java/org/springframework/data/gemfire/config/ClientRegionUsingDataPolicyAndShortcutTest.java
index 7cf8febf..2c2acaa8 100644
--- a/src/test/java/org/springframework/data/gemfire/config/ClientRegionUsingDataPolicyAndShortcutTest.java
+++ b/src/test/java/org/springframework/data/gemfire/config/ClientRegionUsingDataPolicyAndShortcutTest.java
@@ -25,7 +25,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* The ClientRegionUsingDataPolicyAndShortcutTest class is a test suite of test case testing a client Region
* bean definition with both data-policy and shortcut specified.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @since 1.3.3
diff --git a/src/test/java/org/springframework/data/gemfire/config/EvictionAttributesFactoryBeanTest.java b/src/test/java/org/springframework/data/gemfire/config/EvictionAttributesFactoryBeanTest.java
index 362557bc..8d02d393 100644
--- a/src/test/java/org/springframework/data/gemfire/config/EvictionAttributesFactoryBeanTest.java
+++ b/src/test/java/org/springframework/data/gemfire/config/EvictionAttributesFactoryBeanTest.java
@@ -34,7 +34,7 @@ import com.gemstone.gemfire.internal.cache.lru.MemLRUCapacityController;
/**
* The EvictionAttributesFactoryBeanTest class is a test suite of test cases testing the contract and functionality
* of the EvictionAttributesFactoryBean class used to create Region Eviction configuration settings.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.springframework.data.gemfire.config.EvictionAttributesFactoryBean
diff --git a/src/test/java/org/springframework/data/gemfire/config/GemfireV7GatewayNamespaceTest.java b/src/test/java/org/springframework/data/gemfire/config/GemfireV7GatewayNamespaceTest.java
index e5707cb5..db8bd795 100644
--- a/src/test/java/org/springframework/data/gemfire/config/GemfireV7GatewayNamespaceTest.java
+++ b/src/test/java/org/springframework/data/gemfire/config/GemfireV7GatewayNamespaceTest.java
@@ -37,7 +37,6 @@ import org.springframework.data.gemfire.TestUtils;
import org.springframework.data.gemfire.test.GemfireTestBeanPostProcessor;
import org.springframework.data.gemfire.wan.GatewaySenderFactoryBean;
-import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEvent;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventListener;
@@ -51,14 +50,15 @@ import com.gemstone.gemfire.cache.wan.GatewayTransportFilter;
/**
* This test is only valid for GF 7.0 and above
- *
+ *
* @author David Turanski
* @author John Blum
*/
@SuppressWarnings("unused")
public class GemfireV7GatewayNamespaceTest extends RecreatingContextTest {
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
* @see org.springframework.data.gemfire.RecreatingContextTest#location()
*/
@Override
diff --git a/src/test/java/org/springframework/data/gemfire/config/IndexNamespaceTest.java b/src/test/java/org/springframework/data/gemfire/config/IndexNamespaceTest.java
index a607e97e..3655db2d 100644
--- a/src/test/java/org/springframework/data/gemfire/config/IndexNamespaceTest.java
+++ b/src/test/java/org/springframework/data/gemfire/config/IndexNamespaceTest.java
@@ -29,16 +29,14 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.IndexType;
/**
- *
* @author Costin Leau
* @author David Turanski
*/
+@ContextConfiguration(locations="index-ns.xml", initializers=GemfireTestApplicationContextInitializer.class)
@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration(locations="index-ns.xml",
- initializers=GemfireTestApplicationContextInitializer.class)
+@SuppressWarnings("deprecation")
public class IndexNamespaceTest {
private final String name = "test-index";
@@ -49,6 +47,7 @@ public class IndexNamespaceTest {
@Before
public void setUp() throws Exception {
Cache cache = (Cache) context.getBean("gemfireCache");
+
if (cache.getRegion(name) == null) {
cache.createRegionFactory().create("test-index");
}
@@ -62,7 +61,7 @@ public class IndexNamespaceTest {
assertEquals("status", idx.getIndexedExpression());
assertEquals("simple", idx.getName());
assertEquals(name, idx.getRegion().getName());
- assertEquals(IndexType.FUNCTIONAL, idx.getType());
+ assertEquals(com.gemstone.gemfire.cache.query.IndexType.FUNCTIONAL, idx.getType());
}
@Test
@@ -73,6 +72,7 @@ public class IndexNamespaceTest {
assertEquals("tsi.name", idx.getIndexedExpression());
assertEquals("complex-index", idx.getName());
assertEquals(name, idx.getRegion().getName());
- assertEquals(IndexType.HASH, idx.getType());
+ assertEquals(com.gemstone.gemfire.cache.query.IndexType.HASH, idx.getType());
}
+
}
diff --git a/src/test/java/org/springframework/data/gemfire/config/JndiBindingsPropertyPlaceholderTest.java b/src/test/java/org/springframework/data/gemfire/config/JndiBindingsPropertyPlaceholderTest.java
index 8fde976e..ea5e59d9 100644
--- a/src/test/java/org/springframework/data/gemfire/config/JndiBindingsPropertyPlaceholderTest.java
+++ b/src/test/java/org/springframework/data/gemfire/config/JndiBindingsPropertyPlaceholderTest.java
@@ -38,7 +38,7 @@ import com.gemstone.gemfire.internal.datasource.ConfigProperty;
/**
* The JndiBindingsPropertyPlaceholderTest class is a test suite of test cases testing the configuration of a GemFire
* Cache JNDI DataSource using property placeholders.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.springframework.context.ApplicationContext
diff --git a/src/test/java/org/springframework/data/gemfire/config/JndiBindingsTest.java b/src/test/java/org/springframework/data/gemfire/config/JndiBindingsTest.java
index db661d9e..087821ac 100644
--- a/src/test/java/org/springframework/data/gemfire/config/JndiBindingsTest.java
+++ b/src/test/java/org/springframework/data/gemfire/config/JndiBindingsTest.java
@@ -22,7 +22,6 @@ import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.context.ApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -31,7 +30,7 @@ import com.gemstone.gemfire.internal.datasource.GemFireBasicDataSource;
/**
* This test requires a real cache
- *
+ *
* @author David Turanski
* @author John Blum
*/
diff --git a/src/test/java/org/springframework/data/gemfire/config/LocalRegionNamespaceTest.java b/src/test/java/org/springframework/data/gemfire/config/LocalRegionNamespaceTest.java
index 930211bd..3f3f2974 100644
--- a/src/test/java/org/springframework/data/gemfire/config/LocalRegionNamespaceTest.java
+++ b/src/test/java/org/springframework/data/gemfire/config/LocalRegionNamespaceTest.java
@@ -58,8 +58,8 @@ public class LocalRegionNamespaceTest {
assertTrue(context.containsBean("simple"));
}
- @SuppressWarnings("rawtypes")
@Test
+ @SuppressWarnings({ "deprecation", "rawtypes" })
public void testPublishingLocal() throws Exception {
assertTrue(context.containsBean("pub"));
RegionFactoryBean fb = context.getBean("&pub", RegionFactoryBean.class);
@@ -117,4 +117,4 @@ public class LocalRegionNamespaceTest {
RegionAttributes attrs = region.getAttributes();
assertTrue(attrs.getDataPolicy().withPersistence());
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/springframework/data/gemfire/config/PdxDiskStoreAwareBeanFactoryPostProcessorTest.java b/src/test/java/org/springframework/data/gemfire/config/PdxDiskStoreAwareBeanFactoryPostProcessorTest.java
index 88384710..ad1bbf24 100644
--- a/src/test/java/org/springframework/data/gemfire/config/PdxDiskStoreAwareBeanFactoryPostProcessorTest.java
+++ b/src/test/java/org/springframework/data/gemfire/config/PdxDiskStoreAwareBeanFactoryPostProcessorTest.java
@@ -49,7 +49,7 @@ import com.gemstone.gemfire.internal.cache.PartitionedRegion;
/**
* The PdxDiskStoreAwareBeanFactoryPostProcessorTest class is a test suite of test cases testing the functionality
* of the PdxDiskStoreAwareBeanFactoryPostProcessor class.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.mockito.Mockito
@@ -69,7 +69,7 @@ public class PdxDiskStoreAwareBeanFactoryPostProcessorTest {
return (array == null || array.length == 0);
}
- protected static boolean isBeanType(final BeanDefinition beanDefinition, final Class beanType) {
+ protected static boolean isBeanType(final BeanDefinition beanDefinition, final Class> beanType) {
return (beanDefinition instanceof AbstractBeanDefinition
&& ((AbstractBeanDefinition) beanDefinition).hasBeanClass()
&& beanType.isAssignableFrom(((AbstractBeanDefinition) beanDefinition).getBeanClass()));
diff --git a/src/test/java/org/springframework/data/gemfire/config/RegionEvictionAttributesNamespaceTest.java b/src/test/java/org/springframework/data/gemfire/config/RegionEvictionAttributesNamespaceTest.java
index dbac9889..453e9dd1 100644
--- a/src/test/java/org/springframework/data/gemfire/config/RegionEvictionAttributesNamespaceTest.java
+++ b/src/test/java/org/springframework/data/gemfire/config/RegionEvictionAttributesNamespaceTest.java
@@ -36,7 +36,7 @@ import com.gemstone.gemfire.internal.cache.lru.LRUCapacityController;
/**
* The RegionEvictionAttributesNamespaceTest class is a test suite of test cases testing the use of Eviction settings
* (EvictionAttributes) in the SDG XML namespace.
- *
+ *
* @author John Blum
* @since 1.3.4
*/
diff --git a/src/test/java/org/springframework/data/gemfire/config/RegionWithSubRegionBeanDefinitionHashCodeTest.java b/src/test/java/org/springframework/data/gemfire/config/RegionWithSubRegionBeanDefinitionHashCodeTest.java
index 1cc9df84..98926f2a 100644
--- a/src/test/java/org/springframework/data/gemfire/config/RegionWithSubRegionBeanDefinitionHashCodeTest.java
+++ b/src/test/java/org/springframework/data/gemfire/config/RegionWithSubRegionBeanDefinitionHashCodeTest.java
@@ -33,14 +33,14 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
* Spring container BeanDefinition representing a GemFire Region having SubRegions. This test suite is meant to
* ensure the correct behavior of and provide regression coverage for, JIRA issue SGF-178, "parent attribute causes
* endless loop in hashCode".
- *
+ *
* The 'parent' attribute was added to the parent Region's BeanDefinition, referring to the parent Region's
* BeanDefinition itself, before it recurses to parse the SubRegion elements, which is then used by the
* AbstractRegionParser.doParseInternal method to set the parent property of the SubRegion's BeanDefinition.
- *
+ *
* Calling hashCode on a parent Region's BeanDefinition that has a parent 'attribute' referring to the parent Region's
* BeanDefinition itself, causes infinite recursion and an eventual StackOverflowError.
- *
+ *
*
* java.lang.StackOverflowError
* at java.util.LinkedHashMap$LinkedHashIterator.(LinkedHashMap.java:345)
@@ -68,10 +68,10 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
* at org.springframework.core.AttributeAccessorSupport.hashCode(AttributeAccessorSupport.java:99)
* at org.springframework.beans.factory.support.AbstractBeanDefinition.hashCode(AbstractBeanDefinition.java:1052)
*
- *
+ *
* This also causes problems for tools like Spring Tool Suite, which use the BeanDefinitions from the Spring container
* context as meta-data in the IDE.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.junit.runner.RunWith
diff --git a/src/test/java/org/springframework/data/gemfire/config/ReplicatedRegionNamespaceTest.java b/src/test/java/org/springframework/data/gemfire/config/ReplicatedRegionNamespaceTest.java
index f362ad77..0469c1cc 100644
--- a/src/test/java/org/springframework/data/gemfire/config/ReplicatedRegionNamespaceTest.java
+++ b/src/test/java/org/springframework/data/gemfire/config/ReplicatedRegionNamespaceTest.java
@@ -56,13 +56,13 @@ public class ReplicatedRegionNamespaceTest {
public void testBasicReplica() throws Exception {
assertTrue(context.containsBean("simple"));
RegionFactoryBean fb = context.getBean("&simple", RegionFactoryBean.class);
- assertEquals(false ,(Boolean)TestUtils.readField("close", fb));
+ assertEquals(false, TestUtils.readField("close", fb));
RegionAttributes attrs = TestUtils.readField("attributes", fb);
assertFalse(attrs.getConcurrencyChecksEnabled());
}
- @SuppressWarnings("rawtypes")
@Test
+ @SuppressWarnings({ "deprecation", "rawtypes" })
public void testPublishingReplica() throws Exception {
assertTrue(context.containsBean("pub"));
RegionFactoryBean fb = context.getBean("&pub", RegionFactoryBean.class);
@@ -122,4 +122,4 @@ public class ReplicatedRegionNamespaceTest {
assertEquals(existing, context.getBean("lookup"));
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/springframework/data/gemfire/config/SubRegionNamespaceTest.java b/src/test/java/org/springframework/data/gemfire/config/SubRegionNamespaceTest.java
index ea3e2426..75805e28 100644
--- a/src/test/java/org/springframework/data/gemfire/config/SubRegionNamespaceTest.java
+++ b/src/test/java/org/springframework/data/gemfire/config/SubRegionNamespaceTest.java
@@ -37,7 +37,7 @@ import com.gemstone.gemfire.cache.Region;
/**
* The SubRegionNamespaceTest class is a test suite of test cases testing the contract and functionality of
* Region/SubRegion creation in a GemFire Cache.
- *
+ *
* @author David Turanski
* @author John Blum
* @see org.junit.Test
diff --git a/src/test/java/org/springframework/data/gemfire/config/SubRegionSubElementNamespaceTest.java b/src/test/java/org/springframework/data/gemfire/config/SubRegionSubElementNamespaceTest.java
index acae2f6c..6da72f52 100644
--- a/src/test/java/org/springframework/data/gemfire/config/SubRegionSubElementNamespaceTest.java
+++ b/src/test/java/org/springframework/data/gemfire/config/SubRegionSubElementNamespaceTest.java
@@ -36,7 +36,7 @@ import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
/**
* The SubRegionSubElementNamespaceTest class...
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.springframework.test.context.ContextConfiguration
diff --git a/src/test/java/org/springframework/data/gemfire/config/SubRegionWithInvalidDataPolicyTest.java b/src/test/java/org/springframework/data/gemfire/config/SubRegionWithInvalidDataPolicyTest.java
index 55ecece9..c7040542 100644
--- a/src/test/java/org/springframework/data/gemfire/config/SubRegionWithInvalidDataPolicyTest.java
+++ b/src/test/java/org/springframework/data/gemfire/config/SubRegionWithInvalidDataPolicyTest.java
@@ -28,7 +28,7 @@ import org.xml.sax.SAXParseException;
/**
* The SubRegionWithInvalidDataPolicyTest class is a test suite of test cases testing the data-policy and persistent
* attributes settings are consistent for GemFire SubRegion bean definitions.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.springframework.test.context.junit4.SpringJUnit4ClassRunner
diff --git a/src/test/java/org/springframework/data/gemfire/fork/CacheServerProcess.java b/src/test/java/org/springframework/data/gemfire/fork/CacheServerProcess.java
index 0fd566d8..b1434914 100644
--- a/src/test/java/org/springframework/data/gemfire/fork/CacheServerProcess.java
+++ b/src/test/java/org/springframework/data/gemfire/fork/CacheServerProcess.java
@@ -20,10 +20,8 @@ import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Properties;
-
import org.springframework.data.gemfire.ForkUtil;
-import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.DataPolicy;
@@ -31,11 +29,11 @@ import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionFactory;
import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.distributed.DistributedSystem;
/**
* @author Costin Leau
*/
+@SuppressWarnings("unchecked")
public class CacheServerProcess {
public static void main(String[] args) throws Exception {
@@ -75,4 +73,5 @@ public class CacheServerProcess {
System.out.println("Waiting for shutdown");
bufferedReader.readLine();
}
+
}
diff --git a/src/test/java/org/springframework/data/gemfire/function/FunctionArgumentResolverTest.java b/src/test/java/org/springframework/data/gemfire/function/FunctionArgumentResolverTest.java
index 17d767d4..a6c33660 100644
--- a/src/test/java/org/springframework/data/gemfire/function/FunctionArgumentResolverTest.java
+++ b/src/test/java/org/springframework/data/gemfire/function/FunctionArgumentResolverTest.java
@@ -262,6 +262,7 @@ public class FunctionArgumentResolverTest {
}
@Test
+ @SuppressWarnings("unchecked")
public void testMethodWithFunctionContextAndResultSender() throws NoSuchMethodException {
FunctionContext functionContext = mock(FunctionContext.class);
ResultSender resultSender = mock(ResultSender.class);
diff --git a/src/test/java/org/springframework/data/gemfire/mapping/RegionsTest.java b/src/test/java/org/springframework/data/gemfire/mapping/RegionsTest.java
index f49077ca..a0587271 100644
--- a/src/test/java/org/springframework/data/gemfire/mapping/RegionsTest.java
+++ b/src/test/java/org/springframework/data/gemfire/mapping/RegionsTest.java
@@ -41,13 +41,14 @@ import com.gemstone.gemfire.cache.Region;
/**
* The RegionsTest class is a test suite of test cases testing the contract and functionality of the Regions class.
- *
+ *
* @author John J. Blum
* @see org.junit.Test
* @see org.mockito.Mockito
* @see org.springframework.data.gemfire.mapping.Regions
* @since 1.3.4
*/
+@SuppressWarnings("unchecked")
public class RegionsTest {
private MappingContext mockMappingContext;
@@ -74,7 +75,6 @@ public class RegionsTest {
}
@Before
- @SuppressWarnings("unchecked")
public void setup() {
mockMappingContext = mock(GemfireMappingContext.class, "GemfireMappingContext");
diff --git a/src/test/java/org/springframework/data/gemfire/repository/query/DefaultGemfireEntityInformationTest.java b/src/test/java/org/springframework/data/gemfire/repository/query/DefaultGemfireEntityInformationTest.java
index b4d8f5c7..6f41c48b 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/query/DefaultGemfireEntityInformationTest.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/query/DefaultGemfireEntityInformationTest.java
@@ -35,7 +35,7 @@ import org.springframework.data.mapping.context.MappingContext;
* The DefaultGemfireEntityInformationTest class is a test suite of test cases testing the contract and functionality
* of the DefaultGemfireEntityInformation class used to extract entity information during persistence/mapping operations
* during data access to the underlying data store (GemFire).
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.springframework.data.gemfire.repository.query.DefaultGemfireEntityInformation
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/Algorithm.java b/src/test/java/org/springframework/data/gemfire/repository/sample/Algorithm.java
index 9f44408c..9726698c 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/Algorithm.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/Algorithm.java
@@ -21,7 +21,7 @@ import org.springframework.data.gemfire.mapping.Region;
/**
* The Algorithm interface define abstract data type modeling a computer algorithm.
- *
+ *
* @author John Blum
* @see org.springframework.data.annotation.Id
* @see org.springframework.data.gemfire.mapping.Region
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/AlgorithmRepository.java b/src/test/java/org/springframework/data/gemfire/repository/sample/AlgorithmRepository.java
index ff8b2e2c..7a0a3158 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/AlgorithmRepository.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/AlgorithmRepository.java
@@ -21,7 +21,7 @@ import org.springframework.data.gemfire.repository.GemfireRepository;
/**
* The AlgorithmRepository class is a Data Access Object (DAO) for accessing and persistent data/state about Algorithms
* to a GemFire Cache/Region.
- *
+ *
* @author John Blum
* @see org.springframework.data.gemfire.repository.GemfireRepository
* @since 1.4.0
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/AlgorithmRepositoryTest.java b/src/test/java/org/springframework/data/gemfire/repository/sample/AlgorithmRepositoryTest.java
index e53a5433..079ab464 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/AlgorithmRepositoryTest.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/AlgorithmRepositoryTest.java
@@ -35,7 +35,7 @@ import com.gemstone.gemfire.cache.Region;
* The AlgorithmRepositoryTest class is a test suite of test cases testing the contract and functionality of GemFire's
* Repository extension when using a plain old Java interface for defining the application domain object/entity type,
* rather than a Java class, that is the subject of the persistence operations.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.junit.runner.RunWith
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/AnimalRepositoryTest.java b/src/test/java/org/springframework/data/gemfire/repository/sample/AnimalRepositoryTest.java
index 8346871b..2e169a98 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/AnimalRepositoryTest.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/AnimalRepositoryTest.java
@@ -28,13 +28,14 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
/**
* The AnimalRepositoryTest class is a test suite of test cases testing the functionality behind PR #55 involving
* persisting application domain object/entities to multiple Regions in GemFire's Cache.
- *
+ *
* @author Stuart Williams
* @author John Blum
* @see org.junit.Test
* @see org.junit.runner.RunWith
* @see org.springframework.test.context.ContextConfiguration
* @see org.springframework.test.context.junit4.SpringJUnit4ClassRunner
+ * @since 1.4.0
* @link https://github.com/spring-projects/spring-data-gemfire/pull/55
*/
@ContextConfiguration("AnimalRepositoryTest-context.xml")
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/GuestUser.java b/src/test/java/org/springframework/data/gemfire/repository/sample/GuestUser.java
index ed7919e8..4fbe1c7e 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/GuestUser.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/GuestUser.java
@@ -20,11 +20,11 @@ import org.springframework.data.gemfire.mapping.Region;
/**
* The GuestUser class represents an authorized restricted user of a service or computer system, etc.
- *
+ *
* @author John Blum
* @see org.springframework.data.gemfire.mapping.Region
* @see org.springframework.data.gemfire.repository.sample.User
- * @since 1.3.4
+ * @since 1.4.0
*/
@Region("/Local/Guest/Users")
@SuppressWarnings("unused")
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/GuestUserRepository.java b/src/test/java/org/springframework/data/gemfire/repository/sample/GuestUserRepository.java
index 0e9120b5..39a0175d 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/GuestUserRepository.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/GuestUserRepository.java
@@ -22,11 +22,11 @@ import org.springframework.data.gemfire.repository.GemfireRepository;
/**
* The GuestUserRepository class is a DAO for accessing and persisting GuestUsers.
- *
+ *
* @author John Blum
* @see org.springframework.data.gemfire.repository.GemfireRepository
* @see org.springframework.data.gemfire.repository.sample.GuestUser
- * @since 1.3.4
+ * @since 1.4.0
*/
@SuppressWarnings("unused")
public interface GuestUserRepository extends GemfireRepository {
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/IncompatibleRegionKeyEntityIdAnimalRepositoryTest.java b/src/test/java/org/springframework/data/gemfire/repository/sample/IncompatibleRegionKeyEntityIdAnimalRepositoryTest.java
index 50890ac7..7d99849f 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/IncompatibleRegionKeyEntityIdAnimalRepositoryTest.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/IncompatibleRegionKeyEntityIdAnimalRepositoryTest.java
@@ -30,7 +30,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* The IncompatibleRegionKeyEntityIdAnimalRepositoryTest class is a test suite of test cases testing the functionality
* behind PR #55 involving persisting application domain object/entities to multiple Regions in GemFire's Cache.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.springframework.context.ConfigurableApplicationContext
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/Plant.java b/src/test/java/org/springframework/data/gemfire/repository/sample/Plant.java
index e1c6bfc5..48e26ab5 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/Plant.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/Plant.java
@@ -22,7 +22,7 @@ import org.springframework.util.ObjectUtils;
/**
* The Plant class is a very simple ADT modeling a plant for SDG Repository testing purposes.
- *
+ *
* @author John Blum
* @see org.springframework.data.annotation.Id
* @see org.springframework.data.gemfire.mapping.Region
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/PlantRepository.java b/src/test/java/org/springframework/data/gemfire/repository/sample/PlantRepository.java
index e11294b1..c29c9d5a 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/PlantRepository.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/PlantRepository.java
@@ -22,7 +22,7 @@ import org.springframework.data.gemfire.repository.Query;
/**
* The PlantRepository class is a Repository extension for accessing and storing Plants.
* Note, this Spring GemFire Repository extension incorrectly maps Plants to the Plants Region on purpose
- *
+ *
* @author John Blum
* @see org.springframework.data.gemfire.repository.GemfireRepository
* @see org.springframework.data.gemfire.repository.Query
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/PlantRepositoryTest.java b/src/test/java/org/springframework/data/gemfire/repository/sample/PlantRepositoryTest.java
index 4ed2ea29..6fd5cf47 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/PlantRepositoryTest.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/PlantRepositoryTest.java
@@ -29,7 +29,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* The PlantRepositoryTest class is a test suite of test cases testing the functionality behind PR #55 involving
* persisting application domain object/entities to multiple Regions in GemFire's Cache.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.springframework.context.ConfigurableApplicationContext
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/Programmer.java b/src/test/java/org/springframework/data/gemfire/repository/sample/Programmer.java
index 11e575df..8e669da2 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/Programmer.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/Programmer.java
@@ -21,11 +21,11 @@ import org.springframework.util.StringUtils;
/**
* The Programmer class is a User representing/modeling a software engineer/developer.
- *
+ *
* @author John J. Blum
* @see org.springframework.data.gemfire.mapping.Region
* @see org.springframework.data.gemfire.repository.sample.User
- * @since 1.3.4
+ * @since 1.4.0
*/
@Region("Programmers")
@SuppressWarnings("unused")
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/ProgrammerRepository.java b/src/test/java/org/springframework/data/gemfire/repository/sample/ProgrammerRepository.java
index 9c6ca3b6..d090b3d1 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/ProgrammerRepository.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/ProgrammerRepository.java
@@ -23,11 +23,11 @@ import org.springframework.data.gemfire.repository.GemfireRepository;
/**
* The ProgrammerRepository class is a Data Access Object (DAO) for Programmer domain objects supporting basic CRUD
* and Query operations.
- *
+ *
* @author John Blum
* @see org.springframework.data.gemfire.repository.GemfireRepository
* @see org.springframework.data.gemfire.repository.sample.Programmer
- * @since 1.3.4
+ * @since 1.4.0
*/
@SuppressWarnings("unused")
public interface ProgrammerRepository extends GemfireRepository {
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/RabbitRepository.java b/src/test/java/org/springframework/data/gemfire/repository/sample/RabbitRepository.java
index c9b7c79a..36d1b7e1 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/RabbitRepository.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/RabbitRepository.java
@@ -23,7 +23,7 @@ import org.springframework.data.gemfire.repository.Query;
/**
* The RabbitRepository class is a Spring Data GemFire Repository extension for accessing and persistent Rabbits
* from/to an underlying data store (GemFire).
- *
+ *
* @author John Blum
* @see org.springframework.data.gemfire.mapping.Region
* @see org.springframework.data.gemfire.repository.GemfireRepository
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/RootUser.java b/src/test/java/org/springframework/data/gemfire/repository/sample/RootUser.java
index 2cfc253c..b6407e6a 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/RootUser.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/RootUser.java
@@ -20,11 +20,11 @@ import org.springframework.data.gemfire.mapping.Region;
/**
* The RootUser class represents an authorized administrative user of a service or computer system, etc.
- *
+ *
* @author John Blum
* @see org.springframework.data.gemfire.mapping.Region
* @see org.springframework.data.gemfire.repository.sample.User
- * @since 1.3.4
+ * @since 1.4.0
*/
@Region("/Local/Admin/Users")
@SuppressWarnings("unused")
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/RootUserRepository.java b/src/test/java/org/springframework/data/gemfire/repository/sample/RootUserRepository.java
index c2af7845..d8db340e 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/RootUserRepository.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/RootUserRepository.java
@@ -22,11 +22,11 @@ import org.springframework.data.gemfire.repository.GemfireRepository;
/**
* The RootUserRepository class is a DAO for accessing and persisting RootUsers.
- *
+ *
* @author John Blum
* @see org.springframework.data.gemfire.repository.GemfireRepository
* @see org.springframework.data.gemfire.repository.sample.RootUser
- * @since 1.3.4
+ * @since 1.4.0
*/
@SuppressWarnings("unused")
public interface RootUserRepository extends GemfireRepository {
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/SubRegionRepositoryIntegrationTest.java b/src/test/java/org/springframework/data/gemfire/repository/sample/SubRegionRepositoryIntegrationTest.java
index 66972d98..2ffa2267 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/SubRegionRepositoryIntegrationTest.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/SubRegionRepositoryIntegrationTest.java
@@ -41,7 +41,7 @@ import com.gemstone.gemfire.cache.Region;
/**
* The SubRegionRepositoryTest class is a test suite of test cases testing the use of GemFire Repositories on GemFire
* Cache Subregions.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.junit.runner.RunWith
@@ -53,7 +53,7 @@ import com.gemstone.gemfire.cache.Region;
* @see com.gemstone.gemfire.cache.Region
* @link https://jira.springsource.org/browse/SGF-251
* @link https://jira.springsource.org/browse/SGF-252
- * @since 1.0.0
+ * @since 1.4.0
*/
@ContextConfiguration("subregionRepository.xml")
@RunWith(SpringJUnit4ClassRunner.class)
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/User.java b/src/test/java/org/springframework/data/gemfire/repository/sample/User.java
index 3cf6c82a..fc6aecc4 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/User.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/User.java
@@ -25,12 +25,12 @@ import org.springframework.util.ObjectUtils;
/**
* The User class represents an authorized user of a service or computer system, etc.
- *
+ *
* @author John Blum
* @see java.lang.Comparable
* @see org.springframework.data.annotation.Id
* @see org.springframework.data.gemfire.mapping.Region
- * @since 1.3.4
+ * @since 1.4.0
*/
@Region("Users")
@SuppressWarnings("unused")
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/UserRepository.java b/src/test/java/org/springframework/data/gemfire/repository/sample/UserRepository.java
index 18ab249f..601b40c4 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/UserRepository.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/UserRepository.java
@@ -22,12 +22,12 @@ import org.springframework.data.gemfire.repository.GemfireRepository;
/**
* The UserRepository class is a DAO for accessing and persisting Users.
- *
+ *
* @author John Blum
* @see org.springframework.data.gemfire.repository.GemfireRepository
* @see org.springframework.data.gemfire.repository.Query
* @see org.springframework.data.gemfire.repository.sample.User
- * @since 1.3.4
+ * @since 1.4.0
*/
@SuppressWarnings("unused")
public interface UserRepository extends GemfireRepository {
diff --git a/src/test/java/org/springframework/data/gemfire/repository/sample/UserRepositoryQueriesIntegrationTest.java b/src/test/java/org/springframework/data/gemfire/repository/sample/UserRepositoryQueriesIntegrationTest.java
index 838f2ff0..be52c90d 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/sample/UserRepositoryQueriesIntegrationTest.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/sample/UserRepositoryQueriesIntegrationTest.java
@@ -39,14 +39,13 @@ import com.gemstone.gemfire.cache.Region;
/**
* The RepositoryQueriesTest class is a test suite of test cases testing the GemFire Query capability of Spring Data
* GemFire Repositories.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.junit.runner.RunWith
* @see org.springframework.test.context.ContextConfiguration
* @see org.springframework.test.context.junit4.SpringJUnit4ClassRunner
- * @since 1.3.3 (Spring Data GemFire)
- * @since 7.0.1 (GemFire)
+ * @since 1.3.3
*/
@ContextConfiguration("userRepositoryQueriesIntegrationTest.xml")
@RunWith(SpringJUnit4ClassRunner.class)
diff --git a/src/test/java/org/springframework/data/gemfire/repository/support/GemfireRepositoryFactoryUnitTests.java b/src/test/java/org/springframework/data/gemfire/repository/support/GemfireRepositoryFactoryUnitTests.java
index 92a1b80d..43599a89 100644
--- a/src/test/java/org/springframework/data/gemfire/repository/support/GemfireRepositoryFactoryUnitTests.java
+++ b/src/test/java/org/springframework/data/gemfire/repository/support/GemfireRepositoryFactoryUnitTests.java
@@ -15,8 +15,8 @@
*/
package org.springframework.data.gemfire.repository.support;
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.*;
+import static org.junit.Assert.assertThat;
+import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.List;
@@ -26,32 +26,39 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.domain.Sort;
import org.springframework.data.gemfire.mapping.GemfireMappingContext;
import org.springframework.data.gemfire.repository.sample.Person;
import org.springframework.data.repository.PagingAndSortingRepository;
+import org.springframework.data.repository.Repository;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionAttributes;
/**
* Unit tests for {@link GemfireRepositoryFactory}.
- *
+ *
* @author Oliver Gierke
+ * @author John Blum
+ * @see org.springframework.data.gemfire.repository.support.GemfireRepositoryFactory
*/
@RunWith(MockitoJUnitRunner.class)
+@SuppressWarnings("unused")
public class GemfireRepositoryFactoryUnitTests {
@Mock
- Region, ?> region;
+ private Region, ?> region;
@Mock
@SuppressWarnings("rawtypes")
- RegionAttributes attributes;
+ private RegionAttributes attributes;
/**
- * @see SGF-112
+ * @link https://jira.spring.io/browse/SGF-112
*/
- @Test
+ @Test(expected = IllegalStateException.class)
@SuppressWarnings("unchecked")
public void rejectsInterfacesExtendingPagingAndSortingRepository() {
@@ -67,12 +74,23 @@ public class GemfireRepositoryFactoryUnitTests {
try {
factory.getRepository(SampleInterface.class);
- } catch (IllegalStateException e) {
- assertThat(e.getMessage(), Matchers.startsWith("Pagination is not supported by Gemfire repositories!"));
+ //factory.getRepository(SamplePagingInterface.class);
+ //factory.getRepository(SampleSortingInterface.class);
+ } catch (IllegalStateException expected) {
+ assertThat(expected.getMessage(), Matchers.startsWith("Pagination is not supported by Gemfire repositories!"));
+ throw expected;
}
}
interface SampleInterface extends PagingAndSortingRepository {
-
}
+
+ interface SamplePagingInterface extends Repository {
+ Page findAll(Pageable pageable);
+ }
+
+ interface SampleSortingInterface extends Repository {
+ Iterable findAll(Sort sort);
+ }
+
}
diff --git a/src/test/java/org/springframework/data/gemfire/support/ClientRegionShortcutWrapperTest.java b/src/test/java/org/springframework/data/gemfire/support/ClientRegionShortcutWrapperTest.java
index 17b4a828..ad99cef2 100644
--- a/src/test/java/org/springframework/data/gemfire/support/ClientRegionShortcutWrapperTest.java
+++ b/src/test/java/org/springframework/data/gemfire/support/ClientRegionShortcutWrapperTest.java
@@ -28,7 +28,7 @@ import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
/**
* The ClientRegionShortcutWrapperTest class is a test suite of test cases testing the contract and functionality of the
* ClientRegionShortcutWrapper enum class type.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.springframework.data.gemfire.support.ClientRegionShortcutWrapper
diff --git a/src/test/java/org/springframework/data/gemfire/support/GemfireCacheTest.java b/src/test/java/org/springframework/data/gemfire/support/GemfireCacheTest.java
index 01694b3c..5c16999d 100644
--- a/src/test/java/org/springframework/data/gemfire/support/GemfireCacheTest.java
+++ b/src/test/java/org/springframework/data/gemfire/support/GemfireCacheTest.java
@@ -20,7 +20,6 @@ import java.util.Properties;
import org.springframework.cache.Cache;
-import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.distributed.DistributedSystem;
@@ -36,6 +35,7 @@ public class GemfireCacheTest extends AbstractNativeCacheTest createNativeCache() throws Exception {
com.gemstone.gemfire.cache.Cache instance = null;
try {
@@ -49,9 +49,10 @@ public class GemfireCacheTest extends AbstractNativeCacheTest keys = Arrays.asList(new String[]{"key1","key2"});
+ List keys = Arrays.asList("key1", "key2");
Map results = region.getAll(keys);
assertEquals("{\"hello1\":\"world1\"}",results.get("key1"));
assertEquals("{\"hello2\":\"world2\"}",results.get("key2"));
}
@Test
- public void testObjectToJSon() throws JsonGenerationException, JsonMappingException, IOException {
+ public void testObjectToJSon() throws IOException {
Person dave = new Person(1L,"Dave","Turanski");
region.put("dave",dave);
String json = (String)region.get("dave");
diff --git a/src/test/java/org/springframework/data/gemfire/support/RegionShortcutWrapperTest.java b/src/test/java/org/springframework/data/gemfire/support/RegionShortcutWrapperTest.java
index dd63db8f..425112ae 100644
--- a/src/test/java/org/springframework/data/gemfire/support/RegionShortcutWrapperTest.java
+++ b/src/test/java/org/springframework/data/gemfire/support/RegionShortcutWrapperTest.java
@@ -28,7 +28,7 @@ import com.gemstone.gemfire.cache.RegionShortcut;
/**
* The RegionShortcutWrapperTest class is a test suite of test cases testing the contract and functionality of the
* RegionShortcutWrapper enum class type.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.springframework.data.gemfire.support.RegionShortcutWrapper
diff --git a/src/test/java/org/springframework/data/gemfire/support/SpringContextBootstrappingInitializerIntegrationTest.java b/src/test/java/org/springframework/data/gemfire/support/SpringContextBootstrappingInitializerIntegrationTest.java
index a76cf30e..478cfd26 100644
--- a/src/test/java/org/springframework/data/gemfire/support/SpringContextBootstrappingInitializerIntegrationTest.java
+++ b/src/test/java/org/springframework/data/gemfire/support/SpringContextBootstrappingInitializerIntegrationTest.java
@@ -54,7 +54,7 @@ import com.gemstone.gemfire.cache.Region;
/**
* The SpringContextBootstrappingInitializerTest class is a test suite of test cases testing the integrated
* functionality of the SpringContextBootstrappingInitializer class.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.springframework.context.ConfigurableApplicationContext
@@ -64,8 +64,7 @@ import com.gemstone.gemfire.cache.Region;
* @see com.gemstone.gemfire.cache.CacheFactory
* @see com.gemstone.gemfire.cache.CacheLoader
* @see com.gemstone.gemfire.cache.Region
- * @since 1.3.4 (Spring Data GemFire)
- * @since 7.0.1 (GemFire)
+ * @since 1.4.0
*/
@SuppressWarnings("unused")
public class SpringContextBootstrappingInitializerIntegrationTest {
diff --git a/src/test/java/org/springframework/data/gemfire/support/SpringContextBootstrappingInitializerTest.java b/src/test/java/org/springframework/data/gemfire/support/SpringContextBootstrappingInitializerTest.java
index 77bb843d..88983d53 100644
--- a/src/test/java/org/springframework/data/gemfire/support/SpringContextBootstrappingInitializerTest.java
+++ b/src/test/java/org/springframework/data/gemfire/support/SpringContextBootstrappingInitializerTest.java
@@ -43,14 +43,14 @@ import org.springframework.util.ObjectUtils;
* and functionality of the SpringContextBootstrappingInitializer class. This test class focuses on testing isolated
* units of functionality in the Initializer class directly, mocking any dependencies as appropriate, in order for the
* class to uphold it's contract.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.mockito.Mockito
* @see org.springframework.context.ConfigurableApplicationContext
* @see org.springframework.data.gemfire.support.SpringContextBootstrappingInitializer
* @see org.springframework.data.gemfire.support.SpringContextBootstrappingInitializerIntegrationTest
- * @since 1.3.4
+ * @since 1.4.0
*/
@SuppressWarnings("unused")
public class SpringContextBootstrappingInitializerTest {
diff --git a/src/test/java/org/springframework/data/gemfire/support/sample/TestUserDao.java b/src/test/java/org/springframework/data/gemfire/support/sample/TestUserDao.java
index febdfc51..49205704 100644
--- a/src/test/java/org/springframework/data/gemfire/support/sample/TestUserDao.java
+++ b/src/test/java/org/springframework/data/gemfire/support/sample/TestUserDao.java
@@ -25,12 +25,12 @@ import org.springframework.util.Assert;
/**
* The TestUserDao class is an implementation of the UserDao Data Access Object (DAO) interface for performing
* data access and persistence operations on Users.
- *
+ *
* @author John Blum
* @see org.springframework.data.gemfire.repository.sample.User
* @see org.springframework.data.gemfire.support.sample.UserDao
* @see org.springframework.stereotype.Repository
- * @since 1.3.4
+ * @since 1.4.0
*/
@Repository("userDao")
@SuppressWarnings("unused")
diff --git a/src/test/java/org/springframework/data/gemfire/support/sample/TestUserService.java b/src/test/java/org/springframework/data/gemfire/support/sample/TestUserService.java
index 899e39f1..acc85d37 100644
--- a/src/test/java/org/springframework/data/gemfire/support/sample/TestUserService.java
+++ b/src/test/java/org/springframework/data/gemfire/support/sample/TestUserService.java
@@ -23,12 +23,12 @@ import org.springframework.util.Assert;
/**
* The TestUserService class is an implementation of the UserService service interface for performing service operations
* on Users.
- *
+ *
* @author John Blum
* @see org.springframework.data.gemfire.repository.sample.User
* @see org.springframework.data.gemfire.support.sample.UserService
* @see org.springframework.stereotype.Service
- * @since 1.3.4
+ * @since 1.4.0
*/
@Service("userService")
@SuppressWarnings("unused")
diff --git a/src/test/java/org/springframework/data/gemfire/support/sample/UserApplicationConfiguration.java b/src/test/java/org/springframework/data/gemfire/support/sample/UserApplicationConfiguration.java
index ccb7945f..6386b75a 100644
--- a/src/test/java/org/springframework/data/gemfire/support/sample/UserApplicationConfiguration.java
+++ b/src/test/java/org/springframework/data/gemfire/support/sample/UserApplicationConfiguration.java
@@ -24,13 +24,13 @@ import org.springframework.context.annotation.ImportResource;
import org.springframework.data.gemfire.support.SpringContextBootstrappingInitializerIntegrationTest;
/**
- * The UserApplicationConfiguration class is a configuration component for confguring the user's application.
- *
+ * The UserApplicationConfiguration class is a configuration component for configuring the user's application.
+ *
* @author John Blum
* @see org.springframework.context.annotation.Bean
* @see org.springframework.context.annotation.Configuration
* @see org.springframework.context.annotation.ImportResource
- * @since 1.3.4
+ * @since 1.4.0
*/
@Configuration
@ImportResource({ "classpath:org/springframework/data/gemfire/support/sample/initializer-gemfire-context.xml" })
diff --git a/src/test/java/org/springframework/data/gemfire/support/sample/UserDao.java b/src/test/java/org/springframework/data/gemfire/support/sample/UserDao.java
index 8664b58f..8654bac8 100644
--- a/src/test/java/org/springframework/data/gemfire/support/sample/UserDao.java
+++ b/src/test/java/org/springframework/data/gemfire/support/sample/UserDao.java
@@ -18,10 +18,10 @@ package org.springframework.data.gemfire.support.sample;
/**
* The UserDao interface is a contract for implementing objects containing data access functionality for Users.
- *
+ *
* @author John Blum
* @see org.springframework.data.gemfire.repository.sample.User
- * @since 1.3.4
+ * @since 1.4.0
*/
public interface UserDao {
}
diff --git a/src/test/java/org/springframework/data/gemfire/support/sample/UserService.java b/src/test/java/org/springframework/data/gemfire/support/sample/UserService.java
index 0a08dcbf..fd578ca0 100644
--- a/src/test/java/org/springframework/data/gemfire/support/sample/UserService.java
+++ b/src/test/java/org/springframework/data/gemfire/support/sample/UserService.java
@@ -18,10 +18,10 @@ package org.springframework.data.gemfire.support.sample;
/**
* The UserService interface is a contract for implementing objects to service Users.
- *
+ *
* @author John Blum
* @see org.springframework.data.gemfire.repository.sample.User
- * @since 1.3.4
+ * @since 1.4.0
*/
public interface UserService {
}
diff --git a/src/test/java/org/springframework/data/gemfire/test/MockRegionFactory.java b/src/test/java/org/springframework/data/gemfire/test/MockRegionFactory.java
index 268f45e6..8e14e12c 100644
--- a/src/test/java/org/springframework/data/gemfire/test/MockRegionFactory.java
+++ b/src/test/java/org/springframework/data/gemfire/test/MockRegionFactory.java
@@ -24,13 +24,11 @@ import java.io.File;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
-import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.CacheListener;
import com.gemstone.gemfire.cache.CacheLoader;
import com.gemstone.gemfire.cache.CacheWriter;
import com.gemstone.gemfire.cache.CustomExpiry;
import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskWriteAttributes;
import com.gemstone.gemfire.cache.EvictionAttributes;
import com.gemstone.gemfire.cache.ExpirationAttributes;
import com.gemstone.gemfire.cache.MembershipAttributes;
@@ -53,7 +51,7 @@ public class MockRegionFactory {
private static QueryService queryService = mock(QueryService.class);
private static RegionService regionService = mock(RegionService.class);
- private AttributesFactory attributesFactory;
+ private com.gemstone.gemfire.cache.AttributesFactory attributesFactory;
private final StubCache cache;
@@ -65,10 +63,10 @@ public class MockRegionFactory {
return createMockRegionFactory(null);
}
- @SuppressWarnings({ "unchecked", "rawtypes" })
+ @SuppressWarnings({ "deprecation", "rawtypes", "unchecked" })
public RegionFactory createMockRegionFactory(RegionAttributes attributes) {
- attributesFactory = (attributes != null ? new AttributesFactory(attributes)
- : new AttributesFactory());
+ attributesFactory = (attributes != null ? new com.gemstone.gemfire.cache.AttributesFactory(attributes)
+ : new com.gemstone.gemfire.cache.AttributesFactory());
//Workaround for GemFire bug
if (attributes !=null) {
@@ -340,10 +338,12 @@ public class MockRegionFactory {
}
});
- when(regionFactory.setDiskWriteAttributes(any(DiskWriteAttributes.class))).thenAnswer(new Answer(){
+ when(regionFactory.setDiskWriteAttributes(any(com.gemstone.gemfire.cache.DiskWriteAttributes.class)))
+ .thenAnswer(new Answer(){
@Override
public RegionFactory answer(InvocationOnMock invocation) throws Throwable {
- DiskWriteAttributes val = (DiskWriteAttributes)invocation.getArguments()[0];
+ com.gemstone.gemfire.cache.DiskWriteAttributes val =
+ (com.gemstone.gemfire.cache.DiskWriteAttributes) invocation.getArguments()[0];
attributesFactory.setDiskWriteAttributes(val);
return regionFactory;
}
@@ -505,8 +505,7 @@ public class MockRegionFactory {
when(region.getAttributes()).thenAnswer(new Answer() {
@Override
public RegionAttributes answer(InvocationOnMock invocation) throws Throwable {
- RegionAttributes attributes = attributesFactory.create();
- return attributes;
+ return attributesFactory.create();
}
});
@@ -523,9 +522,7 @@ public class MockRegionFactory {
String subRegionPath = (parentRegionName.startsWith("/") ? parentRegionName+"/"+subRegionName
: "/"+parentRegionName+"/"+subRegionName);
- Region region = cache.getRegion(subRegionPath);
-
- return region;
+ return cache.getRegion(subRegionPath);
}
});
diff --git a/src/test/java/org/springframework/data/gemfire/test/StubCache.java b/src/test/java/org/springframework/data/gemfire/test/StubCache.java
index caab17ed..a5570565 100644
--- a/src/test/java/org/springframework/data/gemfire/test/StubCache.java
+++ b/src/test/java/org/springframework/data/gemfire/test/StubCache.java
@@ -1,6 +1,10 @@
package org.springframework.data.gemfire.test;
-import static org.mockito.Mockito.*;
-
+
+import static org.mockito.Mockito.anyInt;
+import static org.mockito.Mockito.anyString;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
@@ -10,7 +14,6 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;
-
import javax.naming.Context;
import org.mockito.invocation.InvocationOnMock;
@@ -38,12 +41,10 @@ import com.gemstone.gemfire.cache.query.Index;
import com.gemstone.gemfire.cache.query.IndexExistsException;
import com.gemstone.gemfire.cache.query.IndexInvalidException;
import com.gemstone.gemfire.cache.query.IndexNameConflictException;
-import com.gemstone.gemfire.cache.query.IndexType;
import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.cache.query.RegionNotFoundException;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.snapshot.CacheSnapshotService;
-import com.gemstone.gemfire.cache.util.BridgeServer;
import com.gemstone.gemfire.cache.util.Gateway;
import com.gemstone.gemfire.cache.util.GatewayConflictResolver;
import com.gemstone.gemfire.cache.util.GatewayHub;
@@ -58,6 +59,8 @@ import com.gemstone.gemfire.i18n.LogWriterI18n;
import com.gemstone.gemfire.pdx.PdxInstance;
import com.gemstone.gemfire.pdx.PdxInstanceFactory;
import com.gemstone.gemfire.pdx.PdxSerializer;
+
+@SuppressWarnings("deprecation")
public class StubCache implements Cache {
private Properties properties;
@@ -390,7 +393,7 @@ public class StubCache implements Cache {
*/
@Override
@Deprecated
- public BridgeServer addBridgeServer() {
+ public com.gemstone.gemfire.cache.util.BridgeServer addBridgeServer() {
throw new UnsupportedOperationException();
}
@@ -462,8 +465,7 @@ public class StubCache implements Cache {
@SuppressWarnings("unchecked")
@Override
public RegionFactory createRegionFactory() {
- RegionFactory regionFactory = new MockRegionFactory(this).createRegionFactory();
- return regionFactory;
+ return new MockRegionFactory(this).createRegionFactory();
}
/* (non-Javadoc)
@@ -472,8 +474,7 @@ public class StubCache implements Cache {
@SuppressWarnings("unchecked")
@Override
public RegionFactory createRegionFactory(RegionShortcut shortCut) {
- RegionFactory regionFactory = new MockRegionFactory(this).createRegionFactory();
- return regionFactory;
+ return new MockRegionFactory(this).createRegionFactory();
}
/* (non-Javadoc)
@@ -482,8 +483,7 @@ public class StubCache implements Cache {
@SuppressWarnings("unchecked")
@Override
public RegionFactory createRegionFactory(String arg0) {
- RegionFactory regionFactory = new MockRegionFactory(this).createRegionFactory();
- return regionFactory;
+ return new MockRegionFactory(this).createRegionFactory();
}
/* (non-Javadoc)
@@ -491,8 +491,7 @@ public class StubCache implements Cache {
*/
@Override
public RegionFactory createRegionFactory(RegionAttributes regionAttributes) {
- RegionFactory regionFactory = new MockRegionFactory(this).createMockRegionFactory(regionAttributes);
- return regionFactory;
+ return new MockRegionFactory(this).createMockRegionFactory(regionAttributes);
}
/* (non-Javadoc)
@@ -754,9 +753,6 @@ public class StubCache implements Cache {
this.searchTimeout = arg0;
}
- /**
- * @return
- */
DistributedSystem mockDistributedSystem() {
DistributedSystem ds = mock(DistributedSystem.class);
DistributedMember dm = mockDistributedMember();
@@ -777,10 +773,7 @@ public class StubCache implements Cache {
return dm;
}
- /**
- * @return
- */
- CacheServer mockCacheServer() {
+ CacheServer mockCacheServer() {
return new StubCacheServer();
}
@@ -814,7 +807,7 @@ public class StubCache implements Cache {
String indexName = (String)invocation.getArguments()[0];
String indexedExpression = (String)invocation.getArguments()[1];
String fromClause = (String)invocation.getArguments()[2];
- return mockIndex(indexName, IndexType.FUNCTIONAL, indexedExpression, fromClause, null);
+ return mockIndex(indexName, com.gemstone.gemfire.cache.query.IndexType.FUNCTIONAL, indexedExpression, fromClause, null);
}
});
when(qs.createIndex(anyString(), anyString(),anyString(),anyString())).thenAnswer(new Answer(){
@@ -824,7 +817,7 @@ public class StubCache implements Cache {
String indexedExpression = (String)invocation.getArguments()[1];
String fromClause = (String)invocation.getArguments()[2];
String imports = (String)invocation.getArguments()[3];
- return mockIndex(indexName, IndexType.FUNCTIONAL, indexedExpression, fromClause, imports);
+ return mockIndex(indexName, com.gemstone.gemfire.cache.query.IndexType.FUNCTIONAL, indexedExpression, fromClause, imports);
}
});
@@ -835,7 +828,7 @@ public class StubCache implements Cache {
String indexedExpression = (String)invocation.getArguments()[1];
String fromClause = (String)invocation.getArguments()[2];
- return mockIndex(indexName, IndexType.PRIMARY_KEY, indexedExpression, fromClause, null);
+ return mockIndex(indexName, com.gemstone.gemfire.cache.query.IndexType.PRIMARY_KEY, indexedExpression, fromClause, null);
}
});
@@ -846,7 +839,7 @@ public class StubCache implements Cache {
String indexedExpression = (String)invocation.getArguments()[1];
String fromClause = (String)invocation.getArguments()[2];
- return mockIndex(indexName, IndexType.HASH, indexedExpression, fromClause, null);
+ return mockIndex(indexName, com.gemstone.gemfire.cache.query.IndexType.HASH, indexedExpression, fromClause, null);
}
});
@@ -858,15 +851,16 @@ public class StubCache implements Cache {
String fromClause = (String)invocation.getArguments()[2];
String imports = (String)invocation.getArguments()[3];
- return mockIndex(indexName, IndexType.HASH, indexedExpression, fromClause, imports);
+ return mockIndex(indexName, com.gemstone.gemfire.cache.query.IndexType.HASH, indexedExpression, fromClause, imports);
}
});
return qs;
}
- @SuppressWarnings({ "rawtypes", "unchecked" })
- Index mockIndex(String indexName, IndexType indexType,String indexedExpression, String fromClause, String imports){
+ @SuppressWarnings({ "rawtypes", "unchecked", "unused" })
+ Index mockIndex(String indexName, com.gemstone.gemfire.cache.query.IndexType indexType, String indexedExpression,
+ String fromClause, String imports){
Index idx = mock(Index.class);
when(idx.getFromClause()).thenReturn(fromClause);
when(idx.getIndexedExpression()).thenReturn(indexedExpression);
@@ -888,18 +882,8 @@ public class StubCache implements Cache {
return this.allRegions;
}
- GatewaySender mockGatewaySender(String id, int remoteId) {
- GatewaySender gwSender = mock(GatewaySender.class);
- when(gwSender.getId()).thenReturn(id);
- when(gwSender.getRemoteDSId()).thenReturn(remoteId);
- return gwSender;
- }
-
- /**
- * @param props
- */
public void setProperties(Properties props) {
this.properties = props;
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/springframework/data/gemfire/test/StubCacheServer.java b/src/test/java/org/springframework/data/gemfire/test/StubCacheServer.java
index 2d4039bc..14688f4e 100644
--- a/src/test/java/org/springframework/data/gemfire/test/StubCacheServer.java
+++ b/src/test/java/org/springframework/data/gemfire/test/StubCacheServer.java
@@ -26,6 +26,7 @@ import com.gemstone.gemfire.distributed.DistributedMember;
* @author David Turanski
* @author John Blum
*/
+@SuppressWarnings("deprecation")
public class StubCacheServer implements CacheServer {
private boolean isRunning;
diff --git a/src/test/java/org/springframework/data/gemfire/test/StubGatewaySenderFactory.java b/src/test/java/org/springframework/data/gemfire/test/StubGatewaySenderFactory.java
index 9d542c55..060ead1a 100644
--- a/src/test/java/org/springframework/data/gemfire/test/StubGatewaySenderFactory.java
+++ b/src/test/java/org/springframework/data/gemfire/test/StubGatewaySenderFactory.java
@@ -12,7 +12,6 @@
*/
package org.springframework.data.gemfire.test;
-import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@@ -20,19 +19,20 @@ import static org.mockito.Mockito.when;
import java.util.ArrayList;
import java.util.List;
-import com.gemstone.gemfire.cache.Region;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
import com.gemstone.gemfire.cache.util.Gateway.OrderPolicy;
import com.gemstone.gemfire.cache.wan.GatewayEventFilter;
import com.gemstone.gemfire.cache.wan.GatewaySender;
import com.gemstone.gemfire.cache.wan.GatewaySenderFactory;
import com.gemstone.gemfire.cache.wan.GatewayTransportFilter;
-import com.sun.org.apache.xpath.internal.operations.Bool;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
/**
- * @author David Turanski
+ * The StubGatewaySenderFactory class for testing purposes.
*
+ * @author David Turanski
+ * @see com.gemstone.gemfire.cache.wan.GatewaySenderFactory
*/
public class StubGatewaySenderFactory implements GatewaySenderFactory {
@@ -210,4 +210,5 @@ public class StubGatewaySenderFactory implements GatewaySenderFactory {
// TODO Auto-generated method stub
return null;
}
+
}
diff --git a/src/test/java/org/springframework/data/gemfire/test/support/DataSourceAdapter.java b/src/test/java/org/springframework/data/gemfire/test/support/DataSourceAdapter.java
index 132302cb..a126ec39 100644
--- a/src/test/java/org/springframework/data/gemfire/test/support/DataSourceAdapter.java
+++ b/src/test/java/org/springframework/data/gemfire/test/support/DataSourceAdapter.java
@@ -19,12 +19,15 @@ package org.springframework.data.gemfire.test.support;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
+import java.util.logging.Logger;
import javax.sql.DataSource;
/**
* The DataSourceAdapter class is an implementation of the DataSource interface with unsupported operations by default.
- *
+ *
* @author John Blum
+ * @see java.sql.Connection
* @see javax.sql.DataSource
* @since 1.3.4
*/
@@ -63,6 +66,11 @@ public abstract class DataSourceAdapter implements DataSource {
throw new UnsupportedOperationException(UNSUPPORTED_OPERATION_EXCEPTION_MESSAGE);
}
+ //@Override
+ public Logger getParentLogger() throws SQLFeatureNotSupportedException {
+ throw new UnsupportedOperationException(UNSUPPORTED_OPERATION_EXCEPTION_MESSAGE);
+ }
+
@Override
public boolean isWrapperFor(final Class> iface) throws SQLException {
throw new UnsupportedOperationException(UNSUPPORTED_OPERATION_EXCEPTION_MESSAGE);
diff --git a/src/test/java/org/springframework/data/gemfire/wan/AsyncEventQueueFactoryBeanTest.java b/src/test/java/org/springframework/data/gemfire/wan/AsyncEventQueueFactoryBeanTest.java
index c271616d..31ca7247 100644
--- a/src/test/java/org/springframework/data/gemfire/wan/AsyncEventQueueFactoryBeanTest.java
+++ b/src/test/java/org/springframework/data/gemfire/wan/AsyncEventQueueFactoryBeanTest.java
@@ -39,7 +39,7 @@ import com.gemstone.gemfire.cache.util.Gateway;
/**
* The AsyncEventQueueFactoryBeanTest class is a test suite of test cases testing the contract and functionality
* of the AsyncEventQueueFactoryBean class.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.mockito.Mockito
diff --git a/src/test/java/org/springframework/data/gemfire/wan/AsyncEventQueueWithListenerIntegrationTest.java b/src/test/java/org/springframework/data/gemfire/wan/AsyncEventQueueWithListenerIntegrationTest.java
index bb207f71..2772a7dd 100644
--- a/src/test/java/org/springframework/data/gemfire/wan/AsyncEventQueueWithListenerIntegrationTest.java
+++ b/src/test/java/org/springframework/data/gemfire/wan/AsyncEventQueueWithListenerIntegrationTest.java
@@ -41,7 +41,7 @@ import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
* The AsyncEvenntQueueWithListenerTest class is a test suite of test cases testing the circular references between
* an Async Event Queue and a registered AsyncEventListener that refers back to the Async Event Queue on which the
* listener registered.
- *
+ *
* @author John Blum
* @see org.junit.Test
* @see org.junit.runner.RunWith
@@ -103,7 +103,7 @@ public class AsyncEventQueueWithListenerIntegrationTest {
/**
* The QueueAsyncEventListener class is an implementation of the AsyncEventListener interface that contains
* a reference to the AsyncEventQueue upon which it is registered.
- *
+ *
* @see com.gemstone.gemfire.cache.asyncqueue.AsyncEvent
* @see com.gemstone.gemfire.cache.asyncqueue.AsyncEventListener
* @see com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue
diff --git a/src/test/java/org/springframework/data/gemfire/wan/GatewaySenderFactoryBeanTest.java b/src/test/java/org/springframework/data/gemfire/wan/GatewaySenderFactoryBeanTest.java
index d0c1cb29..779f9618 100644
--- a/src/test/java/org/springframework/data/gemfire/wan/GatewaySenderFactoryBeanTest.java
+++ b/src/test/java/org/springframework/data/gemfire/wan/GatewaySenderFactoryBeanTest.java
@@ -35,7 +35,7 @@ import com.gemstone.gemfire.cache.wan.GatewaySenderFactory;
/**
* The GatewaySenderFactoryBeanTest class is a test suite of test cases testing the contract and functionality of the
* GatewaySenderFactoryBean class.
- *
+ *
* @author John Blum
* @see com.gemstone.gemfire.cache.Cache
* @see com.gemstone.gemfire.cache.wan.GatewaySender