From 63d23a4aa0f3aeae9d6470b95dfa8f87b2d85aa8 Mon Sep 17 00:00:00 2001 From: waynedunican Date: Mon, 12 Aug 2024 21:18:12 +0100 Subject: Fix sonar issues in common - SONAR Fix instanceOf issues - SONAR Remove public modifiers - SONAR Remove unused imports - SONAR Remove exceptions that can't be thrown from method body Issue-ID: POLICY-5106 Change-Id: I745d0101036d3421f02db22481514be0b79f5103 Signed-off-by: waynedunican --- .../src/main/java/org/onap/policy/common/parameters/BeanValidator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common-parameters') diff --git a/common-parameters/src/main/java/org/onap/policy/common/parameters/BeanValidator.java b/common-parameters/src/main/java/org/onap/policy/common/parameters/BeanValidator.java index 4ed7e42c..c4244b27 100644 --- a/common-parameters/src/main/java/org/onap/policy/common/parameters/BeanValidator.java +++ b/common-parameters/src/main/java/org/onap/policy/common/parameters/BeanValidator.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2024 Nordix Foundation * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -307,7 +308,7 @@ public class BeanValidator { return true; } - BeanValidationResult result2 = (value instanceof ParameterGroup ? ((ParameterGroup) value).validate() + BeanValidationResult result2 = (value instanceof ParameterGroup parameterGroup ? parameterGroup.validate() : validateTop(fieldName, value)); if (result2.isClean()) { -- cgit