maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samael Bate (JIRA)" <>
Subject [jira] [Created] (MPLUGINTESTING-63) AbstractMojoTestCase should return correct type
Date Sun, 11 Aug 2019 19:28:00 GMT
Samael Bate created MPLUGINTESTING-63:

             Summary: AbstractMojoTestCase should return correct type
                 Key: MPLUGINTESTING-63
             Project: Maven Plugin Testing
          Issue Type: Improvement
            Reporter: Samael Bate

the _AbstractMojoTestCase_ class has numerous methods that simply return _Mojo._ An exmaple
of which would be:
protected Mojo lookupConfiguredMojo( MavenProject project, String goal )
    throws Exception
    return lookupConfiguredMojo( newMavenSession( project ), newMojoExecution( goal ) );

It would be to deprecate these methods and replace them with typed equivelant, so the aboce
would become:
protected <T extends Mojo> T lookupConfiguredMojo( MavenProject project, Class<T>
type ){code}
as noted by [~rfscholte] on [github PR 8|],
the name of the goal could be obtained from the Mojo's annotation

This message was sent by Atlassian JIRA

View raw message