Github user Tibor17 commented on the pull request:

    https://github.com/apache/maven/pull/34#issuecomment-68410326
  
    I wante to have final field o `MavenProject#dependencyArtifacts`, but in 
that case two tests would fail due to 
`DefaultProjectDependenciesResolver#process()` iterates over empty collection.
    
    The solution for the first test would be to compare hashCodes of 
collections in `DependencyContext#isResolutionRequiredForCurrentProject()`.
    
    Generally the domain model is excellent, but the implementation is totally 
open and really terrible.
    The worst is that open implementation can change the status of objects by 
any plugin, it can set any collection and share the instance in whole Maven. 
The collections are not thread-safe. The methods hashCode/equals are not 
autogenerated and we have to compare collections by identity `==`.
    The models should be immutable and plugins should inject services modifying 
the models with no setters. The setters should be in separate interface as a 
hint used by binternal builders as a hint over a constructor with thousands of 
params.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to