aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThugutla sailakshmi <tsaila10@in.ibm.com>2019-08-25 22:27:24 +0530
committerThugutla sailakshmi <tsaila10@in.ibm.com>2019-08-25 22:28:44 +0530
commit7075981ed93e921c85d104bb14bed881b09d6a60 (patch)
tree83d52e6b05d1cbf98b3d2bb7c5aed052c8fb8f08
parenteaef5177f21eb3597dab07af1a9d6f1f3a395614 (diff)
Immediately return this expression instead of assigning it to the temporary variable "exceptionResponse"
return the expression Issue-ID: VID-561 Change-Id: Ie06a589a74438df8dac525c5d8380beb948dc48e Signed-off-by: Thugutla sailakshmi <tsaila10@in.ibm.com>
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/controller/ControllersUtils.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/ControllersUtils.java b/vid-app-common/src/main/java/org/onap/vid/controller/ControllersUtils.java
index befbe0320..693c84bff 100644
--- a/vid-app-common/src/main/java/org/onap/vid/controller/ControllersUtils.java
+++ b/vid-app-common/src/main/java/org/onap/vid/controller/ControllersUtils.java
@@ -4,6 +4,7 @@
* ================================================================================
* Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 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.
@@ -45,9 +46,7 @@ public final class ControllersUtils {
public static ExceptionResponse handleException(Exception e, EELFLoggerDelegate logger) {
logger.error(EELFLoggerDelegate.errorLogger, "{}: {}", getMethodCallerName(), ExceptionUtils.getMessage(e), e);
-
- ExceptionResponse exceptionResponse = new ExceptionResponse(e);
- return exceptionResponse;
+ return new ExceptionResponse(e);
}
public static ResponseEntity handleWebApplicationException(WebApplicationException e, EELFLoggerDelegate logger) {