Avoid duplicating parsing logic in ModelVersion
This now allows handling of the 999-SNAPSHOT version. Closes #10879
This commit is contained in:
parent
6efa45f93e
commit
78549fe024
1 changed files with 2 additions and 1 deletions
|
@ -25,6 +25,7 @@ import org.keycloak.common.Version;
|
|||
import org.keycloak.common.util.Time;
|
||||
import org.keycloak.connections.jpa.JpaConnectionProvider;
|
||||
import org.keycloak.migration.MigrationModel;
|
||||
import org.keycloak.migration.ModelVersion;
|
||||
import org.keycloak.models.ClientProvider;
|
||||
import org.keycloak.models.ClientScopeProvider;
|
||||
import org.keycloak.models.Constants;
|
||||
|
@ -57,7 +58,7 @@ public class MigrationModelTest extends KeycloakModelTest {
|
|||
public void test() {
|
||||
inComittedTransaction(1, (session , i) -> {
|
||||
|
||||
String currentVersion = Version.VERSION_KEYCLOAK.replaceAll("^(\\d+(?:\\.\\d+){0,2}).*$", "$1");
|
||||
String currentVersion = new ModelVersion(Version.VERSION_KEYCLOAK).toString();
|
||||
|
||||
JpaConnectionProvider p = session.getProvider(JpaConnectionProvider.class);
|
||||
EntityManager em = p.getEntityManager();
|
||||
|
|
Loading…
Reference in a new issue