From 22afe401ca130eba6543f740039e8a3c13d11861 Mon Sep 17 00:00:00 2001 From: "adheli.tavares" Date: Tue, 2 Apr 2024 15:15:39 +0100 Subject: Dependency management update - including dependencies to pom.xml files only where they are used, avoiding extra dependencies being added in all packages. Issue-ID: POLICY-4945 Change-Id: I85b18befe3fe2877c754b1ac818d1b4994f9f7f9 Signed-off-by: adheli.tavares --- .../onap/policy/models/errors/concepts/ErrorResponseUtils.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (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 749651310..e571e4058 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,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2019 Nordix Foundation. + * Copyright (C) 2019, 2024 Nordix Foundation. * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); @@ -42,14 +42,14 @@ public final class ErrorResponseUtils { public static void getExceptionMessages(final ErrorResponse errorResponse, final Throwable throwable) { errorResponse.setErrorMessage(throwable.getMessage()); - List cascascadedErrorMessages = new ArrayList<>(); + List cascadedErrorMessages = new ArrayList<>(); for (var t = throwable; t != null; t = t.getCause()) { - cascascadedErrorMessages.add(t.getMessage()); + cascadedErrorMessages.add(t.getMessage()); } - if (!cascascadedErrorMessages.isEmpty()) { - errorResponse.setErrorDetails(cascascadedErrorMessages); + if (!cascadedErrorMessages.isEmpty()) { + errorResponse.setErrorDetails(cascadedErrorMessages); } } } -- cgit 1.2.3-korg