diff --git a/spring-context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java b/spring-context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java index 00ea51f008..c6b5c0c42a 100644 --- a/spring-context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java +++ b/spring-context/src/main/java/org/springframework/jmx/access/MBeanClientInterceptor.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -658,6 +658,9 @@ public class MBeanClientInterceptor if (this == other) { return true; } + if (!(other instanceof MethodCacheKey)) { + return false; + } MethodCacheKey otherKey = (MethodCacheKey) other; return (this.name.equals(otherKey.name) && Arrays.equals(this.parameterTypes, otherKey.parameterTypes)); } diff --git a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeComparator.java b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeComparator.java index a94509b020..8e48aa878c 100644 --- a/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeComparator.java +++ b/spring-expression/src/main/java/org/springframework/expression/spel/support/StandardTypeComparator.java @@ -26,8 +26,8 @@ import org.springframework.lang.Nullable; import org.springframework.util.NumberUtils; /** - * A simple basic {@link TypeComparator} implementation. - *

It supports comparison of Numbers and types implementing Comparable. + * A basic {@link TypeComparator} implementation: supports comparison of + * {@link Number} types as well as types implementing {@link Comparable}. * * @author Andy Clement * @author Juergen Hoeller diff --git a/spring-jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.java b/spring-jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.java index d01d671034..36c160948a 100644 --- a/spring-jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.java +++ b/spring-jms/src/main/java/org/springframework/jms/connection/CachingConnectionFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -522,7 +522,8 @@ public class CachingConnectionFactory extends SingleConnectionFactory { public boolean equals(@Nullable Object other) { // Effectively checking object equality as well as toString equality. // On WebSphere MQ, Destination objects do not implement equals... - return (this == other || (other instanceof DestinationCacheKey && destinationEquals((DestinationCacheKey) other))); + return (this == other || (other instanceof DestinationCacheKey && + destinationEquals((DestinationCacheKey) other))); } @Override @@ -577,6 +578,9 @@ public class CachingConnectionFactory extends SingleConnectionFactory { if (this == other) { return true; } + if (!(other instanceof ConsumerCacheKey)) { + return false; + } ConsumerCacheKey otherKey = (ConsumerCacheKey) other; return (destinationEquals(otherKey) && ObjectUtils.nullSafeEquals(this.selector, otherKey.selector) && diff --git a/spring-test/spring-test.gradle b/spring-test/spring-test.gradle index 40e284c2d5..c6147106f4 100644 --- a/spring-test/spring-test.gradle +++ b/spring-test/spring-test.gradle @@ -60,7 +60,7 @@ dependencies { testCompile("javax.ejb:javax.ejb-api:3.2") testCompile("javax.interceptor:javax.interceptor-api:1.2.2") testCompile("javax.mail:javax.mail-api:1.6.2") - testCompile("org.hibernate:hibernate-core:5.4.2.Final") + testCompile("org.hibernate:hibernate-core:5.4.3.Final") testCompile("org.hibernate:hibernate-validator:6.0.16.Final") testCompile("org.junit.platform:junit-platform-runner") testCompile("org.junit.platform:junit-platform-testkit") @@ -72,7 +72,7 @@ dependencies { testCompile("org.apache.tiles:tiles-core:${tiles3Version}", withoutJclOverSlf4J) testCompile("org.apache.tiles:tiles-servlet:${tiles3Version}", withoutJclOverSlf4J) testCompile("org.hsqldb:hsqldb:${hsqldbVersion}") - testCompile("org.apache.httpcomponents:httpclient:4.5.8") { + testCompile("org.apache.httpcomponents:httpclient:4.5.9") { exclude group: "commons-logging", module: "commons-logging" } testCompile("io.projectreactor.netty:reactor-netty") diff --git a/spring-web/spring-web.gradle b/spring-web/spring-web.gradle index 0571c48120..05aae6f825 100644 --- a/spring-web/spring-web.gradle +++ b/spring-web/spring-web.gradle @@ -39,7 +39,7 @@ dependencies { } optional("org.eclipse.jetty:jetty-reactive-httpclient:1.0.3") optional("com.squareup.okhttp3:okhttp:3.14.2") - optional("org.apache.httpcomponents:httpclient:4.5.8") { + optional("org.apache.httpcomponents:httpclient:4.5.9") { exclude group: "commons-logging", module: "commons-logging" } optional("org.apache.httpcomponents:httpasyncclient:4.1.4") { diff --git a/spring-webflux/spring-webflux.gradle b/spring-webflux/spring-webflux.gradle index e252fe3e39..1ff013b71c 100644 --- a/spring-webflux/spring-webflux.gradle +++ b/spring-webflux/spring-webflux.gradle @@ -35,7 +35,7 @@ dependencies { optional("io.undertow:undertow-websockets-jsr:${undertowVersion}") { exclude group: "org.jboss.spec.javax.websocket", module: "jboss-websocket-api_1.1_spec" } - optional("org.apache.httpcomponents:httpclient:4.5.8") { + optional("org.apache.httpcomponents:httpclient:4.5.9") { exclude group: "commons-logging", module: "commons-logging" } optional("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}") diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/support/RouterFunctionMapping.java b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/support/RouterFunctionMapping.java index bc52a4da68..33baed7749 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/support/RouterFunctionMapping.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/function/server/support/RouterFunctionMapping.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,6 +38,7 @@ import org.springframework.web.util.pattern.PathPattern; /** * {@code HandlerMapping} implementation that supports {@link RouterFunction RouterFunctions}. + * *

If no {@link RouterFunction} is provided at * {@linkplain #RouterFunctionMapping(RouterFunction) construction time}, this mapping * will detect all router functions in the application context, and consult them in @@ -56,8 +57,8 @@ public class RouterFunctionMapping extends AbstractHandlerMapping implements Ini /** * Create an empty {@code RouterFunctionMapping}. - *

If this constructor is used, this mapping will detect all {@link RouterFunction} instances - * available in the application context. + *

If this constructor is used, this mapping will detect all + * {@link RouterFunction} instances available in the application context. */ public RouterFunctionMapping() { } @@ -154,20 +155,18 @@ public class RouterFunctionMapping extends AbstractHandlerMapping implements Ini } @SuppressWarnings("unchecked") - private void setAttributes(Map attributes, ServerRequest serverRequest, - HandlerFunction handlerFunction) { + private void setAttributes( + Map attributes, ServerRequest serverRequest, HandlerFunction handlerFunction) { attributes.put(RouterFunctions.REQUEST_ATTRIBUTE, serverRequest); attributes.put(BEST_MATCHING_HANDLER_ATTRIBUTE, handlerFunction); - PathPattern matchingPattern = - (PathPattern) attributes.get(RouterFunctions.MATCHING_PATTERN_ATTRIBUTE); + PathPattern matchingPattern = (PathPattern) attributes.get(RouterFunctions.MATCHING_PATTERN_ATTRIBUTE); if (matchingPattern != null) { attributes.put(BEST_MATCHING_PATTERN_ATTRIBUTE, matchingPattern); } Map uriVariables = - (Map) attributes - .get(RouterFunctions.URI_TEMPLATE_VARIABLES_ATTRIBUTE); + (Map) attributes.get(RouterFunctions.URI_TEMPLATE_VARIABLES_ATTRIBUTE); if (uriVariables != null) { attributes.put(URI_TEMPLATE_VARIABLES_ATTRIBUTE, uriVariables); } diff --git a/spring-webmvc/spring-webmvc.gradle b/spring-webmvc/spring-webmvc.gradle index 071e453efd..db9de5769a 100644 --- a/spring-webmvc/spring-webmvc.gradle +++ b/spring-webmvc/spring-webmvc.gradle @@ -50,7 +50,7 @@ dependencies { testCompile("org.eclipse.jetty:jetty-server") { exclude group: "javax.servlet", module: "javax.servlet" } - testCompile("org.apache.httpcomponents:httpclient:4.5.8") { + testCompile("org.apache.httpcomponents:httpclient:4.5.9") { exclude group: "commons-logging", module: "commons-logging" } testCompile("commons-fileupload:commons-fileupload:1.4")