Compare commits

...

2 Commits

Author SHA1 Message Date
Michael Hoennig
78ecf98913 remove unnecessary try/catch 2024-03-23 11:46:08 +01:00
Michael Hoennig
b75e0c9dd6 remove uncommented code 2024-03-23 11:43:49 +01:00
2 changed files with 8 additions and 13 deletions

View File

@ -83,7 +83,6 @@ public class HsOfficeDebitorController implements HsOfficeDebitorsApi {
body.getDebitorRel().setType(DEBITOR.name());
final var debitorRel = mapper.map(body.getDebitorRel(), HsOfficeRelationEntity.class);
entityToSave.setDebitorRel(relRepo.save(debitorRel));
// FIXME em.flush();
} else {
final var debitorRelOptional = relRepo.findByUuid(body.getDebitorRelUuid());
debitorRelOptional.ifPresentOrElse(

View File

@ -109,17 +109,13 @@ public class StringWriter {
}
String apply(final String textToAppend) {
try {
text = textToAppend;
stream(varDefs).forEach(varDef -> {
final var pattern = Pattern.compile("\\$\\{" + varDef.name() + "}", Pattern.CASE_INSENSITIVE);
final var matcher = pattern.matcher(text);
text = matcher.replaceAll(varDef.value());
});
return text;
} catch (final RuntimeException exc) {
throw exc; // FIXME: just for debugging, remove try/catch before merging to master
}
}
text = textToAppend;
stream(varDefs).forEach(varDef -> {
final var pattern = Pattern.compile("\\$\\{" + varDef.name() + "}", Pattern.CASE_INSENSITIVE);
final var matcher = pattern.matcher(text);
text = matcher.replaceAll(varDef.value());
});
return text;
}
}
}