KEYCLOAK-12236 NumberFormatException when starting container (#6689)

This commit is contained in:
Vlasta Ramik 2020-01-22 20:44:23 +01:00 committed by Marek Posolda
parent 47d6d65bbb
commit d6c5f79f2c

View file

@ -38,9 +38,9 @@ public class ModelVersion {
} }
public ModelVersion(String version) { public ModelVersion(String version) {
if (version.endsWith("-SNAPSHOT") || version.endsWith("-snapshot")) { if (version.toUpperCase().contains("-SNAPSHOT")) {
snapshot = true; snapshot = true;
version = version.substring(0, version.length() - 9); version = version.toUpperCase().split("-SNAPSHOT")[0];
} }
String[] split = version.split("\\."); String[] split = version.split("\\.");