From: Thugutla sailakshmi Date: Mon, 26 Aug 2019 12:26:01 +0000 (+0530) Subject: Immediately return this expression instead of assigning it to the temporary variable... X-Git-Tag: 5.0.1~7^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F73%2F94273%2F1;p=vid.git Immediately return this expression instead of assigning it to the temporary variable "responseWrapper2" return the expression Issue-ID: VID-561 Change-Id: I2a036a8181601c6cb6c5fd498c631ce9e5f5cbdb Signed-off-by: Thugutla sailakshmi --- diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/ChangeManagementController.java b/vid-app-common/src/main/java/org/onap/vid/controller/ChangeManagementController.java index 7bb94cb1c..cf855f3fe 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/ChangeManagementController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controller/ChangeManagementController.java @@ -4,6 +4,7 @@ * ================================================================================ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved. * Modifications Copyright (C) 2018 - 2019 Nokia. All rights reserved. + * Modifications Copyright (C) 2019 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -205,8 +206,7 @@ public class ChangeManagementController extends UnRestrictedBaseController { private MsoResponseWrapperInterface exceptionHandler(Exception e, HttpStatus httpStatus) { LOGGER.error(EELFLoggerDelegate.errorLogger, "{}: {}", getMethodName(), ExceptionUtils.getMessage(e), e); - MsoResponseWrapper2 responseWrapper2 = new MsoResponseWrapper2<>(httpStatus.value(), new MsoExceptionResponse(e)); - return responseWrapper2; + return new MsoResponseWrapper2<>(httpStatus.value(), new MsoExceptionResponse(e)); } }