[ 
https://issues.apache.org/jira/browse/MRESOLVER-233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17806871#comment-17806871
 ] 

Tamas Cservenak commented on MRESOLVER-233:
-------------------------------------------

I disagree with this change (the original PR): the type of the new instance 
some methods return contextually depend on current type. For example 
SubArtifact.setVersion should NOT return (unmodified) subArtifact with modified 
mainArtifact, as in that case we do not talk about subArtifact anymore, but 
completely different GAVCE. 
In essence, these types are ONLY to help you construct coordinates, it is _very 
very rare_ when actual type is needed (only example I know is 
RelocatedArtifact, that is cast in core only to get message).

> Add protected abstract org.e.a.artifact.AbstractArtifact.newInstance()
> ----------------------------------------------------------------------
>
>                 Key: MRESOLVER-233
>                 URL: https://issues.apache.org/jira/browse/MRESOLVER-233
>             Project: Maven Resolver
>          Issue Type: Task
>          Components: Resolver
>    Affects Versions: 1.7.3
>            Reporter: Michael Osipov
>            Priority: Major
>             Fix For: 2.0.0
>
>
> This method has two issues:
> * It lacks abstraction that it relies on a subtype which should be unknown 
> here
> * with an abstract method every derived type can properly return again a 
> derived type instead of having {{DefaultArtifact}} which loses details.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to