Clean up warnings and delete dead code

This commit is contained in:
Sam Brannen
2018-08-12 15:54:38 +02:00
parent c4a7567a5e
commit cfb1ed1009
25 changed files with 25 additions and 61 deletions

View File

@@ -21,8 +21,6 @@ import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
@@ -74,8 +72,6 @@ public class DispatcherHandler implements WebHandler, ApplicationContextAware {
new ResponseStatusException(HttpStatus.NOT_FOUND, "No matching handler");
private static final Log logger = LogFactory.getLog(DispatcherHandler.class);
@Nullable
private List<HandlerMapping> handlerMappings;

View File

@@ -65,7 +65,6 @@ import org.springframework.mock.http.server.reactive.test.MockServerHttpRequest;
import org.springframework.util.MultiValueMap;
import static org.junit.Assert.*;
import static org.mockito.Mockito.when;
import static org.springframework.http.codec.json.Jackson2CodecSupport.*;
/**

View File

@@ -30,7 +30,6 @@ import org.mockito.MockitoAnnotations;
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
import org.springframework.core.NamedInheritableThreadLocal;
import org.springframework.core.NamedThreadLocal;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;

View File

@@ -82,6 +82,7 @@ public class ClientResponseWrapperTests {
}
@Test
@SuppressWarnings("unchecked")
public void cookies() {
MultiValueMap<String, ResponseCookie> cookies = mock(MultiValueMap.class);
when(mockResponse.cookies()).thenReturn(cookies);

View File

@@ -136,6 +136,7 @@ public class ServerRequestWrapperTests {
}
@Test
@SuppressWarnings("unchecked")
public void cookies() {
MultiValueMap<String, HttpCookie> cookies = mock(MultiValueMap.class);
when(mockRequest.cookies()).thenReturn(cookies);

View File

@@ -20,7 +20,6 @@ import java.time.ZoneId;
import java.util.Locale;
import java.util.TimeZone;
import org.junit.Before;
import org.junit.Test;
import reactor.core.publisher.Mono;

View File

@@ -13,4 +13,4 @@ fun ScriptTemplateWithBindings.i18n(code: String) =
var ScriptTemplateWithBindings.foo: String
get() = bindings["foo"] as String
set(value) { throw UnsupportedOperationException() }
set(@Suppress("UNUSED_PARAMETER") value) { throw UnsupportedOperationException() }