Skip to content

Cannot pass negative number as option #651

Closed
@amoffet

Description

@amoffet

Given:

@ShellMethod("Add array numbers.")
public double addDoubles(@ShellOption(arity = 3) double[] numbers) {
return Arrays.stream(numbers).sum();
}

try
add-doubles 1.2 -2.1 4.4
or
add-doubles 1.2 "-2.1" 4.4

The returned error is "Unrecognised option '-2.1'"

It doesn't matter if you explicitly name an option. There must be a way to do this...

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions