Browse Source

Polish

pull/29975/head
Johnny Lim 2 years ago
parent
commit
ce3be72e7f
  1. 2
      framework-docs/src/docs/asciidoc/web/webmvc.adoc
  2. 11
      spring-context/src/test/kotlin/org/springframework/context/aot/KotlinReflectionBeanRegistrationAotProcessorTests.kt
  3. 11
      spring-context/src/test/kotlin/org/springframework/validation/beanvalidation/KotlinMethodValidationTests.kt
  4. 2
      spring-core/src/main/java/org/springframework/cglib/core/TinyBitSet.java
  5. 4
      spring-core/src/main/java/org/springframework/core/annotation/RepeatableContainers.java
  6. 2
      spring-core/src/main/java/org/springframework/core/codec/ResourceDecoder.java
  7. 6
      spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java
  8. 2
      spring-core/src/main/kotlin/org/springframework/aot/hint/TypeHintExtensions.kt
  9. 2
      spring-core/src/test/kotlin/org/springframework/aot/hint/ResourceHintsExtensionsTests.kt
  10. 3
      spring-r2dbc/src/test/java/org/springframework/r2dbc/connection/R2dbcTransactionManagerUnitTests.java
  11. 4
      spring-test/src/main/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebConnection.java
  12. 2
      spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebConnectionTests.java
  13. 2
      spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.java
  14. 24
      spring-web/src/test/java/org/springframework/http/ResponseEntityTests.java
  15. 7
      spring-web/src/test/kotlin/org/springframework/web/method/annotation/ModelAttributeMethodProcessorKotlinTests.kt
  16. 4
      spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultClientRequestObservationConvention.java
  17. 10
      spring-webflux/src/test/kotlin/org/springframework/web/reactive/function/client/support/KotlinWebClientHttpServiceProxyTests.kt
  18. 2
      spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMappingTests.java

2
framework-docs/src/docs/asciidoc/web/webmvc.adoc

