Upgrade spring-build-conventions to 0.0.18.RELEASE
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'io.spring.gradle:spring-build-conventions:0.0.17.RELEASE'
|
classpath 'io.spring.gradle:spring-build-conventions:0.0.18.RELEASE'
|
||||||
classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
|
classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<module name="Checker">
|
<module name="Checker">
|
||||||
<!-- Supressions -->
|
<!-- Supressions -->
|
||||||
<module name="SuppressionFilter">
|
<module name="SuppressionFilter">
|
||||||
<property name="file" value="${configDir}/suppressions.xml"/>
|
<property name="file" value="${config_loc}/suppressions.xml"/>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
<!-- Root Checks -->
|
<!-- Root Checks -->
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
^\Q/*\E$
|
|
||||||
^\Q * Copyright 2014-\E20\d\d\Q the original author or authors.\E$
|
|
||||||
^\Q *\E$
|
|
||||||
^\Q * Licensed under the Apache License, Version 2.0 (the "License");\E$
|
|
||||||
^\Q * you may not use this file except in compliance with the License.\E$
|
|
||||||
^\Q * You may obtain a copy of the License at\E$
|
|
||||||
^\Q *\E$
|
|
||||||
^\Q * http://www.apache.org/licenses/LICENSE-2.0\E$
|
|
||||||
^\Q *\E$
|
|
||||||
^\Q * Unless required by applicable law or agreed to in writing, software\E$
|
|
||||||
^\Q * distributed under the License is distributed on an "AS IS" BASIS,\E$
|
|
||||||
^\Q * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\E$
|
|
||||||
^\Q * See the License for the specific language governing permissions and\E$
|
|
||||||
^\Q * limitations under the License.\E$
|
|
||||||
^\Q */\E$
|
|
||||||
^.*$
|
|
||||||
@@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
<!-- docs -->
|
<!-- docs -->
|
||||||
<suppress files="[\\/]docs[\\/]" checks="Javadoc*"/>
|
<suppress files="[\\/]docs[\\/]" checks="Javadoc*"/>
|
||||||
<suppress files="[\\/]docs[\\/]" checks="AvoidStaticImport"/>
|
|
||||||
<suppress files="[\\/]docs[\\/]" checks="InnerTypeLast"/>
|
<suppress files="[\\/]docs[\\/]" checks="InnerTypeLast"/>
|
||||||
|
|
||||||
<!-- samples -->
|
<!-- samples -->
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ public interface Session {
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
default <T> T getAttributeOrDefault(String name, T defaultValue) {
|
default <T> T getAttributeOrDefault(String name, T defaultValue) {
|
||||||
T result = getAttribute(name);
|
T result = getAttribute(name);
|
||||||
return (result != null ? result : defaultValue);
|
return (result != null) ? result : defaultValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -110,8 +110,9 @@ public class SpringHttpSessionConfiguration implements ApplicationContextAware {
|
|||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
public void init() {
|
public void init() {
|
||||||
CookieSerializer cookieSerializer = (this.cookieSerializer != null
|
CookieSerializer cookieSerializer = (this.cookieSerializer != null)
|
||||||
? this.cookieSerializer : createDefaultCookieSerializer());
|
? this.cookieSerializer
|
||||||
|
: createDefaultCookieSerializer();
|
||||||
this.defaultHttpSessionIdResolver.setCookieSerializer(cookieSerializer);
|
this.defaultHttpSessionIdResolver.setCookieSerializer(cookieSerializer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -135,9 +135,9 @@ public class DefaultCookieSerializer implements CookieSerializer {
|
|||||||
int maxAge = getMaxAge(cookieValue);
|
int maxAge = getMaxAge(cookieValue);
|
||||||
if (maxAge > -1) {
|
if (maxAge > -1) {
|
||||||
sb.append("; Max-Age=").append(cookieValue.getCookieMaxAge());
|
sb.append("; Max-Age=").append(cookieValue.getCookieMaxAge());
|
||||||
OffsetDateTime expires = (maxAge != 0
|
OffsetDateTime expires = (maxAge != 0)
|
||||||
? OffsetDateTime.now().plusSeconds(maxAge)
|
? OffsetDateTime.now().plusSeconds(maxAge)
|
||||||
: Instant.EPOCH.atOffset(ZoneOffset.UTC));
|
: Instant.EPOCH.atOffset(ZoneOffset.UTC);
|
||||||
sb.append("; Expires=")
|
sb.append("; Expires=")
|
||||||
.append(expires.format(DateTimeFormatter.RFC_1123_DATE_TIME));
|
.append(expires.format(DateTimeFormatter.RFC_1123_DATE_TIME));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,8 +98,8 @@ public class HeaderHttpSessionIdResolver implements HttpSessionIdResolver {
|
|||||||
@Override
|
@Override
|
||||||
public List<String> resolveSessionIds(HttpServletRequest request) {
|
public List<String> resolveSessionIds(HttpServletRequest request) {
|
||||||
String headerValue = request.getHeader(this.headerName);
|
String headerValue = request.getHeader(this.headerName);
|
||||||
return (headerValue != null ? Collections.singletonList(headerValue)
|
return (headerValue != null) ? Collections.singletonList(headerValue)
|
||||||
: Collections.emptyList());
|
: Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -174,11 +174,11 @@ abstract class OnCommittedResponseWrapper extends HttpServletResponseWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void trackContentLength(byte[] content) {
|
private void trackContentLength(byte[] content) {
|
||||||
checkContentLength(content != null ? content.length : 0);
|
checkContentLength((content != null) ? content.length : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void trackContentLength(char[] content) {
|
private void trackContentLength(char[] content) {
|
||||||
checkContentLength(content != null ? content.length : 0);
|
checkContentLength((content != null) ? content.length : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void trackContentLength(int content) {
|
private void trackContentLength(int content) {
|
||||||
@@ -257,13 +257,13 @@ abstract class OnCommittedResponseWrapper extends HttpServletResponseWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public boolean equals(Object obj) {
|
||||||
return this.delegate.hashCode();
|
return this.delegate.equals(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public int hashCode() {
|
||||||
return this.delegate.equals(obj);
|
return this.delegate.hashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -502,13 +502,13 @@ abstract class OnCommittedResponseWrapper extends HttpServletResponseWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public boolean equals(Object obj) {
|
||||||
return this.delegate.hashCode();
|
return this.delegate.equals(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public int hashCode() {
|
||||||
return this.delegate.equals(obj);
|
return this.delegate.hashCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -352,7 +352,7 @@ public class SessionRepositoryFilter<S extends Session> extends OncePerRequestFi
|
|||||||
@Override
|
@Override
|
||||||
public String getRequestedSessionId() {
|
public String getRequestedSessionId() {
|
||||||
S requestedSession = getRequestedSession();
|
S requestedSession = getRequestedSession();
|
||||||
return (requestedSession != null ? requestedSession.getId() : null);
|
return (requestedSession != null) ? requestedSession.getId() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private S getRequestedSession() {
|
private S getRequestedSession() {
|
||||||
|
|||||||
@@ -71,9 +71,9 @@ public final class WebSocketRegistryListener
|
|||||||
SessionDisconnectEvent e = (SessionDisconnectEvent) event;
|
SessionDisconnectEvent e = (SessionDisconnectEvent) event;
|
||||||
Map<String, Object> sessionAttributes = SimpMessageHeaderAccessor
|
Map<String, Object> sessionAttributes = SimpMessageHeaderAccessor
|
||||||
.getSessionAttributes(e.getMessage().getHeaders());
|
.getSessionAttributes(e.getMessage().getHeaders());
|
||||||
String httpSessionId = (sessionAttributes != null
|
String httpSessionId = (sessionAttributes != null)
|
||||||
? SessionRepositoryMessageInterceptor.getSessionId(sessionAttributes)
|
? SessionRepositoryMessageInterceptor.getSessionId(sessionAttributes)
|
||||||
: null);
|
: null;
|
||||||
afterConnectionClosed(httpSessionId, e.getSessionId());
|
afterConnectionClosed(httpSessionId, e.getSessionId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,8 +117,9 @@ public final class SessionRepositoryMessageInterceptor<S extends Session>
|
|||||||
}
|
}
|
||||||
Map<String, Object> sessionHeaders = SimpMessageHeaderAccessor
|
Map<String, Object> sessionHeaders = SimpMessageHeaderAccessor
|
||||||
.getSessionAttributes(message.getHeaders());
|
.getSessionAttributes(message.getHeaders());
|
||||||
String sessionId = (sessionHeaders != null
|
String sessionId = (sessionHeaders != null)
|
||||||
? (String) sessionHeaders.get(SPRING_SESSION_ID_ATTR_NAME) : null);
|
? (String) sessionHeaders.get(SPRING_SESSION_ID_ATTR_NAME)
|
||||||
|
: null;
|
||||||
if (sessionId != null) {
|
if (sessionId != null) {
|
||||||
S session = this.sessionRepository.findById(sessionId);
|
S session = this.sessionRepository.findById(sessionId);
|
||||||
if (session != null) {
|
if (session != null) {
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ public class RedisListenerContainerTaskExecutorITests extends AbstractRedisITest
|
|||||||
synchronized (this.lock) {
|
synchronized (this.lock) {
|
||||||
this.lock.wait(TimeUnit.SECONDS.toMillis(1));
|
this.lock.wait(TimeUnit.SECONDS.toMillis(1));
|
||||||
}
|
}
|
||||||
return (this.taskDispatched != null ? this.taskDispatched : Boolean.FALSE);
|
return (this.taskDispatched != null) ? this.taskDispatched : Boolean.FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -797,9 +797,10 @@ public class RedisOperationsSessionRepository implements
|
|||||||
|
|
||||||
this.delta = new HashMap<>(this.delta.size());
|
this.delta = new HashMap<>(this.delta.size());
|
||||||
|
|
||||||
Long originalExpiration = (this.originalLastAccessTime != null
|
Long originalExpiration = (this.originalLastAccessTime != null)
|
||||||
? this.originalLastAccessTime.plus(getMaxInactiveInterval()).toEpochMilli()
|
? this.originalLastAccessTime.plus(getMaxInactiveInterval())
|
||||||
: null);
|
.toEpochMilli()
|
||||||
|
: null;
|
||||||
RedisOperationsSessionRepository.this.expirationPolicy
|
RedisOperationsSessionRepository.this.expirationPolicy
|
||||||
.onExpirationUpdated(originalExpiration, this);
|
.onExpirationUpdated(originalExpiration, this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -144,9 +144,9 @@ public class RedisWebSessionConfiguration extends SpringWebSessionConfiguration
|
|||||||
|
|
||||||
private ReactiveRedisTemplate<String, Object> createReactiveRedisTemplate() {
|
private ReactiveRedisTemplate<String, Object> createReactiveRedisTemplate() {
|
||||||
RedisSerializer<String> keySerializer = new StringRedisSerializer();
|
RedisSerializer<String> keySerializer = new StringRedisSerializer();
|
||||||
RedisSerializer<Object> defaultSerializer = (this.defaultRedisSerializer != null
|
RedisSerializer<Object> defaultSerializer = (this.defaultRedisSerializer != null)
|
||||||
? this.defaultRedisSerializer
|
? this.defaultRedisSerializer
|
||||||
: new JdkSerializationRedisSerializer(this.classLoader));
|
: new JdkSerializationRedisSerializer(this.classLoader);
|
||||||
RedisSerializationContext<String, Object> serializationContext = RedisSerializationContext
|
RedisSerializationContext<String, Object> serializationContext = RedisSerializationContext
|
||||||
.<String, Object>newSerializationContext(defaultSerializer)
|
.<String, Object>newSerializationContext(defaultSerializer)
|
||||||
.key(keySerializer).hashKey(keySerializer).build();
|
.key(keySerializer).hashKey(keySerializer).build();
|
||||||
|
|||||||
@@ -765,23 +765,23 @@ public class JdbcOperationsSessionRepository implements
|
|||||||
}
|
}
|
||||||
if (attributeExists) {
|
if (attributeExists) {
|
||||||
if (attributeRemoved) {
|
if (attributeRemoved) {
|
||||||
this.delta.merge(attributeName, DeltaValue.REMOVED,
|
this.delta.merge(attributeName, DeltaValue.REMOVED, (oldDeltaValue,
|
||||||
(oldDeltaValue, deltaValue) -> (oldDeltaValue == DeltaValue.ADDED
|
deltaValue) -> (oldDeltaValue == DeltaValue.ADDED) ? null
|
||||||
? null
|
: deltaValue);
|
||||||
: deltaValue));
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.delta.merge(attributeName, DeltaValue.UPDATED,
|
this.delta.merge(attributeName, DeltaValue.UPDATED,
|
||||||
(oldDeltaValue, deltaValue) -> (oldDeltaValue == DeltaValue.ADDED
|
(oldDeltaValue,
|
||||||
|
deltaValue) -> (oldDeltaValue == DeltaValue.ADDED)
|
||||||
? oldDeltaValue
|
? oldDeltaValue
|
||||||
: deltaValue));
|
: deltaValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
this.delta.merge(attributeName, DeltaValue.ADDED,
|
this.delta.merge(attributeName, DeltaValue.ADDED,
|
||||||
(oldDeltaValue, deltaValue) -> (oldDeltaValue == DeltaValue.ADDED
|
(oldDeltaValue, deltaValue) -> (oldDeltaValue == DeltaValue.ADDED)
|
||||||
? oldDeltaValue
|
? oldDeltaValue
|
||||||
: DeltaValue.UPDATED));
|
: DeltaValue.UPDATED);
|
||||||
}
|
}
|
||||||
this.delegate.setAttribute(attributeName, attributeValue);
|
this.delegate.setAttribute(attributeName, attributeValue);
|
||||||
if (PRINCIPAL_NAME_INDEX_NAME.equals(attributeName) ||
|
if (PRINCIPAL_NAME_INDEX_NAME.equals(attributeName) ||
|
||||||
|
|||||||
Reference in New Issue
Block a user