Fix Sonar Issues policy/engine POLICY-SDK-APP module
[policy/engine.git] / POLICY-SDK-APP / src / main / java / org / onap / policy / components / HumanPolicyComponent.java
index ea0dce2..b116af6 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP Policy Engine
  * ================================================================================
  * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Bell Canada
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -65,8 +66,6 @@ import org.onap.policy.rest.jpa.FunctionDefinition;
 import org.onap.policy.xacml.api.XACMLErrorConstants;
 import org.onap.policy.xacml.util.XACMLPolicyScanner;
 
-
-
 public class HumanPolicyComponent {
 
     private static final Logger LOGGER = FlexLogger.getLogger(HumanPolicyComponent.class);
@@ -218,8 +217,7 @@ class HtmlProcessor extends SimpleCallback {
             throw new IllegalArgumentException(msg);
         }
 
-        if (policyObject == null
-                || (!(policyObject instanceof PolicySetType) && !(policyObject instanceof PolicyType))) {
+        if ((!(policyObject instanceof PolicySetType) && !(policyObject instanceof PolicyType))) {
             String msg = "Invalid unmarshalled object: " + policyObject;
             LOGGER.error(XACMLErrorConstants.ERROR_SCHEMA_INVALID + msg);
             throw new IllegalArgumentException(msg);