mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Polishing
This commit is contained in:
+2
-2
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-3
@@ -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.
|
||||
|
||||
-2
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user