[jira] [Commented] (MNG-7999) Review components with unused members
[ https://issues.apache.org/jira/browse/MNG-7999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17804860#comment-17804860 ] ASF GitHub Bot commented on MNG-7999: - cstamas commented on code in PR #1367: URL: https://github.com/apache/maven/pull/1367#discussion_r1446520933 ## maven-core/src/main/java/org/apache/maven/lifecycle/internal/DependencyContext.java: ## @@ -48,7 +43,7 @@ public class DependencyContext { private final Collection scopesToResolveForAggregatedProjects; -private volatile Collection lastDependencyArtifacts = UNRESOLVED; +private volatile Collection lastDependencyArtifacts = new ArrayList<>(); Review Comment: fixed > Review components with unused members > - > > Key: MNG-7999 > URL: https://issues.apache.org/jira/browse/MNG-7999 > Project: Maven > Issue Type: Task > Components: Core >Reporter: Tamas Cservenak >Priority: Major > Fix For: 4.0.x-candidate > > > I found at least two components: > * org/apache/maven/lifecycle/DefaultLifecycleExecutor > * org/apache/maven/lifecycle/internal/LifecycleStarter > but I bet there are more... > Given clients should _inject_ and not manually instantiate components, ctor > changes should be hidden from them (managed by DI). Hence, changes like these > are "safe" as long as client code "plays by the rules". -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MNG-7999) Review components with unused members
[ https://issues.apache.org/jira/browse/MNG-7999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17804857#comment-17804857 ] ASF GitHub Bot commented on MNG-7999: - gnodet commented on code in PR #1367: URL: https://github.com/apache/maven/pull/1367#discussion_r1446515465 ## maven-core/src/main/java/org/apache/maven/lifecycle/internal/DependencyContext.java: ## @@ -48,7 +43,7 @@ public class DependencyContext { private final Collection scopesToResolveForAggregatedProjects; -private volatile Collection lastDependencyArtifacts = UNRESOLVED; +private volatile Collection lastDependencyArtifacts = new ArrayList<>(); Review Comment: `Collections.emptyList()`, as this collection is never written to. > Review components with unused members > - > > Key: MNG-7999 > URL: https://issues.apache.org/jira/browse/MNG-7999 > Project: Maven > Issue Type: Task > Components: Core >Reporter: Tamas Cservenak >Priority: Major > Fix For: 4.0.x-candidate > > > I found at least two components: > * org/apache/maven/lifecycle/DefaultLifecycleExecutor > * org/apache/maven/lifecycle/internal/LifecycleStarter > but I bet there are more... > Given clients should _inject_ and not manually instantiate components, ctor > changes should be hidden from them (managed by DI). Hence, changes like these > are "safe" as long as client code "plays by the rules". -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Commented] (MNG-7999) Review components with unused members
[ https://issues.apache.org/jira/browse/MNG-7999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17804851#comment-17804851 ] ASF GitHub Bot commented on MNG-7999: - cstamas opened a new pull request, #1367: URL: https://github.com/apache/maven/pull/1367 This is an ongoing effort to perform a bit of cleanup in Maven Core and around. No logic changes, just removing unused members, redundant checks, etc. --- https://issues.apache.org/jira/browse/MNG-7999 > Review components with unused members > - > > Key: MNG-7999 > URL: https://issues.apache.org/jira/browse/MNG-7999 > Project: Maven > Issue Type: Task > Components: Core >Reporter: Tamas Cservenak >Priority: Major > Fix For: 4.0.x-candidate > > > I found at least two components: > * org/apache/maven/lifecycle/DefaultLifecycleExecutor > * org/apache/maven/lifecycle/internal/LifecycleStarter > but I bet there are more... > Given clients should _inject_ and not manually instantiate components, ctor > changes should be hidden from them (managed by DI). Hence, changes like these > are "safe" as long as client code "plays by the rules". -- This message was sent by Atlassian Jira (v8.20.10#820010)