java 8 syntax improvements

This commit is contained in:
Andreas Billmann
2015-03-26 23:20:17 +01:00
parent 144c7d6b86
commit e08dae2eed

View File

@@ -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);
}
} }
} }