jglick commented on a change in pull request #225: [MNG-6405] Fix basedir in 
MavenProject.deepCopy
URL: https://github.com/apache/maven/pull/225#discussion_r275381954
 
 
 ##########
 File path: maven-core/src/main/java/org/apache/maven/project/MavenProject.java
 ##########
 @@ -1207,7 +1207,8 @@ private void deepCopy( MavenProject project )
         // disown the parent
 
         // copy fields
-        setFile( project.getFile() );
+        file = project.file;
+        basedir = project.basedir;
 
 Review comment:
   Note that these assignments are actually unnecessary when called from 
`clone`, since the fields are already set correctly by `super.clone`. They 
would however be needed if called from `MavenProject.<init>(MavenProject)`; 
since that copy constructor is apparently neither called anywhere in Maven 
itself nor tested, I wonder if it even works.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to