Skip to content

Commit

Permalink
cleanup StoreArgumentProcessor
Browse files Browse the repository at this point in the history
  • Loading branch information
HSGamer committed Oct 29, 2023
1 parent b7cf207 commit 6925a4b
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ public StoreArgumentProcessor(ArgumentProcessorBuilder.Input input) {
.map(Boolean::parseBoolean)
.orElse(false);

this.actionApplier = Optional.ofNullable(options.get("action"))
.map(o -> new ActionApplier(input.menu, o))
.orElseGet(() -> new ActionApplier(Collections.emptyList()));
this.actionApplier = new ActionApplier(input.menu, MapUtils.getIfFoundOrDefault(options, Collections.emptyList(), "required-command", "required-action", "action", "command"));

this.suggestions = Optional.ofNullable(MapUtils.getIfFound(options, "suggestion", "suggest"))
.map(CollectionUtils::createStringListFromObject)
Expand Down

0 comments on commit 6925a4b

Please sign in to comment.