summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandeep J <sandeejh@in.ibm.com>2018-12-11 17:50:41 +0530
committerSandeep J <sandeejh@in.ibm.com>2018-12-11 17:50:46 +0530
commit3d756c2176d3a791a51c9bedcef99df9372276b7 (patch)
treedc54c15f7074407eeb5e9ef48bef6980e8efe23b
parent02f6311c1233b7473dd2fa0345b301cf5e0885ad (diff)
fixed sonar issues in RestServiceImpl.java
fixed sonar issues Issue-ID: CCSDK-552 Change-Id: I675eaf2314981d1d93b539b07df1568dcf51efcd Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
-rw-r--r--ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/service/rs/RestServiceImpl.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/service/rs/RestServiceImpl.java b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/service/rs/RestServiceImpl.java
index 3746756e..95afea21 100644
--- a/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/service/rs/RestServiceImpl.java
+++ b/ms/neng/src/main/java/org/onap/ccsdk/apps/ms/neng/core/service/rs/RestServiceImpl.java
@@ -4,6 +4,8 @@
* ================================================================================
* Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
* ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
@@ -43,7 +45,7 @@ public class RestServiceImpl implements RestService {
private static Logger log = Logger.getLogger(RestServiceImpl.class.getName());
private static final String INTERNAL_ERROR_MSG = "Internal error occured while processing the request.";
private static final String ERROR="error";
-
+ private static final String ERROR_500="err-0500";
@Autowired SpringService service;
@@ -73,7 +75,7 @@ public class RestServiceImpl implements RestService {
return buildErrorResponse(response);
} catch (Exception e) {
log.warning(e.getMessage());
- response.put(ERROR, buildErrorResponse("err-0500", INTERNAL_ERROR_MSG));
+ response.put(ERROR, buildErrorResponse(ERROR_500, INTERNAL_ERROR_MSG));
return buildErrorResponse(response);
}
}
@@ -94,7 +96,7 @@ public class RestServiceImpl implements RestService {
return buildErrorResponse(response);
} catch (Exception e) {
log.warning(e.getMessage());
- response.put(ERROR, buildErrorResponse("err-0500", INTERNAL_ERROR_MSG));
+ response.put(ERROR, buildErrorResponse(ERROR_500, INTERNAL_ERROR_MSG));
return buildErrorResponse(response);
}
}
@@ -122,7 +124,7 @@ public class RestServiceImpl implements RestService {
return buildResponse(response);
} catch (Exception e) {
log.warning(e.getMessage());
- response.put(ERROR, buildErrorResponse("err-0500", e.getMessage()));
+ response.put(ERROR, buildErrorResponse(ERROR_500, e.getMessage()));
return buildErrorResponse(response);
}
}