Skip to content

Commit

Permalink
MID-8842 ninja - repository skip version check fix
Browse files Browse the repository at this point in the history
(cherry picked from commit 4a188c4)
  • Loading branch information
1azyman committed Aug 3, 2023
1 parent 9004da8 commit 699989f
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,14 @@ public SqaleRepoContext(
public void initialize() {
// skip version check if option was defined or option value is "true" (equals ignore case)
String skipVersionCheck = System.getProperty(MidpointConfiguration.MIDPOINT_SKIP_VERSION_CHECK + "1");
if ("".equals(skipVersionCheck) || BooleanUtils.isTrue(Boolean.parseBoolean(skipVersionCheck))) {
return;
if (BooleanUtils.isNotTrue(Boolean.parseBoolean(skipVersionCheck))) {
checkDBSchemaVersion();
}

clearCaches();
}

private void checkDBSchemaVersion() {
LOGGER.debug("Checking DB schema version.");

try (JdbcSession session = this.newJdbcSession().startReadOnlyTransaction()) {
Expand All @@ -148,8 +152,6 @@ public void initialize() {

LOGGER.debug("DB schema version check OK.");
}

clearCaches();
}

// This has nothing to do with "repo cache" which is higher than this.
Expand Down

0 comments on commit 699989f

Please sign in to comment.