Skip to content

Add type parameter for Command interface #1273

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kwin
Copy link
Member

@kwin kwin commented Jul 30, 2025

Strong typing of Command's response type
This closes #1272

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Your pull request should address just one issue, without pulling in other changes.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body.
    Note that commits might be squashed by a maintainer on merge.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
    This may not always be possible but is a best-practice.
  • Run mvn verify to make sure basic checks pass.
    A more thorough check will be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its verify).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@kwin kwin requested a review from olamy July 30, 2025 17:27
@kwin kwin force-pushed the feature/command-with-generics branch from 66a85a7 to c8d1794 Compare July 30, 2025 17:28
*/
public interface Command {
public interface Command<T extends ScmResult> {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@olamy Is this backwards-compatible enough? It won't affect consumers as ScmProvider does not use this. I consider this a SPI only interface (so only https://github.com/olamy/maven-scm-provider-svnjava would be affected).

@kwin kwin force-pushed the feature/command-with-generics branch from c8d1794 to c349593 Compare July 30, 2025 17:37
Strong typing of Command's response type
This closes #1272
@kwin kwin force-pushed the feature/command-with-generics branch from c349593 to d6391e4 Compare July 30, 2025 17:37
@kwin kwin requested a review from michael-o July 30, 2025 18:33
@kwin kwin marked this pull request as ready for review August 1, 2025 09:53
@michael-o michael-o removed their request for review August 2, 2025 21:37
@elharo
Copy link
Contributor

elharo commented Aug 6, 2025

can you resolve the conflicts?

@kwin
Copy link
Member Author

kwin commented Aug 6, 2025

can you resolve the conflicts?

Only once I have someone's confirmation that this is something we can/should do in a minor version upgrade.

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

Successfully merging this pull request may close these issues.

Use Generics in Command and derived classes
2 participants