java 8 syntax improvements
This commit is contained in:
@@ -72,10 +72,7 @@ public class DatabaseUpdater {
|
|||||||
version++;
|
version++;
|
||||||
url = getUpdateFileUrl(version);
|
url = getUpdateFileUrl(version);
|
||||||
}
|
}
|
||||||
} catch (URISyntaxException e) {
|
} catch (URISyntaxException | IOException e) {
|
||||||
LOGGER.log(Level.SEVERE, "file error", e);
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
} catch (IOException e) {
|
|
||||||
LOGGER.log(Level.SEVERE, "file error", e);
|
LOGGER.log(Level.SEVERE, "file error", e);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
@@ -99,9 +96,7 @@ public class DatabaseUpdater {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<String> statements = extractStatements(lines);
|
List<String> statements = extractStatements(lines);
|
||||||
for (String statement: statements) {
|
statements.forEach(jdbcTemplate::execute);
|
||||||
jdbcTemplate.execute(statement);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user