return new File(base.getAbsoluteFile() + File.separator + sub);
}
private Change parseChangeFromFilename(String filename) {
try {
Change change = new Change();
String[] parts = filename.split("\\.")[0].split("_");
change.setId(new BigDecimal(parts[0]));
StringBuilder builder = new StringBuilder();
for (int i = 1; i < parts.length; i++) {
if (i > 1) builder.append(" ");
builder.append(parts[i]);
}
change.setDescription(builder.toString());
change.setFilename(filename);
return change;
} catch (Exception e) {
throw new MigrationException("Error parsing change from file. Cause: " + e, e);
}
}