From cf2bf0c2b9cccd5a41db743077369835e142a3f8 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Fri, 11 Aug 2017 17:45:17 +0100 Subject: [PATCH] Work around javadoc bug when linking to annotation attributes If an annotation attribute is linked to in javadoc before the javadoc processor encounters a usage of the annotation, the javadoc tool fails with a class cast exception. This is a known issue [1] but it has been closed as won't fix so we need to work around it. Sadly, the only reasonable way to do so appears to be to remove the links to the annotation attributes and only link to the annotation itself. [1] https://bugs.openjdk.java.net/browse/JDK-8170447 --- .../endpoint/ConditionalOnEnabledEndpoint.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/ConditionalOnEnabledEndpoint.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/ConditionalOnEnabledEndpoint.java index c2b22080bdf..6b1cc6b4c02 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/ConditionalOnEnabledEndpoint.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/endpoint/ConditionalOnEnabledEndpoint.java @@ -16,7 +16,6 @@ package org.springframework.boot.actuate.autoconfigure.endpoint; - import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -29,19 +28,19 @@ import org.springframework.context.annotation.Conditional; /** * {@link Conditional} that checks whether an endpoint is enabled or not. Matches - * according to the {@link Endpoint#enabledByDefault() enabledByDefault flag} and the - * specific {@link Endpoint#types() tech} that the endpoint may be restricted to. + * according to the {@code enabledByDefault} flag {@code types} flag that the + * {@link Endpoint} may be restricted to. *

* If no specific {@code endpoints..*} or {@code endpoints.all.*} properties are * defined, the condition matches the {@code enabledByDefault} value regardless of the - * specific {@link EndpointType}, if any. If any property are set, they are evaluated - * with a sensible order of precedence. + * specific {@link EndpointType}, if any. If any property are set, they are evaluated with + * a sensible order of precedence. *

* For instance if {@code endpoints.all.enabled} is {@code false} but * {@code endpoints..enabled} is {@code true}, the condition will match. *

- * This condition must be placed on a {@code @Bean} method producing an endpoint as its - * id and other attributes are inferred from the {@link Endpoint} annotation set on the + * This condition must be placed on a {@code @Bean} method producing an endpoint as its id + * and other attributes are inferred from the {@link Endpoint} annotation set on the * return type of the factory method. Consider the following valid example: * *