Fix sonar in policy/models
[policy/models.git] / models-pap / src / main / java / org / onap / policy / models / pap / persistence / provider / PolicyAuditProvider.java
index ca8f18d..432e4c8 100644 (file)
@@ -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++)));
         }