This is an automated email from the git hooks/post-receive script. New commit to branch feature/657_update_to_flyway_5 in repository topia. See https://gitlab.nuiton.org/nuiton/topia.git commit cf32b4522a52fb5db7667f4156e80ac40cf69013 Author: Brendan Le Ny <bleny@codelutin.com> Date: Mon Jan 8 15:26:03 2018 +0100 Passes use of deprecated configuration directive from warn to error --- .../nuiton/topia/flyway/TopiaFlywayServiceImpl.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/topia-service-flyway/src/main/java/org/nuiton/topia/flyway/TopiaFlywayServiceImpl.java b/topia-service-flyway/src/main/java/org/nuiton/topia/flyway/TopiaFlywayServiceImpl.java index a0c268b3..dab436eb 100644 --- a/topia-service-flyway/src/main/java/org/nuiton/topia/flyway/TopiaFlywayServiceImpl.java +++ b/topia-service-flyway/src/main/java/org/nuiton/topia/flyway/TopiaFlywayServiceImpl.java @@ -40,6 +40,7 @@ import org.flywaydb.core.internal.util.Location; import org.nuiton.topia.persistence.TopiaApplicationContext; import org.nuiton.topia.persistence.TopiaException; import org.nuiton.topia.persistence.TopiaMigrationServiceException; +import org.nuiton.topia.persistence.TopiaMisconfigurationException; import org.nuiton.topia.persistence.jdbc.JdbcConfiguration; import java.io.IOException; @@ -77,6 +78,13 @@ public class TopiaFlywayServiceImpl implements TopiaFlywayService { @Override public void initTopiaService(TopiaApplicationContext topiaApplicationContext, Map<String, String> serviceConfiguration) { + if (serviceConfiguration.containsKey(FLYWAY_INIT_VERSION)) { + if (log.isErrorEnabled()) { + log.error(FLYWAY_INIT_VERSION + " is deprecated, use " + FLYWAY_BASELINE_VERSION + " instead"); + } + throw new TopiaMisconfigurationException(FLYWAY_INIT_VERSION + " is deprecated, use " + FLYWAY_BASELINE_VERSION + " instead", topiaApplicationContext.getConfiguration()); + } + modelVersion = topiaApplicationContext.getModelVersion(); // set flywayBaselineVersion if provided @@ -85,14 +93,6 @@ public class TopiaFlywayServiceImpl implements TopiaFlywayService { if (StringUtils.isBlank(flywayBaselineVersion)) { throw new IllegalArgumentException("'" + FLYWAY_BASELINE_VERSION + "' must not be empty"); } - } else if (serviceConfiguration.containsKey(FLYWAY_INIT_VERSION)) { - if (log.isWarnEnabled()) { - log.warn(FLYWAY_INIT_VERSION + " is deprecated, use " + FLYWAY_BASELINE_VERSION + " instead"); - } - flywayBaselineVersion = serviceConfiguration.get(FLYWAY_INIT_VERSION); - if (StringUtils.isBlank(flywayBaselineVersion)) { - throw new IllegalArgumentException("'" + FLYWAY_INIT_VERSION + "' must not be empty"); - } } // set useModelVersion if provided @@ -207,7 +207,7 @@ public class TopiaFlywayServiceImpl implements TopiaFlywayService { // Use model version, flywayInitVersion should not be specified Preconditions.checkState(Strings.isNullOrEmpty(flywayBaselineVersion), - FLYWAY_INIT_VERSION + " is not not compatible with " + USE_MODEL_VERSION + "=true"); + FLYWAY_BASELINE_VERSION + " is not not compatible with " + USE_MODEL_VERSION + "=true"); if (log.isInfoEnabled()) { log.info("Using model version: " + modelVersion); -- To stop receiving notification emails like this one, please contact nuiton.org SCM administrator <admin+scm@nuiton.org>.