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()); body.getDebitorRel().setType(DEBITOR.name());
final var debitorRel = mapper.map(body.getDebitorRel(), HsOfficeRelationEntity.class); final var debitorRel = mapper.map(body.getDebitorRel(), HsOfficeRelationEntity.class);
entityToSave.setDebitorRel(relRepo.save(debitorRel)); entityToSave.setDebitorRel(relRepo.save(debitorRel));
// FIXME em.flush();
} else { } else {
final var debitorRelOptional = relRepo.findByUuid(body.getDebitorRelUuid()); final var debitorRelOptional = relRepo.findByUuid(body.getDebitorRelUuid());
debitorRelOptional.ifPresentOrElse( debitorRelOptional.ifPresentOrElse(

View File

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