Browse Source

Apply "final fields" Eclipse clean-up in spring-test

This has only been applied to `src/main/java`.
pull/27560/head
Sam Brannen 3 years ago
parent
commit
940a37f9ce
  1. 2
      spring-test/src/main/java/org/springframework/mock/env/MockEnvironment.java
  2. 2
      spring-test/src/main/java/org/springframework/test/web/client/response/DefaultResponseCreator.java
  3. 2
      spring-test/src/main/java/org/springframework/test/web/servlet/setup/AbstractMockMvcBuilder.java
  4. 2
      spring-test/src/main/java/org/springframework/test/web/servlet/setup/StandaloneMockMvcBuilder.java

2
spring-test/src/main/java/org/springframework/mock/env/MockEnvironment.java vendored

@ -31,7 +31,7 @@ import org.springframework.core.env.ConfigurableEnvironment; @@ -31,7 +31,7 @@ import org.springframework.core.env.ConfigurableEnvironment;
*/
public class MockEnvironment extends AbstractEnvironment {
private MockPropertySource propertySource = new MockPropertySource();
private final MockPropertySource propertySource = new MockPropertySource();
/**
* Create a new {@code MockEnvironment} with a single {@link MockPropertySource}.

2
spring-test/src/main/java/org/springframework/test/web/client/response/DefaultResponseCreator.java

@ -40,7 +40,7 @@ import org.springframework.util.Assert; @@ -40,7 +40,7 @@ import org.springframework.util.Assert;
*/
public class DefaultResponseCreator implements ResponseCreator {
private HttpStatus statusCode;
private final HttpStatus statusCode;
private byte[] content = new byte[0];

2
spring-test/src/main/java/org/springframework/test/web/servlet/setup/AbstractMockMvcBuilder.java

@ -56,7 +56,7 @@ import org.springframework.web.context.WebApplicationContext; @@ -56,7 +56,7 @@ import org.springframework.web.context.WebApplicationContext;
public abstract class AbstractMockMvcBuilder<B extends AbstractMockMvcBuilder<B>>
extends MockMvcBuilderSupport implements ConfigurableMockMvcBuilder<B> {
private List<Filter> filters = new ArrayList<>();
private final List<Filter> filters = new ArrayList<>();
@Nullable
private RequestBuilder defaultRequestBuilder;

2
spring-test/src/main/java/org/springframework/test/web/servlet/setup/StandaloneMockMvcBuilder.java

@ -137,7 +137,7 @@ public class StandaloneMockMvcBuilder extends AbstractMockMvcBuilder<StandaloneM @@ -137,7 +137,7 @@ public class StandaloneMockMvcBuilder extends AbstractMockMvcBuilder<StandaloneM
@Nullable
private Boolean removeSemicolonContent;
private Map<String, String> placeholderValues = new HashMap<>();
private final Map<String, String> placeholderValues = new HashMap<>();
private Supplier<RequestMappingHandlerMapping> handlerMappingFactory = RequestMappingHandlerMapping::new;

Loading…
Cancel
Save