diff options
author | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-07-09 12:56:54 +0200 |
---|---|---|
committer | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-07-09 12:56:54 +0200 |
commit | 65163646205b6e05139485fe957bceabe531f447 (patch) | |
tree | c35c0061a8c7e8ad3f054e632ed6ecfb1fb1b3cc /src/main/java/at/gv/egiz/moazs/scheme | |
parent | 8e36fa01ea42d282eacdc78d6749daf9ae1ede9c (diff) | |
download | moa-zs-65163646205b6e05139485fe957bceabe531f447.tar.gz moa-zs-65163646205b6e05139485fe957bceabe531f447.tar.bz2 moa-zs-65163646205b6e05139485fe957bceabe531f447.zip |
Minor Fixes And Refactoring
- Fix typo in SafeResponseToFileSink.
- MoaZSException: Simplify constructor by replacing lots of arguments
with the builder instance.
- Fix minor codesmells (unused imports, superfluous braces).
Diffstat (limited to 'src/main/java/at/gv/egiz/moazs/scheme')
-rw-r--r-- | src/main/java/at/gv/egiz/moazs/scheme/MsgResponse.java | 10 | ||||
-rw-r--r-- | src/main/java/at/gv/egiz/moazs/scheme/NotificationResponse.java | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/scheme/MsgResponse.java b/src/main/java/at/gv/egiz/moazs/scheme/MsgResponse.java index 699819f..80e2059 100644 --- a/src/main/java/at/gv/egiz/moazs/scheme/MsgResponse.java +++ b/src/main/java/at/gv/egiz/moazs/scheme/MsgResponse.java @@ -19,10 +19,10 @@ public abstract class MsgResponse <T> { return id; } - abstract public T getResponse(); - abstract public String getAppDeliveryID(); - abstract public String getZSDeliveryID(); - abstract public DeliveryAnswerType getAnswer(); - abstract public MsgResponse<T> generateError(MoaZSException exception); + public abstract T getResponse(); + public abstract String getAppDeliveryID(); + public abstract String getZSDeliveryID(); + public abstract DeliveryAnswerType getAnswer(); + public abstract MsgResponse<T> generateError(MoaZSException exception); } diff --git a/src/main/java/at/gv/egiz/moazs/scheme/NotificationResponse.java b/src/main/java/at/gv/egiz/moazs/scheme/NotificationResponse.java index 7670ab7..de1fd38 100644 --- a/src/main/java/at/gv/egiz/moazs/scheme/NotificationResponse.java +++ b/src/main/java/at/gv/egiz/moazs/scheme/NotificationResponse.java @@ -9,7 +9,7 @@ import static at.gv.zustellung.msg.xsd.DeliveryNotificationType.deliveryNotifica public class NotificationResponse extends MsgResponse<DeliveryNotificationType> { private final DeliveryNotificationType notification; - private final static String ID_SUFFIX = ".NO"; + private static final String ID_SUFFIX = ".NO"; public NotificationResponse(DeliveryNotificationType notification) { super.id = createResponseId(notification.getAppDeliveryID(), ID_SUFFIX); @@ -44,14 +44,14 @@ public class NotificationResponse extends MsgResponse<DeliveryNotificationType> public MsgResponse<DeliveryNotificationType> generateError(MoaZSException exception) { //TODO: test this! - var notification = deliveryNotificationTypeBuilder() + var notificationType = deliveryNotificationTypeBuilder() .withAppDeliveryID(exception.getAppDeliveryID()) .withDeliverySystem(exception.getDeliverySystem()) .withGZ(exception.getGz()) .withZSDeliveryID(exception.getZsDeliveryID()) .build(); - return new NotificationResponse(notification); + return new NotificationResponse(notificationType); } } |