aboutsummaryrefslogtreecommitdiffstats
path: root/model/policy-model
diff options
context:
space:
mode:
authorRam Krishna Verma <ram_krishna.verma@bell.ca>2020-07-24 14:17:50 +0000
committerGerrit Code Review <gerrit@onap.org>2020-07-24 14:17:50 +0000
commit2169b3fbf66153ea7e066ba0057585822208d6f4 (patch)
treecdcf319b3d1e6a76d93a1e0af982523655147075 /model/policy-model
parent68b18f80de1d32fdb3fe892358aae298203b0d99 (diff)
parent0eef1b686645270765c22eeb7a24544e3db6829f (diff)
Merge "Fix replaceAll SONAR issues in apex-pdp"
Diffstat (limited to 'model/policy-model')
-rw-r--r--model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxLogic.java6
-rw-r--r--model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyLogicReader.java9
2 files changed, 8 insertions, 7 deletions
diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxLogic.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxLogic.java
index 64aeb3777..442e54b1f 100644
--- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxLogic.java
+++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/concepts/AxLogic.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
- * Modifications Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2019-2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -361,8 +361,8 @@ public class AxLogic extends AxConcept {
if (!logicFlavour.equals(other.logicFlavour)) {
return false;
}
- final String thislogic = CDataConditioner.clean(logic).replaceAll("\n", "");
- final String otherlogic = CDataConditioner.clean(other.logic).replaceAll("\n", "");
+ final String thislogic = CDataConditioner.clean(logic).replace("\n", "");
+ final String otherlogic = CDataConditioner.clean(other.logic).replace("\n", "");
return thislogic.equals(otherlogic);
}
diff --git a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyLogicReader.java b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyLogicReader.java
index 0fed8d385..f70068454 100644
--- a/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyLogicReader.java
+++ b/model/policy-model/src/main/java/org/onap/policy/apex/model/policymodel/handling/PolicyLogicReader.java
@@ -1,19 +1,20 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2016-2018 Ericsson. All rights reserved.
+ * Modifications Copyright (C) 2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
- *
+ *
* SPDX-License-Identifier: Apache-2.0
* ============LICENSE_END=========================================================
*/
@@ -105,7 +106,7 @@ public class PolicyLogicReader implements AxLogicReader {
// Now, we read in the script
// Get the package name of the current package and convert dots to slashes for the file path
- String fullLogicFilePath = logicPackage.replaceAll("\\.", "/");
+ String fullLogicFilePath = logicPackage.replace(".", "/");
// Now, the logic should be in a sub directory for the logic executor type
fullLogicFilePath += "/" + axLogic.getLogicFlavour().toLowerCase();