diff --git a/build.gradle b/build.gradle index 0de7470851..8ffc35b13a 100644 --- a/build.gradle +++ b/build.gradle @@ -64,8 +64,8 @@ configure(allprojects) { project -> entry 'groovy-xml' } - dependency "io.reactivex.rxjava3:rxjava:3.1.2" - dependency "io.smallrye.reactive:mutiny:1.1.1" + dependency "io.reactivex.rxjava3:rxjava:3.1.3" + dependency "io.smallrye.reactive:mutiny:1.2.0" dependency "io.projectreactor.tools:blockhound:1.0.6.RELEASE" dependency "com.fasterxml:aalto-xml:1.3.0" @@ -117,18 +117,18 @@ configure(allprojects) { project -> dependency "org.webjars:webjars-locator-core:0.48" dependency "org.webjars:underscorejs:1.8.3" - dependencySet(group: 'org.apache.tomcat', version: '10.0.12') { + dependencySet(group: 'org.apache.tomcat', version: '10.0.13') { entry 'tomcat-util' entry('tomcat-websocket') { exclude group: "org.apache.tomcat", name: "tomcat-servlet-api" exclude group: "org.apache.tomcat", name: "tomcat-websocket-api" } } - dependencySet(group: 'org.apache.tomcat.embed', version: '10.0.12') { + dependencySet(group: 'org.apache.tomcat.embed', version: '10.0.13') { entry 'tomcat-embed-core' entry 'tomcat-embed-websocket' } - dependencySet(group: 'io.undertow', version: '2.2.12.Final') { + dependencySet(group: 'io.undertow', version: '2.2.13.Final') { entry 'undertow-core' entry 'undertow-servlet-jakartaee9' entry 'undertow-websockets-jsr-jakartaee9' @@ -148,7 +148,7 @@ configure(allprojects) { project -> dependency 'org.apache.httpcomponents.core5:httpcore5-reactive:5.1.1' dependency "org.eclipse.jetty:jetty-reactive-httpclient:3.0.4" - dependency "org.jruby:jruby:9.3.1.0" + dependency "org.jruby:jruby:9.3.2.0" dependency "org.python:jython-standalone:2.7.1" dependency "org.mozilla:rhino:1.7.11" @@ -188,10 +188,10 @@ configure(allprojects) { project -> } dependency "io.mockk:mockk:1.12.0" - dependency("net.sourceforge.htmlunit:htmlunit:2.54.0") { + dependency("net.sourceforge.htmlunit:htmlunit:2.55.0") { exclude group: "commons-logging", name: "commons-logging" } - dependency("org.seleniumhq.selenium:htmlunit-driver:2.54.0") { + dependency("org.seleniumhq.selenium:htmlunit-driver:2.55.0") { exclude group: "commons-logging", name: "commons-logging" } dependency("org.seleniumhq.selenium:selenium-java:3.141.59") { @@ -302,7 +302,7 @@ configure([rootProject] + javaProjects) { project -> } checkstyle { - toolVersion = "9.0" + toolVersion = "9.2" configDirectory.set(rootProject.file("src/checkstyle")) } diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactory.java index e9108e828f..93c909e047 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/BeanFactory.java @@ -214,6 +214,7 @@ public interface BeanFactory { /** * Return a provider for the specified bean, allowing for lazy on-demand retrieval * of instances, including availability and uniqueness options. + *
For matching a generic type, consider {@link #getBeanProvider(ResolvableType)}. * @param requiredType type the bean must match; can be an interface or superclass * @return a corresponding provider handle * @since 5.1 @@ -223,13 +224,20 @@ public interface BeanFactory { /** * Return a provider for the specified bean, allowing for lazy on-demand retrieval - * of instances, including availability and uniqueness options. - * @param requiredType type the bean must match; can be a generic type declaration. - * Note that collection types are not supported here, in contrast to reflective + * of instances, including availability and uniqueness options. This variant allows + * for specifying a generic type to match, similar to reflective injection points + * with generic type declarations in method/constructor parameters. + *
Note that collections of beans are not supported here, in contrast to reflective * injection points. For programmatically retrieving a list of beans matching a * specific type, specify the actual bean type as an argument here and subsequently * use {@link ObjectProvider#orderedStream()} or its lazy streaming/iteration options. + *
Also, generics matching is strict here, as per the Java assignment rules.
+ * For lenient fallback matching with unchecked semantics (similar to the ´unchecked´
+ * Java compiler warning), consider calling {@link #getBeanProvider(Class)} with the
+ * raw type as a second step if no full generic match is
+ * {@link ObjectProvider#getIfAvailable() available} with this variant.
* @return a corresponding provider handle
+ * @param requiredType type the bean must match; can be a generic type declaration
* @since 5.1
* @see ObjectProvider#iterator()
* @see ObjectProvider#stream()
diff --git a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AbstractFallbackJCacheOperationSource.java b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AbstractFallbackJCacheOperationSource.java
index 3edf2a2c15..8b20e4b148 100644
--- a/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AbstractFallbackJCacheOperationSource.java
+++ b/spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor/AbstractFallbackJCacheOperationSource.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -79,7 +79,7 @@ public abstract class AbstractFallbackJCacheOperationSource implements JCacheOpe
@Nullable
private JCacheOperation> computeCacheOperation(Method method, @Nullable Class> targetClass) {
- // Don't allow no-public methods as required.
+ // Don't allow non-public methods, as configured.
if (allowPublicMethodsOnly() && !Modifier.isPublic(method.getModifiers())) {
return null;
}
diff --git a/spring-context/src/main/java/org/springframework/cache/interceptor/AbstractFallbackCacheOperationSource.java b/spring-context/src/main/java/org/springframework/cache/interceptor/AbstractFallbackCacheOperationSource.java
index 8de528875f..d20993ae27 100644
--- a/spring-context/src/main/java/org/springframework/cache/interceptor/AbstractFallbackCacheOperationSource.java
+++ b/spring-context/src/main/java/org/springframework/cache/interceptor/AbstractFallbackCacheOperationSource.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2002-2018 the original author or authors.
+ * Copyright 2002-2021 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.
@@ -124,7 +124,7 @@ public abstract class AbstractFallbackCacheOperationSource implements CacheOpera
@Nullable
private Collection Note: This method uses the Apache Commons File Upload
+ * Note: This method uses the Apache Commons FileUpload
* library to parse the multipart data and it must be on the test classpath.
* @param expectedMap the expected multipart values
* @since 5.3
diff --git a/spring-tx/src/main/java/org/springframework/transaction/interceptor/AbstractFallbackTransactionAttributeSource.java b/spring-tx/src/main/java/org/springframework/transaction/interceptor/AbstractFallbackTransactionAttributeSource.java
index e50c9b5231..e669818c36 100644
--- a/spring-tx/src/main/java/org/springframework/transaction/interceptor/AbstractFallbackTransactionAttributeSource.java
+++ b/spring-tx/src/main/java/org/springframework/transaction/interceptor/AbstractFallbackTransactionAttributeSource.java
@@ -162,7 +162,7 @@ public abstract class AbstractFallbackTransactionAttributeSource
*/
@Nullable
protected TransactionAttribute computeTransactionAttribute(Method method, @Nullable Class> targetClass) {
- // Don't allow no-public methods as required.
+ // Don't allow non-public methods, as configured.
if (allowPublicMethodsOnly() && !Modifier.isPublic(method.getModifiers())) {
return null;
}
diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/upgrade/TomcatRequestUpgradeStrategy.java b/spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/upgrade/TomcatRequestUpgradeStrategy.java
index 001f85cbca..4cecb3ea3c 100644
--- a/spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/upgrade/TomcatRequestUpgradeStrategy.java
+++ b/spring-webflux/src/main/java/org/springframework/web/reactive/socket/server/upgrade/TomcatRequestUpgradeStrategy.java
@@ -122,6 +122,7 @@ public class TomcatRequestUpgradeStrategy implements RequestUpgradeStrategy {
}
+ @SuppressWarnings("deprecation") // for old doUpgrade variant in Tomcat 9.0.55
@Override
public Mono