From: Ram Krishna Verma Date: Fri, 11 Jun 2021 14:13:17 +0000 (-0400) Subject: Fix sonar in policy/models X-Git-Tag: 2.5.0~39 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fmodels.git;a=commitdiff_plain;h=bb744354e343ca05a0b5921ddb60b4cd2a134ccc Fix sonar in policy/models use "var" for local variables Issue-ID: POLICY-3077 Change-Id: Ia1ea62e03c016d336c9b11b07b0ea941ba905497 Signed-off-by: Ram Krishna Verma --- 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++))); }