diff --git a/src/main/java/hudson/plugins/ec2/SlaveTemplate.java b/src/main/java/hudson/plugins/ec2/SlaveTemplate.java index 852c5f825..bd464d67a 100644 --- a/src/main/java/hudson/plugins/ec2/SlaveTemplate.java +++ b/src/main/java/hudson/plugins/ec2/SlaveTemplate.java @@ -2040,7 +2040,7 @@ public ListBoxModel doFillConnectionStrategyItems(@QueryParameter String connect public FormValidation doCheckConnectionStrategy(@QueryParameter String connectionStrategy) { return Stream.of(ConnectionStrategy.values()) - .filter(v -> v.equalsName(connectionStrategy)) + .filter(v -> v.name().equals(connectionStrategy)) .findFirst() .map(s -> FormValidation.ok()) .orElse(FormValidation.error("Could not find selected connection strategy"));