diff options
author | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-10-07 09:37:38 +0200 |
---|---|---|
committer | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-10-07 09:37:38 +0200 |
commit | 4070779c3a035b7a6bc0bdcbeebe69df42abe94b (patch) | |
tree | 151d276d058b157bfdf8a6ee9cbdb0ac109de3a9 | |
parent | 5848ddf9b6145aeaec8b9cb9f7fabf0cb7d8c5ea (diff) | |
download | moa-zs-4070779c3a035b7a6bc0bdcbeebe69df42abe94b.tar.gz moa-zs-4070779c3a035b7a6bc0bdcbeebe69df42abe94b.tar.bz2 moa-zs-4070779c3a035b7a6bc0bdcbeebe69df42abe94b.zip |
Resolve Sonarqube Findings
6 files changed, 4 insertions, 10 deletions
diff --git a/src/main/java/at/gv/egiz/moazs/preprocess/DeliveryRequestAugmenter.java b/src/main/java/at/gv/egiz/moazs/preprocess/DeliveryRequestAugmenter.java index 320b0c3..a54e963 100644 --- a/src/main/java/at/gv/egiz/moazs/preprocess/DeliveryRequestAugmenter.java +++ b/src/main/java/at/gv/egiz/moazs/preprocess/DeliveryRequestAugmenter.java @@ -84,12 +84,10 @@ public class DeliveryRequestAugmenter { trace("Augmented config", augmentedConfig); - var augmentedRequest = deliveryRequestTypeBuilder(request) + return deliveryRequestTypeBuilder(request) .withConfig(augmentedConfig) .build(); - return augmentedRequest; - } private String determineProfileIdFrom(@Nullable ConfigType requestConfig) { diff --git a/src/main/java/at/gv/egiz/moazs/scheme/Msg2MzsConverter.java b/src/main/java/at/gv/egiz/moazs/scheme/Msg2MzsConverter.java index 953b420..0a3afb5 100644 --- a/src/main/java/at/gv/egiz/moazs/scheme/Msg2MzsConverter.java +++ b/src/main/java/at/gv/egiz/moazs/scheme/Msg2MzsConverter.java @@ -24,8 +24,6 @@ package at.gv.egiz.moazs.scheme; import at.gv.zustellung.app2mzs.xsd.DeliveryNotificationType; import at.gv.zustellung.app2mzs.xsd.*; import at.gv.zustellung.msg.xsd.*; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.stereotype.Component; import javax.xml.bind.JAXBElement; 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 51606a0..522bb1d 100644 --- a/src/main/java/at/gv/egiz/moazs/scheme/Mzs2MsgConverter.java +++ b/src/main/java/at/gv/egiz/moazs/scheme/Mzs2MsgConverter.java @@ -25,7 +25,6 @@ import at.gv.zustellung.msg.xsd.*; import at.gv.zustellung.msg.xsd.DeliveryRequestType.DeliveryRequestTypeBuilder; import at.gv.zustellung.msg.xsd.persondata.*; import org.springframework.stereotype.Component; -import org.springframework.util.Assert; import javax.xml.bind.JAXBElement; import java.util.List; 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 c1a91c5..303acab 100644 --- a/src/main/java/at/gv/egiz/moazs/scheme/NotificationResponse.java +++ b/src/main/java/at/gv/egiz/moazs/scheme/NotificationResponse.java @@ -28,7 +28,6 @@ import at.gv.zustellung.msg.xsd.ErrorInfoType; import at.gv.zustellung.msg.xsd.ObjectFactory; import javax.xml.bind.JAXBElement; -import java.util.List; import java.util.Optional; import java.util.concurrent.CompletableFuture; diff --git a/src/main/java/at/gv/egiz/moazs/service/MzsService.java b/src/main/java/at/gv/egiz/moazs/service/MzsService.java index 9d7cdb1..d9c81f3 100644 --- a/src/main/java/at/gv/egiz/moazs/service/MzsService.java +++ b/src/main/java/at/gv/egiz/moazs/service/MzsService.java @@ -62,7 +62,7 @@ public class MzsService implements App2MzsPortType { "with AppDeliveryID=%s."; private static final String RESPONSE_MISSING_ERROR_MSG = "Could not get a response for AppDeliveryID=%s."; private static final String SERVICE_TIME_OUT_REACHED_MSG = "Backend processing for DeliveryRequest with " + - "AppDeliveryID=%s timed out. "; + "AppDeliveryID={} timed out. "; private final DeliveryRepository repository; private final Consumer<String> backend; @@ -136,7 +136,7 @@ public class MzsService implements App2MzsPortType { private DeliveryResponseType applySinkHubToAsyncResponse(String appDeliveryID, DeliveryRequestType request, CompletableFuture<RequestStatusResponse> requestProcessed) { - log.info(format(SERVICE_TIME_OUT_REACHED_MSG, appDeliveryID)); + log.info(SERVICE_TIME_OUT_REACHED_MSG, appDeliveryID); var sinkParams = request.getConfig().getMsgResponseSinks(); requestProcessed.thenAcceptAsync(response -> hub.applySinks(response, sinkParams)); diff --git a/src/main/java/at/gv/egiz/moazs/util/JAXBClassNotFoundFix.java b/src/main/java/at/gv/egiz/moazs/util/JAXBClassNotFoundFix.java index 35fc677..22f8b1e 100644 --- a/src/main/java/at/gv/egiz/moazs/util/JAXBClassNotFoundFix.java +++ b/src/main/java/at/gv/egiz/moazs/util/JAXBClassNotFoundFix.java @@ -71,7 +71,7 @@ public class JAXBClassNotFoundFix { t.join(); } catch (InterruptedException ex) { log.error("Interrupted. ", ex); - throw moaZSException("Interrupted. ", ex); + Thread.currentThread().interrupt(); } if (error[0] != null) { |