aboutsummaryrefslogtreecommitdiffstats
path: root/models-pap/src/main
diff options
context:
space:
mode:
authorRam Krishna Verma <ram_krishna.verma@bell.ca>2021-06-11 10:13:17 -0400
committerRam Krishna Verma <ram_krishna.verma@bell.ca>2021-06-15 15:57:10 +0000
commitbb744354e343ca05a0b5921ddb60b4cd2a134ccc (patch)
tree5580c588606a46a1b7b30ab52886fdee157928dd /models-pap/src/main
parent8cbad257df2d5f5c585ce37e61cfd16e402be738 (diff)
Fix sonar in policy/models
use "var" for local variables Issue-ID: POLICY-3077 Change-Id: Ia1ea62e03c016d336c9b11b07b0ea941ba905497 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
Diffstat (limited to 'models-pap/src/main')
-rw-r--r--models-pap/src/main/java/org/onap/policy/models/pap/persistence/concepts/JpaPolicyAudit.java3
-rw-r--r--models-pap/src/main/java/org/onap/policy/models/pap/persistence/provider/PolicyAuditProvider.java5
2 files changed, 5 insertions, 3 deletions
diff --git a/models-pap/src/main/java/org/onap/policy/models/pap/persistence/concepts/JpaPolicyAudit.java b/models-pap/src/main/java/org/onap/policy/models/pap/persistence/concepts/JpaPolicyAudit.java
index b31af8ea0..e151441da 100644
--- a/models-pap/src/main/java/org/onap/policy/models/pap/persistence/concepts/JpaPolicyAudit.java
+++ b/models-pap/src/main/java/org/onap/policy/models/pap/persistence/concepts/JpaPolicyAudit.java
@@ -1,6 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2021 Nordix Foundation.
+ * Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -143,7 +144,7 @@ public class JpaPolicyAudit extends PfConcept implements PfAuthorative<PolicyAud
@Override
public PolicyAudit toAuthorative() {
- ToscaConceptIdentifier policyIdent = new ToscaConceptIdentifier(key.getName(), key.getVersion());
+ var policyIdent = new ToscaConceptIdentifier(key.getName(), key.getVersion());
// @formatter:off
return PolicyAudit.builder()
diff --git a/models-pap/src/main/java/org/onap/policy/models/pap/persistence/provider/PolicyAuditProvider.java b/models-pap/src/main/java/org/onap/policy/models/pap/persistence/provider/PolicyAuditProvider.java
index ca8f18dc6..432e4c85e 100644
--- a/models-pap/src/main/java/org/onap/policy/models/pap/persistence/provider/PolicyAuditProvider.java
+++ b/models-pap/src/main/java/org/onap/policy/models/pap/persistence/provider/PolicyAuditProvider.java
@@ -2,6 +2,7 @@
* ============LICENSE_START=======================================================
* Copyright (C) 2021 Nordix Foundation.
* Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -57,9 +58,9 @@ public class PolicyAuditProvider {
public void createAuditRecords(@NonNull PfDao dao, @NonNull final List<PolicyAudit> audits) {
List<JpaPolicyAudit> jpaAudits = audits.stream().map(JpaPolicyAudit::new).collect(Collectors.toList());
- BeanValidationResult result = new BeanValidationResult("createAuditRecords", jpaAudits);
+ var result = new BeanValidationResult("createAuditRecords", jpaAudits);
- int count = 0;
+ var count = 0;
for (JpaPolicyAudit jpaAudit : jpaAudits) {
result.addResult(jpaAudit.validate(String.valueOf(count++)));
}