diff options
author | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-05-13 09:27:39 +0200 |
---|---|---|
committer | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-05-13 09:27:39 +0200 |
commit | 9ecfae00dd37592b1e5fdeebb2ab0b8e9129b873 (patch) | |
tree | ba6291e0a4874808826307ad83011da1de540d16 /src/main | |
parent | cf817bfa1685fc5f1e893f3c8081ee5b4ab55264 (diff) | |
download | moa-zs-9ecfae00dd37592b1e5fdeebb2ab0b8e9129b873.tar.gz moa-zs-9ecfae00dd37592b1e5fdeebb2ab0b8e9129b873.tar.bz2 moa-zs-9ecfae00dd37592b1e5fdeebb2ab0b8e9129b873.zip |
Refactor and Format Fixes in Mzs2MsgConverter
- Fix: Replace MessageFormat.format with String.format
- Refactor: Use Method Reference
- Add Todo Item
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/at/gv/egiz/moazs/scheme/Mzs2MsgConverter.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/scheme/Mzs2MsgConverter.java b/src/main/java/at/gv/egiz/moazs/scheme/Mzs2MsgConverter.java index f7157da..751f564 100644 --- a/src/main/java/at/gv/egiz/moazs/scheme/Mzs2MsgConverter.java +++ b/src/main/java/at/gv/egiz/moazs/scheme/Mzs2MsgConverter.java @@ -53,7 +53,7 @@ public class Mzs2MsgConverter { private DeliveryRequestTypeBuilder setupBuilder(at.gv.zustellung.app2mzs.xsd.DeliveryRequestType mzsRequest) { return deliveryRequestTypeBuilder() - .withVersion("2.0.0") + .withVersion("2.0.0") //todo: remove hardcoded version .withSender(convert(mzsRequest.getSender())) .withMetaData(mzsRequest.getMetaData()) .withAttachments(convertPayloads(mzsRequest.getPayload())); @@ -159,7 +159,7 @@ public class Mzs2MsgConverter { } else if (address instanceof at.gv.zustellung.app2mzs.xsd.persondata.PostalAddressType ) { return convert((at.gv.zustellung.app2mzs.xsd.persondata.PostalAddressType) address); } else if (address instanceof at.gv.zustellung.app2mzs.xsd.persondata.TelephoneAddressType) { return convert((at.gv.zustellung.app2mzs.xsd.persondata.TelephoneAddressType) address); } else { - throw new IllegalArgumentException(format("No conversion strategy of address of type {0}", address.getClass().toGenericString())); + throw new IllegalArgumentException(format("No conversion strategy of address of type=%s.", address.getClass().toGenericString())); } } @@ -303,7 +303,7 @@ public class Mzs2MsgConverter { private List<Affix> convertAffixes(List<at.gv.zustellung.app2mzs.xsd.persondata.PersonNameType.Affix> affix) { return affix.stream() - .map(mzsAffix -> convert(mzsAffix)) + .map(this::convert) .collect(toList()); } |