diff options
author | Dan Timoney <dtimoney@att.com> | 2018-12-17 21:06:45 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-12-17 21:06:45 +0000 |
commit | 34875a704191654c224966deb0f99968e76ba429 (patch) | |
tree | 48efd0881affd7f481f7d2da3d1e2bb53a0d9cc1 | |
parent | 0db8f9aa9ae019c058f80137dd271c987ad20f8a (diff) | |
parent | 56f264776099b0944e790327d3e0ad70acead8a6 (diff) |
Merge "Sonar fix: LcmSliClient.java"
-rw-r--r-- | lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java b/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java index 9fcc92c88..54e53c776 100644 --- a/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java +++ b/lcm/provider/src/main/java/org/onap/ccsdk/sli/northbound/LcmSliClient.java @@ -5,6 +5,7 @@ package org.onap.ccsdk.sli.northbound; * ================================================================================ * Copyright (C) 2017 AT&T Intellectual Property. All rights * reserved. + * Modifications Copyright © 2018 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,6 +37,8 @@ public class LcmSliClient { private final SvcLogicService svcLogicService; + private String ErrorCode = "error-code"; + public LcmSliClient(final SvcLogicService svcLogicService) { this.svcLogicService = svcLogicService; } @@ -80,12 +83,12 @@ public class LcmSliClient { if ("failure".equalsIgnoreCase(respProps.getProperty("SvcLogic.status"))) { - if (!respProps.containsKey("error-code")) { - respProps.setProperty("error-code", "500"); + if (!respProps.containsKey(ErrorCode)) { + respProps.setProperty(ErrorCode, "500"); } } else { - if (!respProps.containsKey("error-code")) { - respProps.setProperty("error-code", "200"); + if (!respProps.containsKey(ErrorCode)) { + respProps.setProperty(ErrorCode, "200"); } } |