fix: Version.jar becomes wrong value after resolvePreservingPatches
This commit is contained in:
@@ -274,10 +274,12 @@ public class Version implements Comparable<Version>, Validation {
|
|||||||
Version thisVersion;
|
Version thisVersion;
|
||||||
|
|
||||||
if (inheritsFrom == null) {
|
if (inheritsFrom == null) {
|
||||||
if (isRoot())
|
if (isRoot()) {
|
||||||
thisVersion = new Version(id).setPatches(patches).setJar(id);
|
thisVersion = new Version(id).setPatches(patches);
|
||||||
else
|
} else {
|
||||||
thisVersion = this.jar == null ? this.setJar(id) : this;
|
thisVersion = this;
|
||||||
|
}
|
||||||
|
thisVersion = this.jar == null ? thisVersion.setJar(id) : thisVersion.setJar(this.jar);
|
||||||
} else {
|
} else {
|
||||||
// To maximize the compatibility.
|
// To maximize the compatibility.
|
||||||
if (!resolvedSoFar.add(id)) {
|
if (!resolvedSoFar.add(id)) {
|
||||||
@@ -333,7 +335,7 @@ public class Version implements Comparable<Version>, Validation {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return thisVersion.setId(id);
|
return thisVersion.setId(id).setJar(resolve(provider).getJar());
|
||||||
}
|
}
|
||||||
|
|
||||||
private Version markAsResolved() {
|
private Version markAsResolved() {
|
||||||
|
|||||||
Reference in New Issue
Block a user