Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IExecutionStrategy doc references deprecated CommandLine.execute #1421

Closed
gadeweever opened this issue Aug 30, 2021 · 1 comment
Closed

IExecutionStrategy doc references deprecated CommandLine.execute #1421

gadeweever opened this issue Aug 30, 2021 · 1 comment
Milestone

Comments

@gadeweever
Copy link

Section https://picocli.info/#_initialization_before_execution uses deprecated invocation in return new CommandLine.RunLast().execute(parseResult);.

What is the recommended usage for IExecutionStrategy? Additionally the docs should be updated to include the recommended usage.

@remkop remkop added this to the 4.6.2 milestone Aug 31, 2021
@remkop
Copy link
Owner

remkop commented Aug 31, 2021

Hey you are right! I never noticed that. Thanks for raising that.

It was not my intention to deprecate the execute method, to the contrary, that is the recommended method to use.

I think it became this way because I deprecated AbstractParseResultHandler (the superclass of RunLast), where the execute method is implemented.

I fixed it by overriding the execute method in the subclasses of AbstractParseResultHandler:

// RunAll, RunLast and RunFirst

        /** {@inheritDoc} */
        public int execute(ParseResult parseResult) throws ExecutionException 
        { return super.execute(parseResult); }

This will be part of the next release.

remkop added a commit that referenced this issue Aug 31, 2021
@remkop remkop closed this as completed Aug 31, 2021
MarkoMackic pushed a commit to MarkoMackic/picocli that referenced this issue Oct 17, 2021
MarkoMackic added a commit to MarkoMackic/picocli that referenced this issue Oct 17, 2021
…unLast` should not be deprecated"

This reverts commit a156204.
MarkoMackic added a commit to MarkoMackic/picocli that referenced this issue Oct 17, 2021
…unLast` should not be deprecated"

This reverts commit a156204.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants