Change variable name-comply with regex 16/93316/1
authorsindhu3672 <arcot.sindhuri@huawei.com>
Mon, 12 Aug 2019 10:08:59 +0000 (15:38 +0530)
committersindhu3672 <arcot.sindhuri@huawei.com>
Mon, 12 Aug 2019 10:08:59 +0000 (15:38 +0530)
Change variable name-comply with regex asdc-controller & mso-api-handlers classes

Issue-ID: SO-2187

Signed-off-by: sindhu3672 <arcot.sindhuri@huawei.com>
Change-Id: I709cbcacc32e57a8b9cf89a963321bfde3b08301

asdc-controller/src/main/java/org/onap/so/asdc/installer/bpmn/WorkflowResource.java
mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/exceptions/RequestDbFailureException.java

index a68d98e..ef4dfa2 100644 (file)
@@ -52,7 +52,7 @@ import org.springframework.stereotype.Component;
 public class WorkflowResource {
     protected static final Logger logger = LoggerFactory.getLogger(WorkflowResource.class);
 
-    private static final String pattern = ".*\\\"activity:(.*)\\\" .*";
+    private static final String PATTERN = ".*\\\"activity:(.*)\\\" .*";
     private static final String TARGET_RESOURCE_VNF = "vnf";
     private static final String SOURCE_SDC = "sdc";
     private static final String BPMN_SUFFIX = ".bpmn";
@@ -176,7 +176,7 @@ public class WorkflowResource {
     protected List<String> getActivityNameList(String bpmnContent) {
         List<String> activityNameList = new ArrayList<>();
 
-        Pattern p = Pattern.compile(pattern);
+        Pattern p = Pattern.compile(PATTERN);
         Matcher m = p.matcher(bpmnContent);
         while (m.find()) {
             activityNameList.add(m.group(1));
index 577a146..a8f868d 100644 (file)
@@ -22,7 +22,7 @@ package org.onap.so.apihandlerinfra.exceptions;
 
 public class RequestDbFailureException extends ApiException {
 
-    private static final String requestDbFailMessage = "Unable to %s due to error contacting requestDb: %s";
+    private static final String REQUEST_DB_FAIL_MESSAGE = "Unable to %s due to error contacting requestDb: %s";
 
     private RequestDbFailureException(Builder builder) {
         super(builder);
@@ -32,7 +32,7 @@ public class RequestDbFailureException extends ApiException {
 
 
         public Builder(String action, String error, int httpResponseCode, String messageID) {
-            super(requestDbFailMessage.format(requestDbFailMessage, action, error), httpResponseCode, messageID);
+            super(REQUEST_DB_FAIL_MESSAGE.format(REQUEST_DB_FAIL_MESSAGE, action, error), httpResponseCode, messageID);
         }
 
         public RequestDbFailureException build() {