From 8b80ea299ef6fadfbc0ec59308e0937612eb8c35 Mon Sep 17 00:00:00 2001 From: Christof Rabensteiner Date: Thu, 27 Jun 2019 15:02:03 +0200 Subject: Minor Fixes --- src/main/java/at/gv/egiz/moazs/msg/MsgClientFactory.java | 2 +- src/main/java/at/gv/egiz/moazs/preprocess/ConfigUtil.java | 5 +++-- src/main/java/at/gv/egiz/moazs/util/StringUtils.java | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/at/gv/egiz/moazs/msg/MsgClientFactory.java b/src/main/java/at/gv/egiz/moazs/msg/MsgClientFactory.java index c40aec1..389fa5c 100644 --- a/src/main/java/at/gv/egiz/moazs/msg/MsgClientFactory.java +++ b/src/main/java/at/gv/egiz/moazs/msg/MsgClientFactory.java @@ -5,7 +5,6 @@ import at.gv.egiz.moazs.util.SSLContextCreator; import at.gv.zustellung.app2mzs.xsd.ClientType; import at.gv.zustellung.app2mzs.xsd.KeyStoreType; import at.gv.zustellung.msg.xsd.App2ZusePort; -import com.sun.istack.Nullable; import org.apache.cxf.configuration.jsse.TLSClientParameters; import org.apache.cxf.endpoint.Client; import org.apache.cxf.frontend.ClientProxy; @@ -18,6 +17,7 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import javax.annotation.Nullable; import javax.net.ssl.SSLContext; import static at.gv.zustellung.app2mzs.xsd.KeyStoreType.keyStoreTypeBuilder; diff --git a/src/main/java/at/gv/egiz/moazs/preprocess/ConfigUtil.java b/src/main/java/at/gv/egiz/moazs/preprocess/ConfigUtil.java index 2392ce0..14fb377 100644 --- a/src/main/java/at/gv/egiz/moazs/preprocess/ConfigUtil.java +++ b/src/main/java/at/gv/egiz/moazs/preprocess/ConfigUtil.java @@ -229,12 +229,13 @@ public class ConfigUtil { } private boolean isTVNZClientConfigured(ClientType tnvzClient, Boolean isPerformQueryPersonRequest) { - return (tnvzClient != null + return (isPerformQueryPersonRequest + && tnvzClient != null && tnvzClient.getURL() != null && tnvzClient.getReceiveTimeout() != null && tnvzClient.getConnectionTimeout() != null && isSSLConfigured(tnvzClient)) - || isPerformQueryPersonRequest == false; + || !isPerformQueryPersonRequest; } private boolean isMSGClientConfigured(ClientType msgClientParams) { diff --git a/src/main/java/at/gv/egiz/moazs/util/StringUtils.java b/src/main/java/at/gv/egiz/moazs/util/StringUtils.java index fd40f6e..948af6d 100644 --- a/src/main/java/at/gv/egiz/moazs/util/StringUtils.java +++ b/src/main/java/at/gv/egiz/moazs/util/StringUtils.java @@ -2,6 +2,8 @@ package at.gv.egiz.moazs.util; public class StringUtils { + private StringUtils(){} + public static boolean hasPrefix(String name) { return name.indexOf('.') != -1; } -- cgit v1.2.3