Apply appropriate SuppressWarnings annotations for rawtypes usage.
Format source code. Optimize imports.
This commit is contained in:
@@ -48,9 +48,6 @@ import org.apache.geode.cache.client.Pool;
|
|||||||
import org.apache.geode.cache.client.PoolManager;
|
import org.apache.geode.cache.client.PoolManager;
|
||||||
import org.apache.geode.cache.util.CacheListenerAdapter;
|
import org.apache.geode.cache.util.CacheListenerAdapter;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import org.springframework.context.ApplicationEvent;
|
import org.springframework.context.ApplicationEvent;
|
||||||
import org.springframework.context.ApplicationEventPublisher;
|
import org.springframework.context.ApplicationEventPublisher;
|
||||||
import org.springframework.context.ApplicationEventPublisherAware;
|
import org.springframework.context.ApplicationEventPublisherAware;
|
||||||
@@ -77,6 +74,9 @@ import org.springframework.session.events.SessionExpiredEvent;
|
|||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
import org.springframework.util.ObjectUtils;
|
import org.springframework.util.ObjectUtils;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link AbstractGemFireOperationsSessionRepository} is an abstract base class encapsulating functionality
|
* {@link AbstractGemFireOperationsSessionRepository} is an abstract base class encapsulating functionality
|
||||||
* common to all implementations that support {@link SessionRepository} operations backed by Apache Geode.
|
* common to all implementations that support {@link SessionRepository} operations backed by Apache Geode.
|
||||||
@@ -748,7 +748,7 @@ public abstract class AbstractGemFireOperationsSessionRepository
|
|||||||
* @return a new {@link GemFireSession}.
|
* @return a new {@link GemFireSession}.
|
||||||
* @see #isUsingDataSerialization()
|
* @see #isUsingDataSerialization()
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||||
public static <T extends GemFireSessionAttributes> GemFireSession<T> create() {
|
public static <T extends GemFireSessionAttributes> GemFireSession<T> create() {
|
||||||
|
|
||||||
return isUsingDataSerialization()
|
return isUsingDataSerialization()
|
||||||
@@ -764,6 +764,7 @@ public abstract class AbstractGemFireOperationsSessionRepository
|
|||||||
* @see org.springframework.session.Session
|
* @see org.springframework.session.Session
|
||||||
* @see #isUsingDataSerialization()
|
* @see #isUsingDataSerialization()
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
public static GemFireSession copy(@NonNull Session session) {
|
public static GemFireSession copy(@NonNull Session session) {
|
||||||
|
|
||||||
return isUsingDataSerialization()
|
return isUsingDataSerialization()
|
||||||
@@ -780,6 +781,7 @@ public abstract class AbstractGemFireOperationsSessionRepository
|
|||||||
* or return a copy of the given {@link Session} as a {@link GemFireSession}.
|
* or return a copy of the given {@link Session} as a {@link GemFireSession}.
|
||||||
* @see #copy(Session)
|
* @see #copy(Session)
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
public static GemFireSession from(@NonNull Session session) {
|
public static GemFireSession from(@NonNull Session session) {
|
||||||
return session instanceof GemFireSession ? (GemFireSession) session : copy(session);
|
return session instanceof GemFireSession ? (GemFireSession) session : copy(session);
|
||||||
}
|
}
|
||||||
@@ -1349,7 +1351,6 @@ public abstract class AbstractGemFireOperationsSessionRepository
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("all")
|
|
||||||
public Set<Entry<String, Object>> entrySet() {
|
public Set<Entry<String, Object>> entrySet() {
|
||||||
|
|
||||||
synchronized (getLock()) {
|
synchronized (getLock()) {
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ public class GemFireOperationsSessionRepository extends AbstractGemFireOperation
|
|||||||
* @see #configure(Session)
|
* @see #configure(Session)
|
||||||
*/
|
*/
|
||||||
@NonNull
|
@NonNull
|
||||||
@SuppressWarnings("all")
|
|
||||||
public Session createSession() {
|
public Session createSession() {
|
||||||
return configure(GemFireSession.create());
|
return configure(GemFireSession.create());
|
||||||
}
|
}
|
||||||
@@ -161,7 +160,6 @@ public class GemFireOperationsSessionRepository extends AbstractGemFireOperation
|
|||||||
* @see #commit(Session)
|
* @see #commit(Session)
|
||||||
* @see #touch(Session)
|
* @see #touch(Session)
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("all")
|
|
||||||
private Session prepare(Session session) {
|
private Session prepare(Session session) {
|
||||||
return touch(commit(registerInterest(configure(session))));
|
return touch(commit(registerInterest(configure(session))));
|
||||||
}
|
}
|
||||||
@@ -179,7 +177,6 @@ public class GemFireOperationsSessionRepository extends AbstractGemFireOperation
|
|||||||
* @see #isNonNullAndDirty(Session)
|
* @see #isNonNullAndDirty(Session)
|
||||||
* @see #doSave(Session)
|
* @see #doSave(Session)
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("all")
|
|
||||||
public void save(@Nullable Session session) {
|
public void save(@Nullable Session session) {
|
||||||
|
|
||||||
if (isNonNullAndDirty(session)) {
|
if (isNonNullAndDirty(session)) {
|
||||||
@@ -195,6 +192,7 @@ public class GemFireOperationsSessionRepository extends AbstractGemFireOperation
|
|||||||
* @see org.springframework.session.data.gemfire.AbstractGemFireOperationsSessionRepository.GemFireSession#hasDelta()
|
* @see org.springframework.session.data.gemfire.AbstractGemFireOperationsSessionRepository.GemFireSession#hasDelta()
|
||||||
* @see org.springframework.session.Session
|
* @see org.springframework.session.Session
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
private boolean isDirty(@NonNull Session session) {
|
private boolean isDirty(@NonNull Session session) {
|
||||||
return !(session instanceof GemFireSession) || ((GemFireSession) session).hasDelta();
|
return !(session instanceof GemFireSession) || ((GemFireSession) session).hasDelta();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,9 +20,6 @@ import static org.springframework.data.gemfire.util.RuntimeExceptionFactory.newI
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import org.springframework.beans.BeansException;
|
import org.springframework.beans.BeansException;
|
||||||
import org.springframework.beans.factory.BeanClassLoaderAware;
|
import org.springframework.beans.factory.BeanClassLoaderAware;
|
||||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||||
@@ -35,6 +32,9 @@ import org.springframework.util.Assert;
|
|||||||
import org.springframework.util.ObjectUtils;
|
import org.springframework.util.ObjectUtils;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The {@link AbstractGemFireHttpSessionConfiguration} class is an abstract base class containing configuration logic
|
* The {@link AbstractGemFireHttpSessionConfiguration} class is an abstract base class containing configuration logic
|
||||||
* common to Apache Geode and Pivotal GemFire in order to manage {@link javax.servlet.http.HttpSession} state.
|
* common to Apache Geode and Pivotal GemFire in order to manage {@link javax.servlet.http.HttpSession} state.
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ import org.springframework.util.StringUtils;
|
|||||||
* @since 1.1.0
|
* @since 1.1.0
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings({ "rawtypes", "unused" })
|
||||||
public class GemFireHttpSessionConfiguration extends AbstractGemFireHttpSessionConfiguration implements ImportAware {
|
public class GemFireHttpSessionConfiguration extends AbstractGemFireHttpSessionConfiguration implements ImportAware {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.session.data.gemfire.expiration;
|
package org.springframework.session.data.gemfire.expiration;
|
||||||
|
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.springframework.session.data.gemfire.serialization;
|
package org.springframework.session.data.gemfire.serialization;
|
||||||
|
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|||||||
Reference in New Issue
Block a user