1
0
mirror of https://github.com/pcvolkmer/onkostar-plugin-dnpm.git synced 2025-07-02 01:02:55 +00:00

refactor: replace assert with explicit check

This commit is contained in:
2024-09-11 14:31:23 +02:00
parent 1470dcebec
commit 30c1d42f08

View File

@ -18,12 +18,15 @@ public class MrMtbAnmeldungToProtocolMapper implements ProcedureToProtocolMapper
/**
* Wandelt eine Prozedur mit Formularnamen "MR.MTB_Anmeldung" in ein {@link Optional} mit einer
* Zeichenkette oder im Fehlerfall in ein leeres Optional um.
*
* @param procedure Die Prozedur, für die eine Zusammenfassung ermittelt werden soll.
* @return Das {@link Optional} mit, im Erfolgsfall, der Zusammenfassung für die Prozedur.
*/
@Override
public Optional<String> apply(Procedure procedure) {
assert (procedure.getFormName().equals("MR.MTB_Anmeldung"));
if ((!procedure.getFormName().equals("MR.MTB_Anmeldung"))) {
throw new AssertionError("Procedure is not of form type 'MR.MTB_Anmeldung'");
}
var resultParts = new ArrayList<String>();