From d05ae40c993460e8df79ced34a39d54226178d2b Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Mon, 10 Dec 2018 17:59:26 +0000 Subject: [PATCH] Remove redundant field type and optional configuration See gh-15435 --- .../MappingsEndpointServletDocumentationTests.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointServletDocumentationTests.java b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointServletDocumentationTests.java index 2be08981b74..d2f8e111323 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointServletDocumentationTests.java +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/endpoint/web/documentation/MappingsEndpointServletDocumentationTests.java @@ -149,13 +149,11 @@ public class MappingsEndpointServletDocumentationTests .type(JsonFieldType.OBJECT) .description("Details of the method, if any, " + "that will handle requests to this mapping."), - fieldWithPath("*.[].details.handlerMethod.className").optional() - .type(JsonFieldType.STRING) + fieldWithPath("*.[].details.handlerMethod.className") .description("Fully qualified name of the class of the method."), - fieldWithPath("*.[].details.handlerMethod.name").optional() - .type(JsonFieldType.STRING).description("Name of the method."), - fieldWithPath("*.[].details.handlerMethod.descriptor").optional() - .type(JsonFieldType.STRING) + fieldWithPath("*.[].details.handlerMethod.name") + .description("Name of the method."), + fieldWithPath("*.[].details.handlerMethod.descriptor") .description("Descriptor of the method as specified in the Java " + "Language Specification.")); dispatcherServletFields.addAll(handlerMethod);