Skip to content

Commit 6e3d43c

Browse files
committed
Fix sample
- Remove use of CommandRegistration.Builder supplier - #618
1 parent 8179401 commit 6e3d43c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

spring-shell-samples/src/main/java/org/springframework/shell/samples/e2e/UnrecognisedOptionCommands.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
*/
1616
package org.springframework.shell.samples.e2e;
1717

18-
import java.util.function.Supplier;
19-
2018
import org.springframework.context.annotation.Bean;
2119
import org.springframework.shell.command.CommandRegistration;
2220
import org.springframework.shell.standard.ShellComponent;
@@ -33,8 +31,8 @@ public String testUnrecognisedOptionNoOtherAnnotation(
3331
}
3432

3533
@Bean
36-
public CommandRegistration testUnrecognisedOptionNoOtherRegistration(Supplier<CommandRegistration.Builder> builder) {
37-
return builder.get()
34+
public CommandRegistration testUnrecognisedOptionNoOtherRegistration() {
35+
return CommandRegistration.builder()
3836
.command(REG, "unrecognised-option-noother")
3937
.group(GROUP)
4038
.withTarget()
@@ -53,8 +51,8 @@ public String testUnrecognisedOptionWithRequiredAnnotation(
5351
}
5452

5553
@Bean
56-
public CommandRegistration testUnrecognisedOptionWithRequiredRegistration(Supplier<CommandRegistration.Builder> builder) {
57-
return builder.get()
54+
public CommandRegistration testUnrecognisedOptionWithRequiredRegistration() {
55+
return CommandRegistration.builder()
5856
.command(REG, "unrecognised-option-withrequired")
5957
.group(GROUP)
6058
.withOption()

0 commit comments

Comments
 (0)