From bb744354e343ca05a0b5921ddb60b4cd2a134ccc Mon Sep 17 00:00:00 2001 From: Ram Krishna Verma Date: Fri, 11 Jun 2021 10:13:17 -0400 Subject: Fix sonar in policy/models use "var" for local variables Issue-ID: POLICY-3077 Change-Id: Ia1ea62e03c016d336c9b11b07b0ea941ba905497 Signed-off-by: Ram Krishna Verma --- .../onap/policy/models/pap/persistence/concepts/JpaPolicyAudit.java | 3 ++- .../policy/models/pap/persistence/provider/PolicyAuditProvider.java | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'models-pap') 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 audits) { List 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++))); } -- cgit 1.2.3-korg