@ -4777,7 +4777,7 @@ directly. For example: @@ -4777,7 +4777,7 @@ directly. For example:
ContextSnapshot snapshot = ContextSnapshot.captureAll();
// On a different thread: restore ThreadLocal values
try (ContextSnapshot.Scope scoped = snapshot.setThreadLocals()) {
try (ContextSnapshot.Scope scope = snapshot.setThreadLocals()) {
// ...
}
----

11
spring-context/src/test/kotlin/org/springframework/context/aot/KotlinReflectionBeanRegistrationAotProcessorTests.kt

@ -16,10 +16,9 @@ @@ -16,10 +16,9 @@
package org.springframework.context.aot
import org.assertj.core.api.Assertions
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import org.mockito.Mockito
import org.springframework.aot.generate.GenerationContext
import org.springframework.aot.hint.MemberCategory
import org.springframework.aot.hint.predicate.RuntimeHintsPredicates
import org.springframework.aot.test.generate.TestGenerationContext
@ -41,7 +40,7 @@ class KotlinReflectionBeanRegistrationAotProcessorTests { @@ -41,7 +40,7 @@ class KotlinReflectionBeanRegistrationAotProcessorTests {
@Test
fun processorIsRegistered() {
Assertions.assertThat(
assertThat(
AotServices.factories(javaClass.classLoader).load(BeanRegistrationAotProcessor::class.java))
.anyMatch(KotlinReflectionBeanRegistrationAotProcessor::class.java::isInstance)
}
@ -49,12 +48,12 @@ class KotlinReflectionBeanRegistrationAotProcessorTests { @@ -49,12 +48,12 @@ class KotlinReflectionBeanRegistrationAotProcessorTests {
@Test
fun shouldProcessKotlinBean() {
process(SampleKotlinBean::class.java)
Assertions.assertThat(
assertThat(
RuntimeHintsPredicates.reflection()
.onType(SampleKotlinBean::class.java)
.withMemberCategory(MemberCategory.INTROSPECT_DECLARED_METHODS)
).accepts(generationContext.runtimeHints)
Assertions.assertThat(
assertThat(
RuntimeHintsPredicates.reflection()
.onType(BaseKotlinBean::class.java)
.withMemberCategory(MemberCategory.INTROSPECT_DECLARED_METHODS)
@ -64,7 +63,7 @@ class KotlinReflectionBeanRegistrationAotProcessorTests { @@ -64,7 +63,7 @@ class KotlinReflectionBeanRegistrationAotProcessorTests {
@Test
fun shouldNotProcessJavaBean() {
process(SampleJavaBean::class.java)
Assertions.assertThat(generationContext.runtimeHints.reflection().typeHints()).isEmpty()
assertThat(generationContext.runtimeHints.reflection().typeHints()).isEmpty()
}
private fun process(beanClass: Class<*>) {

11
spring-context/src/test/kotlin/org/springframework/validation/beanvalidation/KotlinMethodValidationTests.kt

@ -20,7 +20,8 @@ import jakarta.validation.ValidationException @@ -20,7 +20,8 @@ import jakarta.validation.ValidationException
import jakarta.validation.Validator
import jakarta.validation.constraints.NotEmpty
import kotlinx.coroutines.runBlocking
import org.assertj.core.api.Assertions
import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Assertions.assertThatExceptionOfType
import org.junit.jupiter.api.Test
import org.springframework.aop.framework.ProxyFactory
import org.springframework.validation.annotation.Validated
@ -41,8 +42,8 @@ class KotlinMethodValidationTests { @@ -41,8 +42,8 @@ class KotlinMethodValidationTests {
validator.afterPropertiesSet()
proxyFactory.addAdvice(MethodValidationInterceptor(validator as Validator))
val proxy = proxyFactory.getProxy() as MyValidBean
Assertions.assertThat(proxy.validName("name")).isEqualTo("name")
Assertions.assertThatExceptionOfType(ValidationException::class.java).isThrownBy {
assertThat(proxy.validName("name")).isEqualTo("name")
assertThatExceptionOfType(ValidationException::class.java).isThrownBy {
proxy.validName("")
}
}
@ -55,8 +56,8 @@ class KotlinMethodValidationTests { @@ -55,8 +56,8 @@ class KotlinMethodValidationTests {
validator.afterPropertiesSet()
proxyFactory.addAdvice(MethodValidationInterceptor(validator as Validator))
val proxy = proxyFactory.getProxy() as MyValidCoroutinesBean
Assertions.assertThat(proxy.validName("name")).isEqualTo("name")
Assertions.assertThatExceptionOfType(ValidationException::class.java).isThrownBy {
assertThat(proxy.validName("name")).isEqualTo("name")
assertThatExceptionOfType(ValidationException::class.java).isThrownBy {
runBlocking {
proxy.validName("")
}

2
spring-core/src/main/java/org/springframework/cglib/core/TinyBitSet.java

@ -17,7 +17,7 @@ package org.springframework.cglib.core; @@ -17,7 +17,7 @@ package org.springframework.cglib.core;
@Deprecated
public class TinyBitSet {
private static int[] T = new int[256];
private static final int[] T = new int[256];
private int value = 0;
private static int gcount(int x) {

4
spring-core/src/main/java/org/springframework/core/annotation/RepeatableContainers.java

@ -145,7 +145,7 @@ public abstract class RepeatableContainers { @@ -145,7 +145,7 @@ public abstract class RepeatableContainers {
private static final Object NONE = new Object();
private static StandardRepeatableContainers INSTANCE = new StandardRepeatableContainers();
private static final StandardRepeatableContainers INSTANCE = new StandardRepeatableContainers();
StandardRepeatableContainers() {
super(null);
@ -270,7 +270,7 @@ public abstract class RepeatableContainers { @@ -270,7 +270,7 @@ public abstract class RepeatableContainers {
*/
private static class NoRepeatableContainers extends RepeatableContainers {
private static NoRepeatableContainers INSTANCE = new NoRepeatableContainers();
private static final NoRepeatableContainers INSTANCE = new NoRepeatableContainers();
NoRepeatableContainers() {
super(null);

2
spring-core/src/main/java/org/springframework/core/codec/ResourceDecoder.java

@ -42,7 +42,7 @@ import org.springframework.util.MimeTypeUtils; @@ -42,7 +42,7 @@ import org.springframework.util.MimeTypeUtils;
public class ResourceDecoder extends AbstractDataBufferDecoder<Resource> {
/** Name of hint with a filename for the resource(e.g. from "Content-Disposition" HTTP header). */
public static String FILENAME_HINT = ResourceDecoder.class.getName() + ".filename";
public static final String FILENAME_HINT = ResourceDecoder.class.getName() + ".filename";
public ResourceDecoder() {

6
spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java

@ -897,9 +897,9 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol @@ -897,9 +897,9 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol
}
/**
* If it's a "file:" URI, use FileSystemResource to avoid duplicates
* for the same path discovered via class-path scanning.
*/
* If it's a "file:" URI, use FileSystemResource to avoid duplicates
* for the same path discovered via class-path scanning.
*/
private Resource convertModuleSystemURI(URI uri) {
return (ResourceUtils.URL_PROTOCOL_FILE.equals(uri.getScheme()) ?
new FileSystemResource(uri.getPath()) : UrlResource.from(uri));

2
spring-core/src/main/kotlin/org/springframework/aot/hint/TypeHintExtensions.kt

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
package org.springframework.aot.hint
/**
* Extension for [TypeHint.Builder.onReachableType] providing a `onReachableType<Foo>())`
* Extension for [TypeHint.Builder.onReachableType] providing a `onReachableType<Foo>()`
* variant.
*
* @author Sebastien Deleuze

2
spring-core/src/test/kotlin/org/springframework/aot/hint/ResourceHintsExtensionsTests.kt

@ -32,7 +32,7 @@ class ResourceHintsExtensionsTests { @@ -32,7 +32,7 @@ class ResourceHintsExtensionsTests {
private val resourceHints = mockk<ResourceHints>()
@Test
fun `registerType extension with MemberCategory`() {
fun `registerType extension`() {
every { resourceHints.registerType(any<Class<String>>()) } returns resourceHints
resourceHints.registerType<String>()
verify { resourceHints.registerType(String::class.java) }

3
spring-r2dbc/src/test/java/org/springframework/r2dbc/connection/R2dbcTransactionManagerUnitTests.java

@ -25,7 +25,6 @@ import io.r2dbc.spi.IsolationLevel; @@ -25,7 +25,6 @@ import io.r2dbc.spi.IsolationLevel;
import io.r2dbc.spi.R2dbcBadGrammarException;
import io.r2dbc.spi.R2dbcTimeoutException;
import io.r2dbc.spi.Statement;
import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
@ -345,7 +344,7 @@ class R2dbcTransactionManagerUnitTests { @@ -345,7 +344,7 @@ class R2dbcTransactionManagerUnitTests {
.doOnNext(connection -> {
throw new IllegalStateException("Intentional error to trigger rollback");
}).then()).as(StepVerifier::create)
.verifyErrorSatisfies(e -> Assertions.assertThat(e)
.verifyErrorSatisfies(e -> assertThat(e)
.isInstanceOf(BadSqlGrammarException.class)
.hasCause(new R2dbcBadGrammarException("Rollback should fail"))
);

4
spring-test/src/main/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebConnection.java

@ -68,7 +68,7 @@ public final class MockMvcWebConnection implements WebConnection { @@ -68,7 +68,7 @@ public final class MockMvcWebConnection implements WebConnection {
private WebClient webClient;
private static int MAX_FORWARDS = 100;
private static final int MAX_FORWARDS = 100;
/**
@ -143,7 +143,7 @@ public final class MockMvcWebConnection implements WebConnection { @@ -143,7 +143,7 @@ public final class MockMvcWebConnection implements WebConnection {
forwards += 1;
}
if (forwards == MAX_FORWARDS) {
throw new IllegalStateException("Forwarded more than " + forwards + " times in a row, potential infinite forward loop");
throw new IllegalStateException("Forwarded " + forwards + " times in a row, potential infinite forward loop");
}
storeCookies(webRequest, httpServletResponse.getCookies());

2
spring-test/src/test/java/org/springframework/test/web/servlet/htmlunit/MockMvcWebConnectionTests.java

@ -85,7 +85,7 @@ public class MockMvcWebConnectionTests { @@ -85,7 +85,7 @@ public class MockMvcWebConnectionTests {
public void infiniteForward() {
this.webClient.setWebConnection(new MockMvcWebConnection(this.mockMvc, this.webClient, ""));
assertThatIllegalStateException().isThrownBy(() -> this.webClient.getPage("http://localhost/infiniteForward"))
.withMessage("Forwarded more than 100 times in a row, potential infinite forward loop");
.withMessage("Forwarded 100 times in a row, potential infinite forward loop");
}
@Test

2
spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.java

@ -99,7 +99,7 @@ import org.springframework.util.xml.StaxUtils; @@ -99,7 +99,7 @@ import org.springframework.util.xml.StaxUtils;
*/
public class Jackson2ObjectMapperBuilder {
private static boolean jackson2XmlPresent = ClassUtils.isPresent(
private static final boolean jackson2XmlPresent = ClassUtils.isPresent(
"com.fasterxml.jackson.dataformat.xml.XmlMapper", Jackson2ObjectMapperBuilder.class.getClassLoader());

24
spring-web/src/test/java/org/springframework/http/ResponseEntityTests.java

@ -17,7 +17,6 @@ @@ -17,7 +17,6 @@
package org.springframework.http;
import java.net.URI;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
@ -46,11 +45,8 @@ class ResponseEntityTests { @@ -46,11 +45,8 @@ class ResponseEntityTests {
assertThat(responseEntity).isNotNull();
assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(responseEntity.getHeaders().containsKey(headerName)).isTrue();
List<String> list = responseEntity.getHeaders().get(headerName);
assertThat(list).hasSize(2);
assertThat(list.get(0)).isEqualTo(headerValue1);
assertThat(list.get(1)).isEqualTo(headerValue2);
assertThat((int) responseEntity.getBody()).isEqualTo((int) entity);
assertThat(responseEntity.getHeaders().get(headerName)).containsExactly(headerValue1, headerValue2);
assertThat(responseEntity.getBody()).isEqualTo(entity);
}
@Test
@ -69,7 +65,7 @@ class ResponseEntityTests { @@ -69,7 +65,7 @@ class ResponseEntityTests {
assertThat(responseEntity).isNotNull();
assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat((int) responseEntity.getBody()).isEqualTo((int) entity);
assertThat(responseEntity.getBody()).isEqualTo(entity);
}
@Test
@ -79,7 +75,7 @@ class ResponseEntityTests { @@ -79,7 +75,7 @@ class ResponseEntityTests {
assertThat(responseEntity).isNotNull();
assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat((int) responseEntity.getBody()).isEqualTo((int) entity);
assertThat(responseEntity.getBody()).isEqualTo(entity);
}
@Test
@ -98,7 +94,7 @@ class ResponseEntityTests { @@ -98,7 +94,7 @@ class ResponseEntityTests {
assertThat(responseEntity).isNotNull();
assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat((int) responseEntity.getBody()).isEqualTo((int) entity);
assertThat(responseEntity.getBody()).isEqualTo(entity);
}
@Test
@ -270,7 +266,7 @@ class ResponseEntityTests { @@ -270,7 +266,7 @@ class ResponseEntityTests {
assertThat(responseEntity).isNotNull();
assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(responseEntity.getHeaders().containsKey(HttpHeaders.CACHE_CONTROL)).isFalse();
assertThat((int) responseEntity.getBody()).isEqualTo((int) entity);
assertThat(responseEntity.getBody()).isEqualTo(entity);
}
@Test
@ -286,7 +282,7 @@ class ResponseEntityTests { @@ -286,7 +282,7 @@ class ResponseEntityTests {
assertThat(responseEntity).isNotNull();
assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(responseEntity.getHeaders().containsKey(HttpHeaders.CACHE_CONTROL)).isTrue();
assertThat((int) responseEntity.getBody()).isEqualTo((int) entity);
assertThat(responseEntity.getBody()).isEqualTo(entity);
String cacheControlHeader = responseEntity.getHeaders().getCacheControl();
assertThat(cacheControlHeader).isEqualTo(
"max-age=3600, must-revalidate, private, proxy-revalidate, s-maxage=1800");
@ -304,7 +300,7 @@ class ResponseEntityTests { @@ -304,7 +300,7 @@ class ResponseEntityTests {
assertThat(responseEntity).isNotNull();
assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(responseEntity.getHeaders().containsKey(HttpHeaders.CACHE_CONTROL)).isTrue();
assertThat((int) responseEntity.getBody()).isEqualTo((int) entity);
assertThat(responseEntity.getBody()).isEqualTo(entity);
String cacheControlHeader = responseEntity.getHeaders().getCacheControl();
assertThat(cacheControlHeader).isEqualTo("no-store");
@ -316,7 +312,7 @@ class ResponseEntityTests { @@ -316,7 +312,7 @@ class ResponseEntityTests {
ResponseEntity<Integer> responseEntity = ResponseEntity.status(200).body(entity);
assertThat(responseEntity.getStatusCode().value()).isEqualTo(200);
assertThat((int) responseEntity.getBody()).isEqualTo((int) entity);
assertThat(responseEntity.getBody()).isEqualTo(entity);
}
@Test
@ -326,7 +322,7 @@ class ResponseEntityTests { @@ -326,7 +322,7 @@ class ResponseEntityTests {
ResponseEntity<Integer> responseEntity = ResponseEntity.status(299).body(entity);
assertThat(responseEntity.getStatusCodeValue()).isEqualTo(299);
assertThat((int) responseEntity.getBody()).isEqualTo((int) entity);
assertThat(responseEntity.getBody()).isEqualTo(entity);
}
}

7
spring-web/src/test/kotlin/org/springframework/web/method/annotation/ModelAttributeMethodProcessorKotlinTests.kt

@ -16,7 +16,8 @@ @@ -16,7 +16,8 @@
package org.springframework.web.method.annotation
import org.assertj.core.api.Assertions
import org.assertj.core.api.Assertions.assertThat
import org.assertj.core.api.Assertions.assertThatThrownBy
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import org.mockito.ArgumentMatchers.*
@ -61,7 +62,7 @@ class ModelAttributeMethodProcessorKotlinTests { @@ -61,7 +62,7 @@ class ModelAttributeMethodProcessorKotlinTests {
val factory = Mockito.mock<WebDataBinderFactory>()
BDDMockito.given(factory.createBinder(any(), any(), eq("param")))
.willAnswer { WebRequestDataBinder(it.getArgument(1)) }
Assertions.assertThat(processor.resolveArgument(this.param, container, requestWithParam, factory)).isEqualTo(Param("b"))
assertThat(processor.resolveArgument(this.param, container, requestWithParam, factory)).isEqualTo(Param("b"))
}
@Test
@ -71,7 +72,7 @@ class ModelAttributeMethodProcessorKotlinTests { @@ -71,7 +72,7 @@ class ModelAttributeMethodProcessorKotlinTests {
val factory = Mockito.mock<WebDataBinderFactory>()
BDDMockito.given(factory.createBinder(any(), any(), eq("param")))
.willAnswer { WebRequestDataBinder(it.getArgument(1)) }
Assertions.assertThatThrownBy {
assertThatThrownBy {
processor.resolveArgument(this.param, container, requestWithParam, factory)
}.isInstanceOf(MethodArgumentNotValidException::class.java)
.hasMessageContaining("parameter a")

4
spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultClientRequestObservationConvention.java

@ -45,6 +45,8 @@ public class DefaultClientRequestObservationConvention implements ClientRequestO @@ -45,6 +45,8 @@ public class DefaultClientRequestObservationConvention implements ClientRequestO
private static final KeyValue URI_NONE = KeyValue.of(LowCardinalityKeyNames.URI, KeyValue.NONE_VALUE);
private static final KeyValue URI_ROOT = KeyValue.of(LowCardinalityKeyNames.URI, ROOT_PATH);
private static final KeyValue METHOD_NONE = KeyValue.of(LowCardinalityKeyNames.METHOD, KeyValue.NONE_VALUE);
private static final KeyValue STATUS_IO_ERROR = KeyValue.of(LowCardinalityKeyNames.STATUS, "IO_ERROR");
@ -101,7 +103,7 @@ public class DefaultClientRequestObservationConvention implements ClientRequestO @@ -101,7 +103,7 @@ public class DefaultClientRequestObservationConvention implements ClientRequestO
}
ClientRequest request = context.getRequest();
if (request != null && ROOT_PATH.equals(request.url().getPath())) {
return KeyValue.of(LowCardinalityKeyNames.URI, ROOT_PATH);
return URI_ROOT;
}
return URI_NONE;
}

10
spring-webflux/src/test/kotlin/org/springframework/web/reactive/function/client/support/KotlinWebClientHttpServiceProxyTests.kt

@ -18,7 +18,7 @@ package org.springframework.web.reactive.function.client.support @@ -18,7 +18,7 @@ package org.springframework.web.reactive.function.client.support
import kotlinx.coroutines.runBlocking
import okhttp3.mockwebserver.MockResponse
import okhttp3.mockwebserver.MockWebServer
import org.assertj.core.api.Assertions
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.AfterEach
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
@ -66,7 +66,7 @@ class KotlinWebClientHttpServiceProxyTests { @@ -66,7 +66,7 @@ class KotlinWebClientHttpServiceProxyTests {
}
runBlocking {
val greeting = initHttpService().getGreetingSuspending()
Assertions.assertThat(greeting).isEqualTo("Hello Spring!")
assertThat(greeting).isEqualTo("Hello Spring!")
}
}
@ -93,7 +93,7 @@ class KotlinWebClientHttpServiceProxyTests { @@ -93,7 +93,7 @@ class KotlinWebClientHttpServiceProxyTests {
).setBody("Hello Spring!")
}
val greeting = initHttpService().getGreetingBlocking()
Assertions.assertThat(greeting).isEqualTo("Hello Spring!")
assertThat(greeting).isEqualTo("Hello Spring!")
}
@Test
@ -115,8 +115,8 @@ class KotlinWebClientHttpServiceProxyTests { @@ -115,8 +115,8 @@ class KotlinWebClientHttpServiceProxyTests {
val service = initHttpService(webClient)
runBlocking {
val greeting = service.getGreetingSuspendingWithAttribute("myAttributeValue")
Assertions.assertThat(greeting).isEqualTo("Hello Spring!")
Assertions.assertThat(attributes).containsEntry("myAttribute", "myAttributeValue")
assertThat(greeting).isEqualTo("Hello Spring!")
assertThat(attributes).containsEntry("myAttribute", "myAttributeValue")
}
}

2
spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/method/RequestMappingInfoHandlerMappingTests.java

@ -177,7 +177,7 @@ class RequestMappingInfoHandlerMappingTests { @@ -177,7 +177,7 @@ class RequestMappingInfoHandlerMappingTests {
}
@PathPatternsParameterizedTest // gh-28062
void getHandlerMethodTypeNotSupportedWithParseError(TestRequestMappingInfoHandlerMapping mapping) {
void getHandlerMediaTypeNotSupportedWithParseError(TestRequestMappingInfoHandlerMapping mapping) {
MockHttpServletRequest request = new MockHttpServletRequest("PUT", "/person/1");
request.setContentType("This string");
assertThatExceptionOfType(HttpMediaTypeNotSupportedException.class)

Loading…
Cancel
Save