[MNG-3400] Implement clone properly following Effective Java' book considerations

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@627935 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Carlos Sanchez Gonzalez 2008-02-15 03:10:09 +00:00
parent 53e9189566
commit 0ca8675e19
1 changed files with 9 additions and 1 deletions

View File

@ -29,7 +29,15 @@ public void execute()
if ( project != null )
{
session.addForkedProject( (MavenProject) project.clone() );
try
{
session.addForkedProject( (MavenProject) project.clone() );
}
catch ( CloneNotSupportedException e )
{
throw new IllegalStateException( "MavenProject instance of class " + project.getClass().getName() +
" does not support clone " );
}
}
}