mirror of https://github.com/apache/maven.git
[MNG-7910] DefaultProfileSelector empty ctor uses immutable list (#1283)
It uses immutable list and while it suggests it allows this below, it actually fails on constructs like this (runtime ONLY): {noformat} new DefaultProfileSelector() .addProfileActivator(new JdkVersionProfileActivator()) .addProfileActivator(new PropertyProfileActivator()) {noformat} As default ctor creates immutable list, but API kinda suggests this is ok. --- https://issues.apache.org/jira/browse/MNG-7910
This commit is contained in:
parent
07db6ec76a
commit
bd608d8cc9
|
@ -24,7 +24,6 @@ import javax.inject.Singleton;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -47,7 +46,7 @@ public class DefaultProfileSelector implements ProfileSelector {
|
|||
private final List<ProfileActivator> activators;
|
||||
|
||||
public DefaultProfileSelector() {
|
||||
this.activators = Collections.emptyList();
|
||||
this.activators = new ArrayList<>();
|
||||
}
|
||||
|
||||
@Inject
|
||||
|
|
Loading…
Reference in New Issue