Fix #644
This commit is contained in:
@@ -127,7 +127,7 @@ public abstract class VersionList<T extends RemoteVersion> {
|
|||||||
* @param remoteVersion the version of the remote version.
|
* @param remoteVersion the version of the remote version.
|
||||||
* @return the specific remote version, null if it is not found.
|
* @return the specific remote version, null if it is not found.
|
||||||
*/
|
*/
|
||||||
public final Optional<T> getVersion(String gameVersion, String remoteVersion) {
|
public Optional<T> getVersion(String gameVersion, String remoteVersion) {
|
||||||
lock.readLock().lock();
|
lock.readLock().lock();
|
||||||
try {
|
try {
|
||||||
T result = null;
|
T result = null;
|
||||||
|
|||||||
@@ -31,10 +31,7 @@ import org.jackhuang.hmcl.util.io.NetworkUtils;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import static org.jackhuang.hmcl.util.Lang.mapOf;
|
import static org.jackhuang.hmcl.util.Lang.mapOf;
|
||||||
import static org.jackhuang.hmcl.util.Pair.pair;
|
import static org.jackhuang.hmcl.util.Pair.pair;
|
||||||
@@ -113,6 +110,12 @@ public final class ForgeBMCLVersionList extends VersionList<ForgeRemoteVersion>
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Optional<ForgeRemoteVersion> getVersion(String gameVersion, String remoteVersion) {
|
||||||
|
remoteVersion = StringUtils.substringAfter(remoteVersion, "-", remoteVersion);
|
||||||
|
return super.getVersion(gameVersion, remoteVersion);
|
||||||
|
}
|
||||||
|
|
||||||
@Immutable
|
@Immutable
|
||||||
public static final class ForgeVersion implements Validation {
|
public static final class ForgeVersion implements Validation {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user