From 33ef186e1e34b74cea33a77a043c0c8100d5c467 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 11 Mar 2019 10:15:19 -0400 Subject: Address sonar issues in utils Fixed issues in BeanConfigurator. Fixed issues in NetworkUtil associated with newly added trust manager. Change-Id: I0777ff85131d22c92c0ede06335a5b2839a1c482 Issue-ID: POLICY-1519 Signed-off-by: Jim Hahn --- .../java/org/onap/policy/common/utils/network/NetworkUtil.java | 8 ++++++-- .../org/onap/policy/common/utils/properties/BeanConfigurator.java | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/utils/src/main/java/org/onap/policy/common/utils/network/NetworkUtil.java b/utils/src/main/java/org/onap/policy/common/utils/network/NetworkUtil.java index aca34bbe..3976c7a2 100644 --- a/utils/src/main/java/org/onap/policy/common/utils/network/NetworkUtil.java +++ b/utils/src/main/java/org/onap/policy/common/utils/network/NetworkUtil.java @@ -60,11 +60,15 @@ public class NetworkUtil { @Override public void checkClientTrusted(final java.security.cert.X509Certificate[] certs, - final String authType) {} + final String authType) { + // always trust + } @Override public void checkServerTrusted(final java.security.cert.X509Certificate[] certs, - final String authType) {} + final String authType) { + // always trust + } } }; // @formatter:on diff --git a/utils/src/main/java/org/onap/policy/common/utils/properties/BeanConfigurator.java b/utils/src/main/java/org/onap/policy/common/utils/properties/BeanConfigurator.java index 9d02819a..2ef91911 100644 --- a/utils/src/main/java/org/onap/policy/common/utils/properties/BeanConfigurator.java +++ b/utils/src/main/java/org/onap/policy/common/utils/properties/BeanConfigurator.java @@ -526,9 +526,8 @@ public class BeanConfigurator { * @param methodName name of the method to return * @return the method to be used to get the field's value * @throws NoSuchMethodException if the method does not exist - * @throws SecurityException if the method cannot be accessed */ - protected Method getGetter(Field field, String methodName) throws NoSuchMethodException, SecurityException { + protected Method getGetter(Field field, String methodName) throws NoSuchMethodException { return field.getDeclaringClass().getMethod(methodName); } -- cgit 1.2.3-korg