o Fixed request copying to actually return copy

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@900569 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2010-01-18 21:32:21 +00:00
parent 1d2fd838ce
commit f7c13251e2
2 changed files with 6 additions and 3 deletions

View File

@ -172,7 +172,7 @@ public class DefaultMavenExecutionRequest
copy.setRepositoryCache( original.getRepositoryCache() ); copy.setRepositoryCache( original.getRepositoryCache() );
copy.setNoSnapshotUpdates( original.isNoSnapshotUpdates() ); copy.setNoSnapshotUpdates( original.isNoSnapshotUpdates() );
copy.setExecutionListener( original.getExecutionListener() ); copy.setExecutionListener( original.getExecutionListener() );
return original; return copy;
} }
public String getBaseDirectory() public String getBaseDirectory()

View File

@ -24,13 +24,16 @@ import junit.framework.TestCase;
/** /**
* @author Benjamin Bentmann * @author Benjamin Bentmann
*/ */
public class DefaultMavenExecutionTestCase public class DefaultMavenExecutionTest
extends TestCase extends TestCase
{ {
public void testCopyDefault() public void testCopyDefault()
{ {
assertNotNull( DefaultMavenExecutionRequest.copy( new DefaultMavenExecutionRequest() ) ); MavenExecutionRequest original = new DefaultMavenExecutionRequest();
MavenExecutionRequest copy = DefaultMavenExecutionRequest.copy( original );
assertNotNull( copy );
assertNotSame( copy, original );
} }
} }