This is an automated email from the ASF dual-hosted git repository. cstamas pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-resolver.git
The following commit(s) were added to refs/heads/master by this push: new c9031cb2 [MRESOLVER-515] Restore binary compatibility (#446) c9031cb2 is described below commit c9031cb2b6d0573b2c7dd8ecb5ea8e8a4776ec25 Author: Tamas Cservenak <ta...@cservenak.net> AuthorDate: Mon Mar 18 17:39:45 2024 +0100 [MRESOLVER-515] Restore binary compatibility (#446) In cases when AbstractArtifact was extended, the getPath method would go missing. --- https://issues.apache.org/jira/browse/MRESOLVER-515 --- .../main/java/org/eclipse/aether/artifact/AbstractArtifact.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/maven-resolver-api/src/main/java/org/eclipse/aether/artifact/AbstractArtifact.java b/maven-resolver-api/src/main/java/org/eclipse/aether/artifact/AbstractArtifact.java index b204069f..3488ae85 100644 --- a/maven-resolver-api/src/main/java/org/eclipse/aether/artifact/AbstractArtifact.java +++ b/maven-resolver-api/src/main/java/org/eclipse/aether/artifact/AbstractArtifact.java @@ -96,6 +96,15 @@ public abstract class AbstractArtifact implements Artifact { return newInstance(version, getProperties(), getPath()); } + /** + * This method should (and in Resolver is) overridden, but is kept just to preserve backward compatibility if + * this class is extended somewhere. + */ + public Path getPath() { + File file = getFile(); + return file != null ? file.toPath() : null; + } + @Deprecated @Override public Artifact setFile(File file) {