From 0336be7063384ea4e021a126edc5dec06f580a02 Mon Sep 17 00:00:00 2001 From: Ingyu Hwang Date: Wed, 4 Nov 2020 03:23:22 +0900 Subject: [PATCH] Fix typo in OnEnabledComponent (#1992) --- .../gateway/config/conditional/OnEnabledComponent.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/config/conditional/OnEnabledComponent.java b/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/config/conditional/OnEnabledComponent.java index b63347a5..b3211dd5 100644 --- a/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/config/conditional/OnEnabledComponent.java +++ b/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/config/conditional/OnEnabledComponent.java @@ -45,12 +45,12 @@ public abstract class OnEnabledComponent extends SpringBootCondition implemen @Override public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) { - Class candidate = getEndpointType(annotationClass(), context, metadata); + Class candidate = getComponentType(annotationClass(), context, metadata); return determineOutcome(candidate, context.getEnvironment()); } @SuppressWarnings("unchecked") - protected Class getEndpointType(Class annotationClass, ConditionContext context, + protected Class getComponentType(Class annotationClass, ConditionContext context, AnnotatedTypeMetadata metadata) { Map attributes = metadata.getAnnotationAttributes(annotationClass.getName()); if (attributes != null && attributes.containsKey("value")) { @@ -67,7 +67,7 @@ public abstract class OnEnabledComponent extends SpringBootCondition implemen context.getClassLoader()); } catch (Throwable ex) { - throw new IllegalStateException("Failed to extract endpoint id for " + throw new IllegalStateException("Failed to extract component class for " + methodMetadata.getDeclaringClassName() + "." + methodMetadata.getMethodName(), ex); } }