Address sonar issues in utils 46/81946/1
authorJim Hahn <jrh3@att.com>
Mon, 11 Mar 2019 14:15:19 +0000 (10:15 -0400)
committerJim Hahn <jrh3@att.com>
Mon, 11 Mar 2019 14:23:44 +0000 (10:23 -0400)
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 <jrh3@att.com>
utils/src/main/java/org/onap/policy/common/utils/network/NetworkUtil.java
utils/src/main/java/org/onap/policy/common/utils/properties/BeanConfigurator.java

index aca34bb..3976c7a 100644 (file)
@@ -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
index 9d02819..2ef9191 100644 (file)
@@ -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);
     }