Starting from 2021-07-01, all LRZ GitLab users will be required to explicitly accept the GitLab Terms of Service. Please see the detailed information at https://doku.lrz.de/display/PUBLIC/GitLab and make sure that your projects conform to the requirements.

Commit ecbfd11a authored by Stefan Schuhbaeck's avatar Stefan Schuhbaeck
Browse files

remove unneeded exception handling

parent e85cb91f
......@@ -112,12 +112,7 @@ public class JoltMigrationAssistant extends MigrationAssistant {
}
public JsonNode transform(JsonNode currentJson, Version targetVersion) throws MigrationException {
try {
return transform(StateJsonConverter.convertJsonNodeToObject(currentJson), targetVersion);
} catch (IOException e) {
logger.error("Error in converting JsonNode To Map of Object representation");
throw new MigrationException("Error in converting JsonNode To Map of Object representation", e);
}
return transform(StateJsonConverter.convertJsonNodeToObject(currentJson), targetVersion);
}
private JsonNode transform(Object currentJson, Version targetVersion) throws MigrationException {
......@@ -159,7 +154,7 @@ public class JoltMigrationAssistant extends MigrationAssistant {
if (node.get("release") != null) {
version = Version.fromString(node.get("release").asText());
if (version == null || version.equalOrSamller(Version.NOT_A_RELEASE)) {
if (version == null || version.equalOrSamller(Version.UNDEFINED)) {
logger.error("release version " + node.get("release").asText() + " is unknown or not " +
"supported. If this is a valid release create a version transformation and a new idenity transformation");
throw new MigrationException("release version " + node.get("release").asText() + " is unknown or not " +
......
......@@ -86,7 +86,7 @@ public abstract class StateJsonConverter {
return mapper.readValue(dev, mapTypeReference);
}
public static Object convertJsonNodeToObject(JsonNode node) throws IOException {
public static Object convertJsonNodeToObject(JsonNode node) {
return mapper.convertValue(node, Map.class);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment