From 0a316ada10bb88720dd15958168409fcb9fcf800 Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Thu, 23 May 2019 11:21:24 +0200 Subject: Refactor: Cleanup Codesmells - Remove unused imports, commented code and copy-pasted code --- pom.xml | 7 ------- src/main/java/at/gv/egiz/moazs/mzs/MzsClient.java | 1 - src/main/java/at/gv/egiz/moazs/mzs/MzsService.java | 3 --- .../java/at/gv/egiz/moazs/pipeline/SameThreadDeliveryPipeline.java | 3 +-- .../java/at/gv/egiz/moazs/repository/RedisDeliveryRepository.java | 7 ++++--- 5 files changed, 5 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index f2724c7..716e901 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,6 @@ 2.3.1 1.1 2.9.3 - 27.1-jre 1.5 0.8.3 @@ -97,12 +96,6 @@ javax.jws-api ${jwsapi.version} - - - - - - diff --git a/src/main/java/at/gv/egiz/moazs/mzs/MzsClient.java b/src/main/java/at/gv/egiz/moazs/mzs/MzsClient.java index 295d11a..980dce1 100644 --- a/src/main/java/at/gv/egiz/moazs/mzs/MzsClient.java +++ b/src/main/java/at/gv/egiz/moazs/mzs/MzsClient.java @@ -1,7 +1,6 @@ package at.gv.egiz.moazs.mzs; import at.gv.zustellung.app2mzs.xsd.DeliveryResponseType; -import at.gv.zustellung.msg.xsd.DeliveryRequestStatusType; import org.springframework.stereotype.Component; @Component diff --git a/src/main/java/at/gv/egiz/moazs/mzs/MzsService.java b/src/main/java/at/gv/egiz/moazs/mzs/MzsService.java index e031b0b..bb927ba 100644 --- a/src/main/java/at/gv/egiz/moazs/mzs/MzsService.java +++ b/src/main/java/at/gv/egiz/moazs/mzs/MzsService.java @@ -5,12 +5,9 @@ import at.gv.egiz.moazs.pipeline.DeliveryPipeline; import at.gv.egiz.moazs.preprocess.DeliveryRequestAugmenter; import at.gv.egiz.moazs.repository.DeliveryRepository; import at.gv.egiz.moazs.scheme.Msg2MzsConverter; -import at.gv.egiz.moazs.scheme.Mzs2MsgConverter; import at.gv.zustellung.app2mzs.xsd.App2MzsPortType; import at.gv.zustellung.app2mzs.xsd.DeliveryRequestType; import at.gv.zustellung.app2mzs.xsd.DeliveryResponseType; -import at.gv.zustellung.app2mzs.xsd.PartialSuccessType; -import at.gv.zustellung.msg.xsd.DeliveryAnswerType; import at.gv.zustellung.msg.xsd.DeliveryRequestStatusType; import org.apache.cxf.annotations.SchemaValidation; import org.slf4j.Logger; diff --git a/src/main/java/at/gv/egiz/moazs/pipeline/SameThreadDeliveryPipeline.java b/src/main/java/at/gv/egiz/moazs/pipeline/SameThreadDeliveryPipeline.java index bfd05b2..a0475fd 100644 --- a/src/main/java/at/gv/egiz/moazs/pipeline/SameThreadDeliveryPipeline.java +++ b/src/main/java/at/gv/egiz/moazs/pipeline/SameThreadDeliveryPipeline.java @@ -1,11 +1,10 @@ package at.gv.egiz.moazs.pipeline; -import at.gv.egiz.moazs.msg.MsgClient; import at.gv.egiz.moazs.msg.MsgClientFactory; -import at.gv.egiz.moazs.tnvz.TnvzClient; import at.gv.egiz.moazs.repository.DeliveryRepository; import at.gv.egiz.moazs.scheme.Mzs2MsgConverter; +import at.gv.egiz.moazs.tnvz.TnvzClient; import at.gv.zustellung.app2mzs.xsd.DeliveryRequestType; import at.gv.zustellung.app2mzs.xsd.DeliveryRequestType.Payload; import at.gv.zustellung.msg.xsd.persondata.IdentificationType; diff --git a/src/main/java/at/gv/egiz/moazs/repository/RedisDeliveryRepository.java b/src/main/java/at/gv/egiz/moazs/repository/RedisDeliveryRepository.java index 4ffe85d..27b780f 100644 --- a/src/main/java/at/gv/egiz/moazs/repository/RedisDeliveryRepository.java +++ b/src/main/java/at/gv/egiz/moazs/repository/RedisDeliveryRepository.java @@ -23,6 +23,7 @@ public class RedisDeliveryRepository implements DeliveryRepository { private static final Logger logger = LoggerFactory.getLogger(RedisDeliveryRepository.class); private static final String KEY = "MZS_DELIVERY_REQUEST"; + private static final String NOT_IMPLEMENTED_MESSAGE = "Not Implemented Yet"; private final RedisTemplate redisTemplate; private final Marshaller marshaller; @@ -62,17 +63,17 @@ public class RedisDeliveryRepository implements DeliveryRepository { @Override public void add(DeliveryRequestStatusType status) { - throw new UnsupportedOperationException("Not Implemented Yet"); + throw new UnsupportedOperationException(NOT_IMPLEMENTED_MESSAGE); } @Override public Optional getDeliveryRequestStatus(String appDeliveryID) { - throw new UnsupportedOperationException("Not Implemented Yet"); + throw new UnsupportedOperationException(NOT_IMPLEMENTED_MESSAGE); } @Override public void addSignedDeliveryRequestStatus(byte[] bytes, String appDeliveryId) { - throw new UnsupportedOperationException("Not Implemented Yet"); + throw new UnsupportedOperationException(NOT_IMPLEMENTED_MESSAGE); } @Override -- cgit v1.2.3