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 { ...@@ -112,12 +112,7 @@ public class JoltMigrationAssistant extends MigrationAssistant {
} }
public JsonNode transform(JsonNode currentJson, Version targetVersion) throws MigrationException { public JsonNode transform(JsonNode currentJson, Version targetVersion) throws MigrationException {
try { return transform(StateJsonConverter.convertJsonNodeToObject(currentJson), targetVersion);
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);
}
} }
private JsonNode transform(Object currentJson, Version targetVersion) throws MigrationException { private JsonNode transform(Object currentJson, Version targetVersion) throws MigrationException {
...@@ -159,7 +154,7 @@ public class JoltMigrationAssistant extends MigrationAssistant { ...@@ -159,7 +154,7 @@ public class JoltMigrationAssistant extends MigrationAssistant {
if (node.get("release") != null) { if (node.get("release") != null) {
version = Version.fromString(node.get("release").asText()); 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 " + 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"); "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 " + throw new MigrationException("release version " + node.get("release").asText() + " is unknown or not " +
......
...@@ -86,7 +86,7 @@ public abstract class StateJsonConverter { ...@@ -86,7 +86,7 @@ public abstract class StateJsonConverter {
return mapper.readValue(dev, mapTypeReference); 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); 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