Polishing

This commit is contained in:
Juergen Hoeller
2025-10-21 00:59:56 +02:00
parent 765e30c3a6
commit 7adcd99ea2
5 changed files with 9 additions and 12 deletions
@@ -149,8 +149,6 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
private static final boolean jndiPresent = ClassUtils.isPresent(
"javax.naming.InitialContext", CommonAnnotationBeanPostProcessor.class.getClassLoader());
private static final Set<Class<? extends Annotation>> resourceAnnotationTypes = CollectionUtils.newLinkedHashSet(3);
@Nullable
private static final Class<? extends Annotation> jakartaResourceType;
@@ -160,6 +158,8 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
@Nullable
private static final Class<? extends Annotation> ejbAnnotationType;
private static final Set<Class<? extends Annotation>> resourceAnnotationTypes = CollectionUtils.newLinkedHashSet(3);
static {
jakartaResourceType = loadAnnotationType("jakarta.annotation.Resource");
if (jakartaResourceType != null) {
@@ -63,9 +63,9 @@ import org.springframework.web.util.WebUtils;
*
* <p>As of Spring 6.0, this set of mocks is designed on a Servlet 6.0 baseline.
*
* <p>Compatible with Servlet 3.1 but can be configured to expose a specific version
* through {@link #setMajorVersion}/{@link #setMinorVersion}; default is 3.1.
* Note that Servlet 3.1 support is limited: servlet, filter and listener
* <p>Compatible with Servlet 6.0 but can be configured to expose a specific version
* through {@link #setMajorVersion}/{@link #setMinorVersion}; default is 6.0.
* Note that some Servlet SPI support is limited: servlet, filter and listener
* registration methods are not supported; neither is JSP configuration.
* We generally do not recommend to unit test your ServletContainerInitializers and
* WebApplicationInitializers which is where those registration methods would be used.
@@ -200,9 +200,9 @@ class MockServletContextTests {
assertThat(filterRegistrations).isNotNull();
assertThat(filterRegistrations).isEmpty();
}
}
/**
* @since 5.1.11
*/
@@ -242,7 +242,6 @@ class MockServletContextTests {
assertThat(realPath).isNotNull();
}
}
}
}
@@ -63,9 +63,9 @@ import org.springframework.web.util.WebUtils;
*
* <p>As of Spring 6.0, this set of mocks is designed on a Servlet 6.0 baseline.
*
* <p>Compatible with Servlet 3.1 but can be configured to expose a specific version
* through {@link #setMajorVersion}/{@link #setMinorVersion}; default is 3.1.
* Note that Servlet 3.1 support is limited: servlet, filter and listener
* <p>Compatible with Servlet 6.0 but can be configured to expose a specific version
* through {@link #setMajorVersion}/{@link #setMinorVersion}; default is 6.0.
* Note that some Servlet SPI support is limited: servlet, filter and listener
* registration methods are not supported; neither is JSP configuration.
* We generally do not recommend to unit test your ServletContainerInitializers and
* WebApplicationInitializers which is where those registration methods would be used.
@@ -653,7 +653,6 @@ class DefaultServerRequest implements ServerRequest {
return this.headers.keySet();
}
// Unsupported
@Override
@@ -706,7 +705,6 @@ class DefaultServerRequest implements ServerRequest {
throw new UnsupportedOperationException();
}
@Override
public String getCharacterEncoding() {
throw new UnsupportedOperationException();