From 5301a4b0b49eb568d05d59fd20d7b5724b47b8ac Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Thu, 6 May 2021 14:57:24 -0400 Subject: Fix sonars in xacml-pdp Fixed: - use "var" instead of actual type Issue-ID: POLICY-3285 Change-Id: Id17142d1f2e3e5f9dfbffcb96aff7fe76321a56b Signed-off-by: Jim Hahn --- .../xacml/pdp/application/nativ/NativePdpApplicationTranslator.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'applications/native/src') diff --git a/applications/native/src/main/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTranslator.java b/applications/native/src/main/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTranslator.java index 34ef1462..7302b676 100644 --- a/applications/native/src/main/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTranslator.java +++ b/applications/native/src/main/java/org/onap/policy/xacml/pdp/application/nativ/NativePdpApplicationTranslator.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP * ================================================================================ - * Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2020 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -71,7 +71,7 @@ public class NativePdpApplicationTranslator implements ToscaPolicyTranslator { // // Scan the string and convert to xacml PolicyType // - try (ByteArrayInputStream is = new ByteArrayInputStream(decodedXacmlPolicy.getBytes(StandardCharsets.UTF_8))) { + try (var is = new ByteArrayInputStream(decodedXacmlPolicy.getBytes(StandardCharsets.UTF_8))) { // // Read the Policy In // @@ -92,7 +92,7 @@ public class NativePdpApplicationTranslator implements ToscaPolicyTranslator { throw new ToscaPolicyConversionException("no xacml native policy found in the tosca policy"); } - String nativePolicyString = propertyMap.get(POLICY).toString(); + var nativePolicyString = propertyMap.get(POLICY).toString(); LOGGER.debug("Base64 encoded native xacml policy {}", nativePolicyString); return nativePolicyString; } -- cgit 1.2.3-korg