aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/gv/egiz/moazs/tnvz
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/gv/egiz/moazs/tnvz')
-rw-r--r--src/main/java/at/gv/egiz/moazs/tnvz/TnvzHelper.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/tnvz/TnvzHelper.java b/src/main/java/at/gv/egiz/moazs/tnvz/TnvzHelper.java
index 3599362..f71b992 100644
--- a/src/main/java/at/gv/egiz/moazs/tnvz/TnvzHelper.java
+++ b/src/main/java/at/gv/egiz/moazs/tnvz/TnvzHelper.java
@@ -115,11 +115,6 @@ public class TnvzHelper {
private Sender extractSender(DeliveryRequestType.Sender sender) {
var corporateBody = sender.getCorporateBody();
- if (corporateBody == null) {
- //todo! implement this case
- throw MoaZSException.moaZSException("Not Implemented.");
- }
-
var mzsIdentification = corporateBody.getIdentification().get(0);
var msgIdentification = converter.convert(mzsIdentification);
@@ -135,9 +130,7 @@ public class TnvzHelper {
var builder = receiverBuilder();
- if (receiver.getIdentification() != null) {
- builder.withIdentification(converter.convert(receiver.getIdentification()));
- } else {
+ if (receiver.getIdentification() == null) {
builder
.withPerson(converter.convert(receiver.getPerson()))
.withAustrianAddressesOnly(receiver.getAustrianAddressesOnly());
@@ -149,6 +142,8 @@ public class TnvzHelper {
if (receiver.getPreAdviceNote() != null) {
builder.withNotificationAddressList(receiver.getPreAdviceNote().getNotificationAddressList());
}
+ } else {
+ builder.withIdentification(converter.convert(receiver.getIdentification()));
}
return builder.build();