From c7e363915532e1effda3e609c19c0fc365a41a7d Mon Sep 17 00:00:00 2001 From: huanghongxun Date: Tue, 4 Feb 2020 22:38:59 +0800 Subject: [PATCH] fix: download missing library more than one time --- HMCLCore/src/main/java/org/jackhuang/hmcl/game/Version.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/game/Version.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/game/Version.java index 8a19df160..fd1346304 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/game/Version.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/game/Version.java @@ -217,9 +217,12 @@ public class Version implements Comparable, Validation { } /** - * Resolve given version + * Resolve given version. + * Resolving version will list all patches within this version and its parents, + * which is for analysis. */ public Version resolve(VersionProvider provider) throws VersionNotFoundException { + if (isResolved()) return this; return resolve(provider, new HashSet<>()).setResolved(); }