Use Generics in Command and derived classes
- Dominant language
- Java
- Stars
- 104
- Forks
- 189
- Avg merge
- 17h 46m
- Merged PRs (30d)
- 6
Description
### New feature, improvement proposal
Currently the `org.apache.maven.scm.command.Command` interface does not leverage generics which leads to the fact that its execute methods just returns the generic `ScmResult` instead of the command specific result classes. This requires some casting in the code (e.g. in https://github.com/apache/maven-scm/blob/6fc20f710675bd78394633ecaab39a651e89b7cd/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/src/main/java/org/apache/maven/scm/provider/git/AbstractGitScmProvider.java#L170). Introducing a type variable for the return type of its `execute` method should allow to for more type-safe programming.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.