You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/01/16 09:50:13 UTC

[GitHub] [maven] slawekjaranowski commented on a change in pull request #421: Artifact.getPath() and .setPath()

slawekjaranowski commented on a change in pull request #421:
URL: https://github.com/apache/maven/pull/421#discussion_r558833386



##########
File path: maven-core/src/main/java/org/apache/maven/project/artifact/ActiveProjectArtifact.java
##########
@@ -120,6 +127,12 @@ public void setFile( File destination )
         project.getArtifact().setFile( destination );
     }
 
+    /** {@inheritDoc} */
+    public void setPath( Path path )
+    {
+        this.setFile( path == null ? null : path.toFile() );
+    }
+

Review comment:
       did you override default implementation from interface?

##########
File path: maven-core/src/main/java/org/apache/maven/project/artifact/ActiveProjectArtifact.java
##########
@@ -65,6 +66,12 @@ public File getFile()
         return project.getArtifact().getFile();
     }
 
+    /** {@inheritDoc} */
+    public Path getPath()
+    {
+        return this.getFile() == null ? null : this.getFile().toPath();
+    }
+

Review comment:
       did you override default implementation from interface?

##########
File path: maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
##########
@@ -207,6 +208,16 @@ public File getFile()
         return file;
     }
 
+    public Path getPath()
+    {
+        return this.getFile() == null ? null : this.getFile().toPath();
+    }
+
+    public void setPath( Path path )
+    {
+        this.setFile ( path == null ? null : path.toFile() );
+    }
+

Review comment:
       did you override default implementation from interface?




----------------------------------------------------------------
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:
users@infra.apache.org