Skip to content

Commit 7adcd99

Browse files
committed
Polishing
1 parent 765e30c commit 7adcd99

5 files changed

Lines changed: 9 additions & 12 deletions

File tree

spring-context/src/main/java/org/springframework/context/annotation/CommonAnnotationBeanPostProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
149149
private static final boolean jndiPresent = ClassUtils.isPresent(
150150
"javax.naming.InitialContext", CommonAnnotationBeanPostProcessor.class.getClassLoader());
151151

152-
private static final Set<Class<? extends Annotation>> resourceAnnotationTypes = CollectionUtils.newLinkedHashSet(3);
153-
154152
@Nullable
155153
private static final Class<? extends Annotation> jakartaResourceType;
156154

@@ -160,6 +158,8 @@ public class CommonAnnotationBeanPostProcessor extends InitDestroyAnnotationBean
160158
@Nullable
161159
private static final Class<? extends Annotation> ejbAnnotationType;
162160

161+
private static final Set<Class<? extends Annotation>> resourceAnnotationTypes = CollectionUtils.newLinkedHashSet(3);
162+
163163
static {
164164
jakartaResourceType = loadAnnotationType("jakarta.annotation.Resource");
165165
if (jakartaResourceType != null) {

spring-test/src/main/java/org/springframework/mock/web/MockServletContext.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@
6363
*
6464
* <p>As of Spring 6.0, this set of mocks is designed on a Servlet 6.0 baseline.
6565
*
66-
* <p>Compatible with Servlet 3.1 but can be configured to expose a specific version
67-
* through {@link #setMajorVersion}/{@link #setMinorVersion}; default is 3.1.
68-
* Note that Servlet 3.1 support is limited: servlet, filter and listener
66+
* <p>Compatible with Servlet 6.0 but can be configured to expose a specific version
67+
* through {@link #setMajorVersion}/{@link #setMinorVersion}; default is 6.0.
68+
* Note that some Servlet SPI support is limited: servlet, filter and listener
6969
* registration methods are not supported; neither is JSP configuration.
7070
* We generally do not recommend to unit test your ServletContainerInitializers and
7171
* WebApplicationInitializers which is where those registration methods would be used.

spring-test/src/test/java/org/springframework/mock/web/MockServletContextTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ void getFilterRegistrations() {
200200
assertThat(filterRegistrations).isNotNull();
201201
assertThat(filterRegistrations).isEmpty();
202202
}
203-
204203
}
205204

205+
206206
/**
207207
* @since 5.1.11
208208
*/
@@ -242,7 +242,6 @@ void getRealPathWithRelativePathToWindowsCDrive() {
242242
assertThat(realPath).isNotNull();
243243
}
244244
}
245-
246245
}
247246

248247
}

spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockServletContext.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@
6363
*
6464
* <p>As of Spring 6.0, this set of mocks is designed on a Servlet 6.0 baseline.
6565
*
66-
* <p>Compatible with Servlet 3.1 but can be configured to expose a specific version
67-
* through {@link #setMajorVersion}/{@link #setMinorVersion}; default is 3.1.
68-
* Note that Servlet 3.1 support is limited: servlet, filter and listener
66+
* <p>Compatible with Servlet 6.0 but can be configured to expose a specific version
67+
* through {@link #setMajorVersion}/{@link #setMinorVersion}; default is 6.0.
68+
* Note that some Servlet SPI support is limited: servlet, filter and listener
6969
* registration methods are not supported; neither is JSP configuration.
7070
* We generally do not recommend to unit test your ServletContainerInitializers and
7171
* WebApplicationInitializers which is where those registration methods would be used.

spring-webmvc/src/main/java/org/springframework/web/servlet/function/DefaultServerRequest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,6 @@ public Collection<String> getHeaderNames() {
653653
return this.headers.keySet();
654654
}
655655

656-
657656
// Unsupported
658657

659658
@Override
@@ -706,7 +705,6 @@ public void addIntHeader(String name, int value) {
706705
throw new UnsupportedOperationException();
707706
}
708707

709-
710708
@Override
711709
public String getCharacterEncoding() {
712710
throw new UnsupportedOperationException();

0 commit comments

Comments
 (0)