MPLUGIN-60: MavenProjectStub uses immutable collections for modifiable data
o using another way instead of the proposed patch git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@613484 13f79535-47bb-0310-9956-ffa450edef68master
parent
aaeae9dabf
commit
214eb5c9cd
|
|
@ -22,6 +22,7 @@ package org.apache.maven.plugin.testing.stubs;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
@ -323,7 +324,7 @@ public class MavenProjectStub
|
||||||
{
|
{
|
||||||
if ( compileSourceRoots == null )
|
if ( compileSourceRoots == null )
|
||||||
{
|
{
|
||||||
compileSourceRoots = Collections.singletonList( string );
|
compileSourceRoots = new ArrayList( Collections.singletonList( string ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -338,7 +339,7 @@ public class MavenProjectStub
|
||||||
{
|
{
|
||||||
if ( scriptSourceRoots == null )
|
if ( scriptSourceRoots == null )
|
||||||
{
|
{
|
||||||
scriptSourceRoots = Collections.singletonList( string );
|
scriptSourceRoots = new ArrayList( Collections.singletonList( string ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -353,7 +354,7 @@ public class MavenProjectStub
|
||||||
{
|
{
|
||||||
if ( testCompileSourceRoots == null )
|
if ( testCompileSourceRoots == null )
|
||||||
{
|
{
|
||||||
testCompileSourceRoots = Collections.singletonList( string );
|
testCompileSourceRoots = new ArrayList( Collections.singletonList( string ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1393,7 +1394,7 @@ public class MavenProjectStub
|
||||||
{
|
{
|
||||||
if ( attachedArtifacts == null )
|
if ( attachedArtifacts == null )
|
||||||
{
|
{
|
||||||
this.attachedArtifacts = Collections.singletonList( artifact );
|
this.attachedArtifacts = new ArrayList( Collections.singletonList( artifact ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue