mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-08-03 11:26:38 -04:00
Revert "fix: Version.jar should be resolved to id of self if null instead of the id of ancestor.". Closes #934.
This reverts commit 5de150b06e85603d6e34ee3db29ad6e285394d66.
This commit is contained in:
parent
0d69e944f6
commit
5f8f01e0ab
1
.gitignore
vendored
1
.gitignore
vendored
@ -45,3 +45,4 @@ NVIDIA
|
||||
|
||||
# test
|
||||
/hmcl.json
|
||||
/.hmcl.json
|
||||
|
@ -163,7 +163,7 @@ public class Version implements Comparable<Version>, Validation {
|
||||
}
|
||||
|
||||
public String getJar() {
|
||||
return jar == null ? id : jar;
|
||||
return jar;
|
||||
}
|
||||
|
||||
public String getInheritsFrom() {
|
||||
@ -275,14 +275,14 @@ public class Version implements Comparable<Version>, Validation {
|
||||
|
||||
if (inheritsFrom == null) {
|
||||
if (isRoot())
|
||||
thisVersion = new Version(id).setPatches(patches);
|
||||
thisVersion = new Version(id).setPatches(patches).setJar(id);
|
||||
else
|
||||
thisVersion = this;
|
||||
thisVersion = this.jar == null ? this.setJar(id) : this;
|
||||
} else {
|
||||
// To maximize the compatibility.
|
||||
if (!resolvedSoFar.add(id)) {
|
||||
Logging.LOG.log(Level.WARNING, "Found circular dependency versions: " + resolvedSoFar);
|
||||
thisVersion = this;
|
||||
thisVersion = this.jar == null ? this.setJar(id) : this;
|
||||
} else {
|
||||
// It is supposed to auto install an version in getVersion.
|
||||
thisVersion = merge(provider.getVersion(inheritsFrom).resolve(provider, resolvedSoFar), false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user