fix: Minecraft 1.20 crashing the semver parser #12
|
@ -30,7 +30,7 @@ public record SemVerImpl(int major, int minor, int patch, String prerelease, Str
|
||||||
int minor = Integer.parseInt(matcher.group("minor"));
|
int minor = Integer.parseInt(matcher.group("minor"));
|
||||||
// minecraft treats the `patch` component as optional...
|
// minecraft treats the `patch` component as optional...
|
||||||
@Nullable String patchString = matcher.group("patch");
|
@Nullable String patchString = matcher.group("patch");
|
||||||
int patch = patchString == null ? 0 : Integer.parseInt(matcher.group("patch"));
|
int patch = patchString == null ? 0 : Integer.parseInt(patchString);
|
||||||
String prerelease = matcher.group("prerelease");
|
String prerelease = matcher.group("prerelease");
|
||||||
String buildmetadata = matcher.group("buildmetadata");
|
String buildmetadata = matcher.group("buildmetadata");
|
||||||
return new SemVerImpl(major, minor, patch, prerelease, buildmetadata);
|
return new SemVerImpl(major, minor, patch, prerelease, buildmetadata);
|
||||||
|
|
Loading…
Reference in a new issue