Skip to content

Option values are not populated when Kebab Case Option is used #777

Closed
@manish-kothari

Description

@manish-kothari

Using the kebab case option results in null values being populated for the arguments.

This was on spring shell: 3.1.1
Spring boot: 6.0.9

with the below property in application.properties

spring.shell.option.naming.case-type: kebab

I created a simple shell app

import org.springframework.shell.standard.ShellComponent;
import org.springframework.shell.standard.ShellMethod;
import org.springframework.shell.standard.ShellOption;

@ShellComponent
public class Test {
    @ShellMethod
    void test(@ShellOption String defaultValue){
        System.out.println(defaultValue);
    }
}

and when I run the app i get this:

shell:>test --default-value String
shell:>null

Expected behaviour is that the "String" value should be populated into defaultValue variable in the method parameter

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions