From d00c73842c6f8e7bb00b29d2fb5dd63b9cde4bfe Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Wed, 12 May 2021 13:25:06 -0400 Subject: Fix sonars in policy models Fixed: - a few other "var" cases - use re2j instead of java.util.regex - use correct class for constants - remove unused constants Issue-ID: POLICY-3094 Change-Id: Ifcb2b0623e8df0527f0a279e666d062422978ded Signed-off-by: Jim Hahn --- .../org/onap/policy/models/errors/concepts/ErrorResponseUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'models-errors/src/main') diff --git a/models-errors/src/main/java/org/onap/policy/models/errors/concepts/ErrorResponseUtils.java b/models-errors/src/main/java/org/onap/policy/models/errors/concepts/ErrorResponseUtils.java index 67815a811..eb5212eb0 100644 --- a/models-errors/src/main/java/org/onap/policy/models/errors/concepts/ErrorResponseUtils.java +++ b/models-errors/src/main/java/org/onap/policy/models/errors/concepts/ErrorResponseUtils.java @@ -1,6 +1,7 @@ /*- * ============LICENSE_START======================================================= * Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2021 AT&T Intellectual Property. 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. @@ -46,7 +47,7 @@ public final class ErrorResponseUtils { List cascascadedErrorMessages = new ArrayList<>(); - for (Throwable t = throwable; t != null; t = t.getCause()) { + for (var t = throwable; t != null; t = t.getCause()) { cascascadedErrorMessages.add(t.getMessage()); } -- cgit 1.2.3-korg