From 39ec7d36c18806077fd105d1a293de585dd691e0 Mon Sep 17 00:00:00 2001 From: Eric Bottard Date: Thu, 10 Aug 2017 15:39:37 +0200 Subject: [PATCH] Uncamelify method names as documented --- .../shell/standard/StandardMethodTargetRegistrar.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-shell-standard/src/main/java/org/springframework/shell/standard/StandardMethodTargetRegistrar.java b/spring-shell-standard/src/main/java/org/springframework/shell/standard/StandardMethodTargetRegistrar.java index 90c9b356..e408aeb9 100644 --- a/spring-shell-standard/src/main/java/org/springframework/shell/standard/StandardMethodTargetRegistrar.java +++ b/spring-shell-standard/src/main/java/org/springframework/shell/standard/StandardMethodTargetRegistrar.java @@ -26,6 +26,7 @@ import org.springframework.context.ApplicationContext; import org.springframework.shell.ConfigurableCommandRegistry; import org.springframework.shell.MethodTarget; import org.springframework.shell.MethodTargetRegistrar; +import org.springframework.shell.Utils; import org.springframework.util.ReflectionUtils; /** @@ -52,7 +53,7 @@ public class StandardMethodTargetRegistrar implements MethodTargetRegistrar { ShellMethod shellMapping = method.getAnnotation(ShellMethod.class); String[] keys = shellMapping.key(); if (keys.length == 0) { - keys = new String[] {method.getName()}; + keys = new String[] {Utils.unCamelify(method.getName())}; } for (String key : keys) { MethodTarget target = new MethodTarget(method, bean, shellMapping.value());