Merge "Support more Generic workflow for voLTE"
authorSeshu Kumar M <seshu.kumar.m@huawei.com>
Mon, 26 Feb 2018 06:57:27 +0000 (06:57 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 26 Feb 2018 06:57:27 +0000 (06:57 +0000)
74 files changed:
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/authentication/wrappers/RackspaceAPIKeyWrapper.java
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/cloud/authentication/wrappers/UsernamePasswordWrapper.java
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/authentication/wrappers/RackspaceAPIKeyWrapperTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/authentication/wrappers/UsernamePasswordWrapperTest.java [new file with mode: 0644]
adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/authentication/wrappers/WrapperTestUtility.java [new file with mode: 0644]
adapters/mso-catalog-db-adapter/src/main/java/org/openecomp/mso/adapters/catalogdb/catalogrest/QueryVfModule.java
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java
asdc-controller/src/main/java/org/openecomp/mso/asdc/client/ASDCGlobalController.java
asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/ASDCElementInfo.java
asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/BigDecimalVersion.java
asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/ToscaResourceInstaller.java
asdc-controller/src/main/java/org/openecomp/mso/asdc/installer/heat/VfResourceInstaller.java
asdc-controller/src/main/java/org/openecomp/mso/asdc/util/ASDCNotificationLogging.java
asdc-controller/src/main/java/org/openecomp/mso/asdc/util/NotificationLogging.java
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/adapter/vnf/ObjectFactory.java
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/util/CryptoUtils.java
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/AbstractCallbackService.java
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowMessageResource.java
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResource.java
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/bpmn/common/workflow/service/WorkflowResourceApplication.java
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Body.java
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/Input.java
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/RequestHealthDiagnostic.java
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/ResultInfo.java
bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/sdno/beans/SDNO.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/BPMNUtil.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CompleteMsoProcessTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupNameTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ConfirmVolumeGroupTenantTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/CreateAAIVfModuleVolumeGroupTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DecomposeServiceTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/DeleteAAIVfModuleTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/FalloutHandlerTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteServiceTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericDeleteVnfTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetServiceTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericGetVnfTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/GenericPutVnfTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/HomingTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ManualHandlingTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/PrepareUpdateAAIVfModuleTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/RainyDayHandlerTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/ReceiveWorkflowMessageTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/SDNCAdapterV1Test.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIGenericVnfTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/UpdateAAIVfModuleTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/VnfAdapterRestV1Test.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowAsyncResourceTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResource.java
bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/mock/MockResourceApplication.java
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/HealthCheckHandler.java
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonUtils.java
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/xml/XmlTool.java
common/src/main/java/org/openecomp/mso/properties/MsoJsonProperties.java
common/src/main/java/org/openecomp/mso/utils/CryptoUtils.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkInfoHandler.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandler.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkTypesHandler.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandler.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandler.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfTypesHandler.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandler.java
mso-api-handlers/mso-requests-db/src/main/java/org/openecomp/mso/requestsdb/RequestsDatabase.java
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/AllottedResourceCustomization.java
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VfModule.java
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfComponentsRecipe.java
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfRecipe.java
mso-catalog-db/src/main/java/org/openecomp/mso/db/catalog/beans/VnfResource.java

index 5cf5587..e82306b 100644 (file)
@@ -35,16 +35,6 @@ import com.woorea.openstack.keystone.model.Authentication;
  */\r
 public class RackspaceAPIKeyWrapper extends AuthenticationWrapper {\r
 \r
-       /**\r
-        * \r
-        */\r
-       public RackspaceAPIKeyWrapper() {\r
-               // TODO Auto-generated constructor stub\r
-       }\r
-\r
-       /* (non-Javadoc)\r
-        * @see org.openecomp.mso.cloud.authentication.AuthenticationWrapper#getAuthentication(org.openecomp.mso.cloud.CloudIdentity)\r
-        */\r
        @Override\r
        public Authentication getAuthentication(CloudIdentity cloudIdentity) {\r
                if (cloudIdentity == null) {\r
index 5fd3e52..a1beabe 100644 (file)
@@ -32,19 +32,9 @@ import com.woorea.openstack.keystone.model.authentication.UsernamePassword;
 /**\r
  * This class implements the authentication wrapper for Openstack provided for\r
  * user name and password authentication.\r
- *\r
  */\r
 public class UsernamePasswordWrapper extends AuthenticationWrapper {\r
 \r
-       /**\r
-        * \r
-        */\r
-       public UsernamePasswordWrapper() {\r
-       }\r
-\r
-       /* (non-Javadoc)\r
-        * @see org.openecomp.mso.cloud.authentication.AuthenticationWrapper#getAuthentication(org.openecomp.mso.cloud.CloudIdentity)\r
-        */\r
        @Override\r
        public Authentication getAuthentication(CloudIdentity cloudIdentity) {\r
                if (cloudIdentity == null) {\r
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/authentication/wrappers/RackspaceAPIKeyWrapperTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/authentication/wrappers/RackspaceAPIKeyWrapperTest.java
new file mode 100644 (file)
index 0000000..33f91c6
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * ============LICENSE_START==========================================
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * 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
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END============================================
+ *
+ * ECOMP and OpenECOMP are trademarks
+ * and service marks of AT&T Intellectual Property.
+ *
+ */
+
+package org.openecomp.mso.cloud.authentication.wrappers;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+import com.woorea.openstack.keystone.model.Authentication;
+import org.junit.Test;
+import org.openecomp.mso.cloud.authentication.models.RackspaceAuthentication;
+
+public class RackspaceAPIKeyWrapperTest {
+
+    @Test
+    public void getAuthenticationSuccessful() {
+        RackspaceAPIKeyWrapper testedObject = new RackspaceAPIKeyWrapper();
+        Authentication authentication = testedObject.getAuthentication(WrapperTestUtility.createCloudIdentity());
+
+        assertThat(authentication).isInstanceOf(RackspaceAuthentication.class);
+        RackspaceAuthentication rackspaceAuthentication = (RackspaceAuthentication) authentication;
+        assertThat(rackspaceAuthentication.getToken().getUsername())
+                .isEqualTo(WrapperTestUtility.CLOUD_IDENTITY_MSO_ID);
+        assertThat(rackspaceAuthentication.getToken().getApiKey())
+                .isEqualTo(WrapperTestUtility.CLOUD_IDENTITY_MSO_PASS);
+    }
+
+    @Test
+    public void getAuthenticationThrowsException() {
+        assertThatThrownBy(() -> new RackspaceAPIKeyWrapper().getAuthentication(null))
+                .isInstanceOf(IllegalArgumentException.class)
+                .hasMessage(WrapperTestUtility.EXCEPTION_MESSAGE);
+    }
+
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/authentication/wrappers/UsernamePasswordWrapperTest.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/authentication/wrappers/UsernamePasswordWrapperTest.java
new file mode 100644 (file)
index 0000000..0cfe287
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ * ============LICENSE_START==========================================
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * 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
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END============================================
+ *
+ * ECOMP and OpenECOMP are trademarks
+ * and service marks of AT&T Intellectual Property.
+ *
+ */
+
+package org.openecomp.mso.cloud.authentication.wrappers;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
+import com.woorea.openstack.keystone.model.Authentication;
+import com.woorea.openstack.keystone.model.authentication.UsernamePassword;
+import org.junit.Test;
+
+public class UsernamePasswordWrapperTest {
+
+    @Test
+    public void getAuthenticationSuccessful() {
+        UsernamePasswordWrapper testedObject = new UsernamePasswordWrapper();
+        Authentication authentication = testedObject.getAuthentication(WrapperTestUtility.createCloudIdentity());
+
+        assertThat(authentication).isInstanceOf(UsernamePassword.class);
+        UsernamePassword usernamePassword = (UsernamePassword) authentication;
+        assertThat(usernamePassword.getPasswordCredentials().getUsername())
+                .isEqualTo(WrapperTestUtility.CLOUD_IDENTITY_MSO_ID);
+        assertThat(usernamePassword.getPasswordCredentials().getPassword())
+                .isEqualTo(WrapperTestUtility.CLOUD_IDENTITY_MSO_PASS);
+    }
+
+    @Test
+    public void getAuthenticationThrowsException() {
+        assertThatThrownBy(() -> new UsernamePasswordWrapper().getAuthentication(null)).
+                isInstanceOf(IllegalArgumentException.class).
+                hasMessage(WrapperTestUtility.EXCEPTION_MESSAGE);
+    }
+
+}
diff --git a/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/authentication/wrappers/WrapperTestUtility.java b/adapters/mso-adapter-utils/src/test/java/org/openecomp/mso/cloud/authentication/wrappers/WrapperTestUtility.java
new file mode 100644 (file)
index 0000000..3cbc48d
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * ============LICENSE_START==========================================
+ * ===================================================================
+ * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * 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
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END============================================
+ *
+ * ECOMP and OpenECOMP are trademarks
+ * and service marks of AT&T Intellectual Property.
+ *
+ */
+
+package org.openecomp.mso.cloud.authentication.wrappers;
+
+import org.openecomp.mso.cloud.CloudIdentity;
+
+final class WrapperTestUtility {
+
+    static final String CLOUD_IDENTITY_MSO_ID = "msoIdTest";
+    static final String CLOUD_IDENTITY_MSO_PASS = "msoPassTest";
+    static final String EXCEPTION_MESSAGE = "Provided cloud identity is null, cannot extract username and "
+            + "password";
+
+    private WrapperTestUtility() {
+    }
+
+    static CloudIdentity createCloudIdentity() {
+        CloudIdentity cloudIdentity = new CloudIdentity();
+        cloudIdentity.setMsoId(CLOUD_IDENTITY_MSO_ID);
+        cloudIdentity.setMsoPass(CloudIdentity.encryptPassword(CLOUD_IDENTITY_MSO_PASS));
+        return cloudIdentity;
+    }
+}
index cb6ba1b..b2caa99 100644 (file)
@@ -104,10 +104,10 @@ public class QueryVfModule extends CatalogQuery {
                    put(valueMap, "MODEL_INVARIANT_ID",       vfNull ? null : o.getVfModule().getModelInvariantUuid());
                    put(valueMap, "MODEL_VERSION",            vfNull ? null : o.getVfModule().getVersion());
                    put(valueMap, "MODEL_CUSTOMIZATION_UUID", o.getModelCustomizationUuid());
-                       put(valueMap, "IS_BASE", vfNull ? false : Boolean.valueOf(o.getVfModule().isBase() ? true : false));
+                       put(valueMap, "IS_BASE", vfNull ? false : o.getVfModule().isBase() ? true : false);
                        put(valueMap, "VF_MODULE_LABEL",          o.getLabel());
                    put(valueMap, "INITIAL_COUNT",            o.getInitialCount());
-                   put(valueMap, "HAS_VOLUME_GROUP", Boolean.valueOf(hasVolumeGroup));
+                   put(valueMap, "HAS_VOLUME_GROUP", hasVolumeGroup);
 
             buf.append(sep+ this.setTemplate(template, valueMap));
             sep = ",\n";
index 45d5944..55a2156 100644 (file)
@@ -142,7 +142,7 @@ public class SDNCRestClient implements Runnable {
                DataOutputStream out = null;
                BufferedReader in = null;
                SDNCResponse sdncResp = new SDNCResponse(rt.getReqId());
-               StringBuffer response = new StringBuffer();
+               StringBuilder response = new StringBuilder();
 
                msoLogger.info(MessageEnum.RA_SEND_REQUEST_SDNC, rt.toString(), "SDNC", "");
                msoLogger.debug("SDNC Request Body:\n" + sdncReqBody);
index c0056e0..251888e 100644 (file)
@@ -49,7 +49,7 @@ public class ASDCGlobalController {
        
                List<String> controllerNames = ASDCConfiguration.getAllDefinedControllers();
 
-               StringBuffer controllerListLog = new StringBuffer("List of controllers loaded:");
+               StringBuilder controllerListLog = new StringBuilder("List of controllers loaded:");
                for (String controllerName : controllerNames) {
                        controllers.put(controllerName, new ASDCController(controllerName));
                        controllerListLog.append(controllerName);
index 3c262c6..29144a9 100644 (file)
@@ -109,7 +109,7 @@ public class ASDCElementInfo {
         */
        @Override
        public final String toString() {
-               StringBuffer sb = new StringBuffer();
+               StringBuilder sb = new StringBuilder();
                List<String> aggregatedElements = new ArrayList<>();
                for (Entry<String, String> entry : this.getElementInfoMap().entrySet()) {
                        aggregatedElements.add(entry.getKey() + ": " + entry.getValue());
index 5547bb1..c2faf1c 100644 (file)
@@ -34,7 +34,7 @@ public class BigDecimalVersion {
     public static BigDecimal castAndCheckNotificationVersion(String version) {
        // Truncate the version if bad type
        String[] splitVersion = version.split("\\.");
-       StringBuffer newVersion = new StringBuffer();
+       StringBuilder newVersion = new StringBuilder();
        if (splitVersion.length > 1) {
                newVersion.append(splitVersion[0]);
                newVersion.append(".");
index b998be9..f22debc 100644 (file)
@@ -636,7 +636,7 @@ public class ToscaResourceInstaller {// implements IVfResourceInstaller {
                        return body; \r
                } \r
  \r
-               StringBuffer sb = new StringBuffer(body.length()); \r
+               StringBuilder sb = new StringBuilder(body.length());\r
  \r
                int currentIndex = 0; \r
                int startIndex = 0; \r
index bd20eb0..0ae58da 100644 (file)
@@ -631,7 +631,7 @@ public class VfResourceInstaller implements IVfResourceInstaller {
                        return body;
                }
 
-               StringBuffer sb = new StringBuffer(body.length());
+               StringBuilder sb = new StringBuilder(body.length());
 
                int currentIndex = 0;
                int startIndex = 0;
index 28f5dbd..a7ba013 100644 (file)
@@ -42,7 +42,7 @@ public class ASDCNotificationLogging {
                if (asdcNotification == null) {
                        return "NULL";
                }
-               StringBuffer buffer = new StringBuffer("ASDC Notification:");
+               StringBuilder buffer = new StringBuilder("ASDC Notification:");
                buffer.append(System.lineSeparator());
 
                buffer.append("DistributionID:");
@@ -96,7 +96,7 @@ public class ASDCNotificationLogging {
                }
                
 
-               StringBuffer buffer = new StringBuffer("CSAR Notification:");
+               StringBuilder buffer = new StringBuilder("CSAR Notification:");
                buffer.append(System.lineSeparator());
                buffer.append(System.lineSeparator());
                
@@ -286,7 +286,7 @@ public class ASDCNotificationLogging {
                        return null;
                }
 
-               StringBuffer buffer = new StringBuffer("VfModuleMetaData List:");
+               StringBuilder buffer = new StringBuilder("VfModuleMetaData List:");
                buffer.append(System.lineSeparator());
 
                buffer.append("{");
@@ -311,7 +311,7 @@ public class ASDCNotificationLogging {
                        return "NULL";
                }
 
-               StringBuffer buffer = new StringBuffer("VfModuleMetaData:");
+               StringBuilder buffer = new StringBuilder("VfModuleMetaData:");
                buffer.append(System.lineSeparator());
 
                buffer.append("VfModuleModelName:");
@@ -395,7 +395,7 @@ public class ASDCNotificationLogging {
                        return null;
                }
 
-               StringBuffer buffer = new StringBuffer();
+               StringBuilder buffer = new StringBuilder();
                buffer.append("{");
 
                for (IResourceInstance resourceInstanceElem:asdcNotification.getResources()) {
@@ -418,7 +418,7 @@ public class ASDCNotificationLogging {
                        return null;
                }
 
-               StringBuffer buffer = new StringBuffer("Resource Instance Info:");
+               StringBuilder buffer = new StringBuilder("Resource Instance Info:");
                buffer.append(System.lineSeparator());
 
                buffer.append("ResourceInstanceName:");
@@ -473,7 +473,7 @@ public class ASDCNotificationLogging {
                        return null;
                }
 
-               StringBuffer buffer = new StringBuffer();
+               StringBuilder buffer = new StringBuilder();
                buffer.append("{");
                for (IArtifactInfo artifactInfoElem:artifactsList) {
                        buffer.append(System.lineSeparator());
@@ -495,7 +495,7 @@ public class ASDCNotificationLogging {
                        return null;
                }
 
-               StringBuffer buffer = new StringBuffer("Service Artifacts Info:");
+               StringBuilder buffer = new StringBuilder("Service Artifacts Info:");
                buffer.append(System.lineSeparator());
 
                buffer.append("ArtifactName:");
index 9b38a50..126114d 100644 (file)
@@ -82,7 +82,7 @@ public class NotificationLogging implements InvocationHandler {
                        return "EMPTY"; // No declared methods in this class !!!
                }
                
-               StringBuffer buffer = new StringBuffer("ASDC Notification:");
+               StringBuilder buffer = new StringBuilder("ASDC Notification:");
                buffer.append(System.lineSeparator());
                
                for (Method m : declaredMethods) {
index 952e3e2..c22fd28 100644 (file)
@@ -166,7 +166,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "rollbackVnfNotification")
     public JAXBElement<RollbackVnfNotification> createRollbackVnfNotification(RollbackVnfNotification value) {
-        return new JAXBElement<RollbackVnfNotification>(_RollbackVnfNotification_QNAME, RollbackVnfNotification.class, null, value);
+        return new JAXBElement<>(_RollbackVnfNotification_QNAME, RollbackVnfNotification.class, null, value);
     }
 
     /**
@@ -175,7 +175,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "deleteVnfNotification")
     public JAXBElement<DeleteVnfNotification> createDeleteVnfNotification(DeleteVnfNotification value) {
-        return new JAXBElement<DeleteVnfNotification>(_DeleteVnfNotification_QNAME, DeleteVnfNotification.class, null, value);
+        return new JAXBElement<>(_DeleteVnfNotification_QNAME, DeleteVnfNotification.class, null, value);
     }
 
     /**
@@ -184,7 +184,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "createVnfNotification")
     public JAXBElement<CreateVnfNotification> createCreateVnfNotification(CreateVnfNotification value) {
-        return new JAXBElement<CreateVnfNotification>(_CreateVnfNotification_QNAME, CreateVnfNotification.class, null, value);
+        return new JAXBElement<>(_CreateVnfNotification_QNAME, CreateVnfNotification.class, null, value);
     }
 
     /**
@@ -193,7 +193,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "updateVnfNotification")
     public JAXBElement<UpdateVnfNotification> createUpdateVnfNotification(UpdateVnfNotification value) {
-        return new JAXBElement<UpdateVnfNotification>(_UpdateVnfNotification_QNAME, UpdateVnfNotification.class, null, value);
+        return new JAXBElement<>(_UpdateVnfNotification_QNAME, UpdateVnfNotification.class, null, value);
     }
 
     /**
@@ -202,7 +202,7 @@ public class ObjectFactory {
      */
     @XmlElementDecl(namespace = "http://org.openecomp.mso/vnfNotify", name = "queryVnfNotification")
     public JAXBElement<QueryVnfNotification> createQueryVnfNotification(QueryVnfNotification value) {
-        return new JAXBElement<QueryVnfNotification>(_QueryVnfNotification_QNAME, QueryVnfNotification.class, null, value);
+        return new JAXBElement<>(_QueryVnfNotification_QNAME, QueryVnfNotification.class, null, value);
     }
 
 }
index 6cc34f7..5972c76 100644 (file)
@@ -75,14 +75,14 @@ public class CryptoUtils {
 \r
 \r
     private static String byteArrayToHexString(byte[] b){\r
-        StringBuffer sb = new StringBuffer(b.length * 2);\r
-        for (int i = 0; i < b.length; i++){\r
-            int v = b[i] & 0xff;\r
+        StringBuilder sb = new StringBuilder(b.length * 2);\r
+        for (byte aB : b) {\r
+            int v = aB & 0xff;\r
             if (v < 16) {\r
-               sb.append('0');\r
+                sb.append('0');\r
             }\r
             sb.append(Integer.toHexString(v));\r
-    }\r
+        }\r
         return sb.toString().toUpperCase();\r
     }\r
 \r
index d65311d..daca9fc 100644 (file)
@@ -70,7 +70,7 @@ public abstract class AbstractCallbackService extends ProcessEngineAwareService
                        + (message == null ? "" : System.lineSeparator()) + message);\r
 \r
                try {\r
-                       Map<String, Object> variables = new HashMap<String, Object>();\r
+                       Map<String, Object> variables = new HashMap<>();\r
 \r
                        if (injectedVariables != null) {\r
                                variables.putAll(injectedVariables);\r
@@ -192,7 +192,7 @@ public abstract class AbstractCallbackService extends ProcessEngineAwareService
 \r
                int count = waitingProcesses.size();\r
 \r
-               List<ExecInfo> execInfoList = new ArrayList<ExecInfo>(count);\r
+               List<ExecInfo> execInfoList = new ArrayList<>(count);\r
                for (Execution execution : waitingProcesses) {\r
                        execInfoList.add(new ExecInfo(execution));\r
                }\r
@@ -364,4 +364,4 @@ public abstract class AbstractCallbackService extends ProcessEngineAwareService
                                + ":" + execution.getId() + "]";\r
                }\r
        }\r
-}
+}\r
index d9aed81..4ba3590 100644 (file)
@@ -90,7 +90,7 @@ public class WorkflowMessageResource extends AbstractCallbackService {
                String correlationValue = correlator;\r
                String contentTypeVariable = messageType + "_CONTENT_TYPE";\r
 \r
-               Map<String, Object> variables = new HashMap<String, Object>();\r
+               Map<String, Object> variables = new HashMap<>();\r
 \r
                if (contentType != null) {\r
                        variables.put(contentTypeVariable, contentType);\r
index 76ff221..dd100a3 100644 (file)
@@ -450,7 +450,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
                                        Object responseCodeObject = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");\r
                                        String responseCode = responseCodeObject == null ? null : String.valueOf(responseCodeObject);\r
                                        msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);\r
-                                       responseMap = new HashMap<String, Object>();\r
+                                       responseMap = new HashMap<>();\r
                                        responseMap.put("WorkflowResponse", workflowResponse);\r
                                        responseMap.put("ResponseCode", responseCode);\r
                                        responseMap.put("Status", "Success");\r
@@ -467,7 +467,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
                                        if(workflowExceptionObject instanceof WorkflowException) {\r
                                                workflowException = (WorkflowException) workflowExceptionObject;\r
                                                workflowExceptionText = workflowException.toString();\r
-                                               responseMap = new HashMap<String, Object>();\r
+                                               responseMap = new HashMap<>();\r
                                                responseMap.put("WorkflowException", workflowExceptionText);\r
                                                responseMap.put("ResponseCode", workflowException.getErrorCode());\r
                                                responseMap.put("Status", "Fail");\r
@@ -477,7 +477,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
                                                Object object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");\r
                                                String responseCode = object == null ? null : String.valueOf(object);\r
                                                workflowExceptionText = (String) workflowExceptionObject;\r
-                                               responseMap = new HashMap<String, Object>();\r
+                                               responseMap = new HashMap<>();\r
                                                responseMap.put("WorkflowException", workflowExceptionText);\r
                                                responseMap.put("ResponseCode", responseCode);\r
                                                responseMap.put("Status", "Fail");\r
@@ -496,7 +496,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
                                        object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");\r
                                        String responseCode = object == null ? null : String.valueOf(object);\r
                                        msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);\r
-                                       responseMap = new HashMap<String, Object>();\r
+                                       responseMap = new HashMap<>();\r
                                        responseMap.put("Response", response);\r
                                        responseMap.put("ResponseCode", responseCode);\r
                                        responseMap.put("Status", "Success");\r
@@ -511,7 +511,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
                                        object = getVariableFromHistory(historyService, processInstanceId, prefix + "ResponseCode");\r
                                        String responseCode = object == null ? null : String.valueOf(object);\r
                                        msoLogger.debug(LOGMARKER + prefix + "ResponseCode: " + responseCode);\r
-                                       responseMap = new HashMap<String, Object>();\r
+                                       responseMap = new HashMap<>();\r
                                        responseMap.put("Response", errorResponse);\r
                                        responseMap.put("ResponseCode", responseCode);\r
                                        responseMap.put("Status", "Fail");\r
@@ -569,7 +569,7 @@ public class WorkflowResource extends ProcessEngineAwareService {
                try {\r
                        ProcessEngineServices engine = getProcessEngineServices();\r
                        List<HistoricVariableInstance> variables = engine.getHistoryService().createHistoricVariableInstanceQuery().processInstanceId(processInstanceId).list();\r
-                       Map<String,String> variablesMap = new HashMap<String,String>();\r
+                       Map<String,String> variablesMap = new HashMap<>();\r
                        for (HistoricVariableInstance variableInstance: variables) {\r
                                variablesMap.put(variableInstance.getName(), variableInstance.getValue().toString());\r
                        }\r
index 193b8fe..64e5adc 100644 (file)
@@ -28,8 +28,8 @@ import javax.ws.rs.core.Application;
 \r
 @ApplicationPath("/")\r
 public class WorkflowResourceApplication extends Application {\r
-    private Set<Object> singletons = new HashSet<Object>();\r
-    private Set<Class<?>> classes = new HashSet<Class<?>>();\r
+    private Set<Object> singletons = new HashSet<>();\r
+    private Set<Class<?>> classes = new HashSet<>();\r
 \r
     public WorkflowResourceApplication() {\r
     }\r
index cc8ce81..26c74b0 100644 (file)
@@ -41,7 +41,7 @@ public class Body implements Serializable
     @JsonProperty("input")
     private Input input;
     @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+    private Map<String, Object> additionalProperties = new HashMap<>();
     private final static long serialVersionUID = 9101706044452851559L;
 
     @JsonProperty("input")
index 7b9bf6f..579f481 100644 (file)
@@ -43,7 +43,7 @@ public class Input implements Serializable
     private RequestHealthDiagnostic RequestHealthDiagnostic;
     
     @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+    private Map<String, Object> additionalProperties = new HashMap<>();
     private final static long serialVersionUID = 7155546785389227528L;
 
     @JsonProperty("request-healthdiagnostic")
index 104dbb7..2cddd03 100644 (file)
@@ -59,7 +59,7 @@ public class RequestHealthDiagnostic implements Serializable
     @JsonProperty("health-diagnostic-code")
     private String healthDiagnosticCode;
     @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+    private Map<String, Object> additionalProperties = new HashMap<>();
     private final static long serialVersionUID = 1166788526178388021L;
 
     @JsonProperty("request-client-name")
index 4d029cb..976f5b9 100644 (file)
@@ -51,7 +51,7 @@ private String requestId;
 @JsonProperty("status")
 private String status;
 @JsonIgnore
-private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+private Map<String, Object> additionalProperties = new HashMap<>();
 
 @JsonProperty("client-name")
 public String getClientName() {
index 4edd54c..8505ec9 100644 (file)
@@ -50,7 +50,7 @@ public class SDNO implements Serializable
     @JsonProperty("body")
     private Body body;
     @JsonIgnore
-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+    private Map<String, Object> additionalProperties = new HashMap<>();
     private final static long serialVersionUID = -5303297382564282650L;
 
     @JsonProperty("operation")
index eef9ed8..9fcde31 100644 (file)
@@ -121,7 +121,7 @@ public class BPMNUtil {
 \r
        \r
        private static void buildVariable(String key, String value, Map<String,Object> variableValueType) {\r
-               Map<String, Object> host = new HashMap<String, Object>();\r
+               Map<String, Object> host = new HashMap<>();\r
                host.put("value", value);\r
                host.put("type", "String");\r
                variableValueType.put(key, host);\r
@@ -131,7 +131,7 @@ public class BPMNUtil {
                WorkflowResource workflowResource = new WorkflowResource();\r
                VariableMapImpl variableMap = new VariableMapImpl();\r
 \r
-               Map<String, Object> variableValueType = new HashMap<String, Object>();\r
+               Map<String, Object> variableValueType = new HashMap<>();\r
                for (String key : variables.keySet()) {\r
                        buildVariable(key, variables.get(key), variableValueType);\r
                }\r
@@ -203,7 +203,7 @@ public class BPMNUtil {
                WorkflowAsyncResource workflowResource = new WorkflowAsyncResource();\r
                VariableMapImpl variableMap = new VariableMapImpl();\r
 \r
-               Map<String, Object> variableValueType = new HashMap<String, Object>();\r
+               Map<String, Object> variableValueType = new HashMap<>();\r
                for (String key : variables.keySet()) {\r
                        buildVariable(key, variables.get(key), variableValueType);\r
                }\r
index b050a81..9d4dac2 100644 (file)
@@ -42,7 +42,7 @@ public class CompleteMsoProcessTest extends WorkflowTest {
                mockUpdateRequestDB(200, "Database/DBUpdateResponse.xml");\r
                \r
                //String changeFeatureActivateRequest = FileUtil.readResourceFile("__files/SDN-ETHERNET-INTERNET/ChangeFeatureActivateV1/" + inputRequestFile);\r
-               Map<String, String> variables = new HashMap<String, String>();          \r
+               Map<String, String> variables = new HashMap<>();\r
                variables.put("CompleteMsoProcessRequest",inputRequestFile);\r
                \r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "CompleteMsoProcess", variables);\r
index 1925c0a..845f060 100644 (file)
@@ -51,7 +51,7 @@ public class ConfirmVolumeGroupNameTest extends WorkflowTest {
                System.out.println("Before starting process");
                
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          
-               Map<String, Object> variables = new HashMap<String, Object>();          
+               Map<String, Object> variables = new HashMap<>();
                variables.put("isDebugLogEnabled","true");
                variables.put("ConfirmVolumeGroupName_volumeGroupId", "VOLUME_GROUP_ID_1");
                variables.put("ConfirmVolumeGroupName_volumeGroupName", "VOLUME_GROUP_ID_1_NAME");
@@ -83,7 +83,7 @@ public class ConfirmVolumeGroupNameTest extends WorkflowTest {
                System.out.println("Before starting process");
                
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          
-               Map<String, Object> variables = new HashMap<String, Object>();          
+               Map<String, Object> variables = new HashMap<>();
                variables.put("isDebugLogEnabled","true");
                variables.put("ConfirmVolumeGroupName_volumeGroupId", "VOLUME_GROUP_ID_THAT_DOES_NOT_EXIST");
                variables.put("ConfirmVolumeGroupName_volumeGroupName", "cee6d136-e378-4678-a024-2cd15f0ee0cg");
@@ -116,7 +116,7 @@ public class ConfirmVolumeGroupNameTest extends WorkflowTest {
                System.out.println("Before starting process");
                
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          
-               Map<String, Object> variables = new HashMap<String, Object>();          
+               Map<String, Object> variables = new HashMap<>();
                variables.put("isDebugLogEnabled","true");
                variables.put("ConfirmVolumeGroupName_volumeGroupId", "VOLUME_GROUP_ID_1");
                variables.put("ConfirmVolumeGroupName_volumeGroupName", "BAD_VOLUME_GROUP_NAME");
index 3856f7b..457128f 100644 (file)
@@ -46,7 +46,7 @@ public class ConfirmVolumeGroupTenantTest extends WorkflowTest {
        public void testRemoveLayer3Service_success() throws Exception{
                MockGetVolumeGroupById("MDTWNJ21", "a8399879-31b3-4973-be26-0a0cbe776b58", "CRTGVNF_queryAAIResponseVolume.xml");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables);
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "ConfirmVolumeGroupTenant", variables);
@@ -66,7 +66,7 @@ public class ConfirmVolumeGroupTenantTest extends WorkflowTest {
        public void testRemoveLayer3Service_idsNotMatch() throws Exception{
                MockGetVolumeGroupById("MDTWNJ21", "a8399879-31b3-4973-be26-0a0cbe776b58", "CRTGVNF_queryAAIResponseVolume_idsNotMatch.xml");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables);
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "ConfirmVolumeGroupTenant", variables);
index 045bd6f..b2b7760 100644 (file)
@@ -51,7 +51,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest {
                MockAAICreateGenericVnf();\r
                MockAAIVfModulePUT(true);\r
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          \r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("isVidRequest", "false");\r
                variables.put("vnfName", "STMTN5MMSC22");\r
@@ -78,7 +78,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest {
                MockAAICreateGenericVnf();\r
                MockAAIVfModulePUT(true);\r
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          \r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("isVidRequest", "false");\r
                variables.put("vnfId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");\r
@@ -103,7 +103,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest {
                MockAAICreateGenericVnf();\r
                MockAAIVfModulePUT(true);\r
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          \r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("isDebugLogEnabled","true");              \r
                variables.put("isVidRequest", "false");\r
                variables.put("vnfName", "STMTN5MMSC23");\r
@@ -128,7 +128,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest {
                MockAAICreateGenericVnf();\r
                MockAAIVfModulePUT(true);\r
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          \r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("isDebugLogEnabled","true");              \r
                variables.put("isVidRequest", "false");\r
                variables.put("vnfName", "STMTN5MMSC21");\r
@@ -153,7 +153,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest {
                MockAAICreateGenericVnf();\r
                MockAAIVfModulePUT(true);\r
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          \r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("isDebugLogEnabled","true");              \r
                variables.put("isVidRequest", "false");\r
                variables.put("vnfId", "2f6aee38-1e2a-11e6-82d1-ffc7d9ee8aa4");\r
@@ -178,7 +178,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest {
                MockAAICreateGenericVnf();\r
                MockAAIVfModulePUT(true);\r
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          \r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("isDebugLogEnabled","true");              \r
                variables.put("isVidRequest", "false");\r
                variables.put("vnfName", "STMTN5MMSC22");\r
@@ -203,7 +203,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest {
                MockAAICreateGenericVnf();\r
                MockAAIVfModulePUT(true);\r
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          \r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("isDebugLogEnabled","true");              \r
                variables.put("isVidRequest", "false");\r
                variables.put("vnfId", "768073c7-f41f-4822-9323-b75962763d74");\r
@@ -228,7 +228,7 @@ public class CreateAAIVfModuleTest extends WorkflowTest {
                MockAAICreateGenericVnf();\r
                MockAAIVfModulePUT(true);\r
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          \r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("isDebugLogEnabled","true");              \r
                variables.put("isVidRequest", "false");\r
                variables.put("vnfId", "a27ce5a9-29c4-4c22-a017-6615ac73c721");\r
index 5845ec1..5cc2645 100644 (file)
@@ -55,7 +55,7 @@ public class CreateAAIVfModuleVolumeGroupTest extends WorkflowTest {
                MockPutVfModuleIdNoResponse("skask", "PCRF", "lukewarm");\r
                \r
                String businessKey = UUID.randomUUID().toString();\r
-               Map<String, Object> variables = new HashMap<String, Object>();\r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("mso-request-id", "999-99-9999");\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("CreateAAIVfModuleVolumeGroupRequest", updateAAIVfModuleRequest);\r
@@ -86,7 +86,7 @@ public class CreateAAIVfModuleVolumeGroupTest extends WorkflowTest {
                MockGetVfModuleId("skask", ".*", "VfModularity/VfModule-supercool.xml", 404);\r
                \r
                String businessKey = UUID.randomUUID().toString();\r
-               Map<String, Object> variables = new HashMap<String, Object>();\r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("mso-request-id", "999-99-9999");\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("CreateAAIVfModuleVolumeGroupRequest", updateAAIVfModuleRequest);\r
@@ -117,7 +117,7 @@ public class CreateAAIVfModuleVolumeGroupTest extends WorkflowTest {
                MockGetVfModuleId("skask", "lukewarm", "VfModularity/VfModule-lukewarm.xml", 200);\r
 \r
                String businessKey = UUID.randomUUID().toString();\r
-               Map<String, Object> variables = new HashMap<String, Object>();\r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("mso-request-id", "999-99-9999");\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("CreateAAIVfModuleVolumeGroupRequest", updateAAIVfModuleRequest);\r
index bda6dd9..7295cd8 100644 (file)
@@ -49,7 +49,7 @@ public class DecomposeServiceTest extends WorkflowTest {
 
 
                String businessKey = UUID.randomUUID().toString();
-               Map<String, Object> variables = new HashMap<String, Object>();
+               Map<String, Object> variables = new HashMap<>();
                setVariablesSuccess(variables, "testRequestId123", "ff5256d2-5a33-55df-13ab-12abad84e7ff");
                invokeSubProcess("DecomposeService", businessKey, variables);
 
@@ -66,7 +66,7 @@ public class DecomposeServiceTest extends WorkflowTest {
 
 
                String businessKey = UUID.randomUUID().toString();
-               Map<String, Object> variables = new HashMap<String, Object>();
+               Map<String, Object> variables = new HashMap<>();
                setVariablesSuccess(variables, "testRequestId123", "ff5256d2-5a33-55df-13ab-12abad84e7ff");
                invokeSubProcess("DecomposeService", businessKey, variables);
 
index bb2fc03..564927a 100644 (file)
@@ -52,7 +52,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest {
                MockAAIDeleteGenericVnf();\r
                MockAAIDeleteVfModule();\r
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          \r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("DeleteAAIVfModuleRequest","<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\"> <request-info> <action>DELETE_VF_MODULE</action> <source>PORTAL</source> </request-info> <vnf-inputs> <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c721</vnf-id> <vnf-name>STMTN5MMSC21</vnf-name> <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a73</vf-module-id> <vf-module-name>STMTN5MMSC21-MMSC::module-0-0</vf-module-name> </vnf-inputs> <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/> </vnf-request>");\r
                runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);\r
@@ -88,7 +88,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest {
                MockAAIDeleteGenericVnf();\r
                MockAAIDeleteVfModule();\r
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          \r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("DeleteAAIVfModuleRequest",request);\r
                runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);\r
@@ -123,7 +123,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest {
                MockAAIDeleteGenericVnf();\r
                MockAAIDeleteVfModule();\r
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          \r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("DeleteAAIVfModuleRequest",request);\r
                runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);\r
@@ -158,7 +158,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest {
                MockAAIDeleteGenericVnf();\r
                MockAAIDeleteVfModule();\r
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          \r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("DeleteAAIVfModuleRequest",request);\r
                runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);\r
@@ -193,7 +193,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest {
                MockAAIDeleteGenericVnf();\r
                MockAAIDeleteVfModule();\r
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          \r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("DeleteAAIVfModuleRequest",request);\r
                runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);\r
@@ -228,7 +228,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest {
                MockAAIDeleteGenericVnf();\r
                MockAAIDeleteVfModule();\r
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          \r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("DeleteAAIVfModuleRequest",request);\r
                runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);\r
@@ -263,7 +263,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest {
                MockAAIDeleteGenericVnf();\r
                MockAAIDeleteVfModule();\r
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          \r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("DeleteAAIVfModuleRequest",request);\r
                runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);\r
@@ -284,7 +284,7 @@ public class DeleteAAIVfModuleTest extends WorkflowTest {
                MockAAIDeleteGenericVnf();\r
                MockAAIDeleteVfModule();\r
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          \r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("DeleteAAIVfModuleRequest","<vnf-request xmlns=\"http://openecomp.org/mso/infra/vnf-request/v1\"> <request-info> <action>DELETE_VF_MODULE</action> <source>PORTAL</source> </request-info> <vnf-inputs> <vnf-id>a27ce5a9-29c4-4c22-a017-6615ac73c720</vnf-id> <vnf-name>STMTN5MMSC20</vnf-name> <vf-module-id>973ed047-d251-4fb9-bf1a-65b8949e0a76</vf-module-id> <vf-module-name>STMTN5MMSC20-MMSC::module-2-0</vf-module-name> </vnf-inputs> <vnf-params xmlns:tns=\"http://openecomp.org/mso/infra/vnf-request/v1\"/> </vnf-request>");\r
                runtimeService.startProcessInstanceByKey("DeleteAAIVfModule", variables);\r
index 8281687..257cec9 100644 (file)
@@ -58,7 +58,7 @@ public class FalloutHandlerTest extends WorkflowTest {
                System.out.println("STARTED TEST: " + method);\r
         \r
                //String changeFeatureActivateRequest = FileUtil.readResourceFile("__files/SDN-ETHERNET-INTERNET/ChangeFeatureActivateV1/" + inputRequestFile);\r
-               Map<String, String> variables = new HashMap<String, String>();          \r
+               Map<String, String> variables = new HashMap<>();\r
                variables.put("FalloutHandlerRequest",inputRequestFile);\r
                \r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "FalloutHandler", variables);\r
index cced8c1..125a9ad 100644 (file)
@@ -51,7 +51,7 @@ public class GenericDeleteServiceTest extends WorkflowTest {
        @Deployment(resources = {"subprocess/GenericDeleteService.bpmn"})
        public void testGenericDeleteService_success_serviceInstance() throws Exception{
                MockDeleteServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "1234");
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234");
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
                waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());
@@ -70,7 +70,7 @@ public class GenericDeleteServiceTest extends WorkflowTest {
 
                MockDeleteServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234", 204);
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariablesSubscription(variables, "", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
@@ -94,7 +94,7 @@ public class GenericDeleteServiceTest extends WorkflowTest {
                MockGetServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceSubscription.xml");
                MockDeleteServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "1234");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", null);
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
@@ -118,7 +118,7 @@ public class GenericDeleteServiceTest extends WorkflowTest {
                MockGetServiceSubscription("1604-MVM-26", "SDN-ETHERNET-INTERNET", "GenericFlows/getServiceSubscription.xml");
                MockDeleteServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234", 204);
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariablesSubscription(variables, null, "1604-MVM-26", "SDN-ETHERNET-INTERNET", null);
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
@@ -142,7 +142,7 @@ public class GenericDeleteServiceTest extends WorkflowTest {
 
                MockGetServiceInstance_404("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", null);
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
@@ -164,7 +164,7 @@ public class GenericDeleteServiceTest extends WorkflowTest {
        public void testGenericDeleteService_success_subscriptionGetEmpty200() throws Exception{
                MockGetServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234", 200);
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariablesSubscription(variables, "", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
@@ -189,7 +189,7 @@ public class GenericDeleteServiceTest extends WorkflowTest {
                MockGetServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "GENDSI_getServiceInstanceResponse.xml");
                MockDeleteServiceInstance_404("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "1234");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "1234");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
@@ -210,7 +210,7 @@ public class GenericDeleteServiceTest extends WorkflowTest {
        @Deployment(resources = {"subprocess/GenericDeleteService.bpmn"})
        public void testGenericDeleteService_error_invalidVariables() throws Exception{
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "1234");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
@@ -236,7 +236,7 @@ public class GenericDeleteServiceTest extends WorkflowTest {
 
                MockGetServiceInstance_500("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", "aaiFault.xml");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", null);
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteService", variables);
index 473f6c8..add9a32 100644 (file)
@@ -51,7 +51,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
        public void testGenericDeleteVnf_success_genericVnf() throws Exception{
                MockDeleteGenericVnf("testVnfId123", "testReVer123");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", "generic-vnf", "testReVer123");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
@@ -66,7 +66,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
        public void testGenericDeleteVnf_success_vce() throws Exception{
                MockDeleteVce("testVnfId123", "testReVer123", 204);
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", "vce", "testReVer123");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
@@ -83,7 +83,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
                MockGetGenericVnfById("/testVnfId123", "GenericFlows/getGenericVnfByNameResponse.xml", 200);
                MockDeleteGenericVnf("testVnfId123", "testReVer123");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", "generic-vnf", "");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
@@ -99,7 +99,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
                MockDeleteVce("testVnfId123", "testReVer123", 204);
                MockGetVceById("testVnfId123", "GenericFlows/getVceResponse.xml");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", "vce", null);
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
@@ -114,7 +114,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
        public void testGenericDeleteVnf_success_genericVnf404() throws Exception{
                MockDeleteGenericVnf("testVnfId123", "testReVer123", 404);
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", "generic-vnf", "testReVer123");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
@@ -129,7 +129,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
        public void testGenericDeleteVnf_success_vce404() throws Exception{
                MockDeleteVce("testVnfId123", "testReVer123", 404);
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", "vce", "testReVer123");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
@@ -144,7 +144,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
        public void testGenericDeleteVnf_success_genericVnfNoResourceVersion404() throws Exception{
                MockGetGenericVnfById_404("testVnfId123");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", "generic-vnf", "");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
@@ -158,7 +158,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
        @Deployment(resources = {"subprocess/GenericDeleteVnf.bpmn"})
        public void testGenericDeleteVnf_error_missingVariables() throws Exception{
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", "", "testReVer123");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
@@ -173,7 +173,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
        public void testGenericDeleteVnf_error_genericVnf500() throws Exception{
 
                MockDeleteGenericVnf_500("testVnfId123", "testReVer123");
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", "generic-vnf", "testReVer123");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
@@ -188,7 +188,7 @@ public class GenericDeleteVnfTest extends WorkflowTest {
        public void testGenericDeleteVnf_error_genericVnf412() throws Exception{
                MockDeleteGenericVnf("testVnfId123", "testReVer123", 412);
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", "generic-vnf", "testReVer123");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericDeleteVnf", variables);
index 82cceb0..0198395 100644 (file)
@@ -56,7 +56,7 @@ public class GenericGetServiceTest extends WorkflowTest {
        @Deployment(resources = {"subprocess/GenericGetService.bpmn"})\r
        public void testGenericGetService_success_serviceInstance() throws Exception{\r
                MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");\r
-               Map<String, String> variables = new HashMap<String, String>();\r
+               Map<String, String> variables = new HashMap<>();\r
                setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");\r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);\r
                waitForWorkflowToFinish(processEngineRule, workflowResponse.getProcessInstanceID());\r
@@ -81,7 +81,7 @@ public class GenericGetServiceTest extends WorkflowTest {
 \r
                MockGetServiceSubscription("1604-MVM-26", "SDN-ETHERNET-INTERNET", "GenericFlows/getServiceSubscription.xml");\r
 \r
-               Map<String, String> variables = new HashMap<String, String>();\r
+               Map<String, String> variables = new HashMap<>();\r
                setVariablesSubscription(variables, "", null , "1604-MVM-26", "SDN-ETHERNET-INTERNET");\r
 \r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);\r
@@ -109,7 +109,7 @@ public class GenericGetServiceTest extends WorkflowTest {
                MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByName.xml");\r
                MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");\r
 \r
-               Map<String, String> variables = new HashMap<String, String>();\r
+               Map<String, String> variables = new HashMap<>();\r
                setVariablesInstance(variables, null, "1604-MVM-26", null, null);\r
 \r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);\r
@@ -139,7 +139,7 @@ public class GenericGetServiceTest extends WorkflowTest {
                MockNodeQueryServiceInstanceById("MIS%2F1604%2F0026%2FSW_INTERNET", "GenericFlows/getSIUrlById.xml");\r
                MockGetServiceInstance("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");\r
 \r
-               Map<String, String> variables = new HashMap<String, String>();\r
+               Map<String, String> variables = new HashMap<>();\r
                setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);\r
 \r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);\r
@@ -168,7 +168,7 @@ public class GenericGetServiceTest extends WorkflowTest {
 \r
                MockGetServiceInstance_404("SDN-ETHERNET-INTERNET", "123456789", "MIS%2F1604%2F0026%2FSW_INTERNET");\r
 \r
-               Map<String, String> variables = new HashMap<String, String>();\r
+               Map<String, String> variables = new HashMap<>();\r
                setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");\r
 \r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);\r
@@ -192,7 +192,7 @@ public class GenericGetServiceTest extends WorkflowTest {
        public void testGenericGetService_success_serviceSubscription404() throws Exception{\r
                MockGetServiceSubscription("1604-MVM-26", "SDN-ETHERNET-INTERNET", 404);\r
                \r
-               Map<String, String> variables = new HashMap<String, String>();\r
+               Map<String, String> variables = new HashMap<>();\r
                setVariablesSubscription(variables, "", "", "SDN-ETHERNET-INTERNET", "1604-MVM-26");\r
 \r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);\r
@@ -219,7 +219,7 @@ public class GenericGetServiceTest extends WorkflowTest {
 \r
                MockNodeQueryServiceInstanceByName_404("1604-MVM-26");\r
 \r
-               Map<String, String> variables = new HashMap<String, String>();\r
+               Map<String, String> variables = new HashMap<>();\r
                setVariablesInstance(variables, "", "1604-MVM-26", null, null);\r
 \r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);\r
@@ -246,7 +246,7 @@ public class GenericGetServiceTest extends WorkflowTest {
 \r
                MockNodeQueryServiceInstanceById_404("MIS%2F1604%2F0026%2FSW_INTERNET");\r
 \r
-               Map<String, String> variables = new HashMap<String, String>();\r
+               Map<String, String> variables = new HashMap<>();\r
                setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);\r
 \r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);\r
@@ -273,7 +273,7 @@ public class GenericGetServiceTest extends WorkflowTest {
 \r
                MockGetServiceInstance("1604-MVM-26", "SDN-ETHERNET-INTERNET", "MIS%252F1604%252F0026%252FSW_INTERNET", " ");\r
 \r
-               Map<String, String> variables = new HashMap<String, String>();\r
+               Map<String, String> variables = new HashMap<>();\r
                setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, "SDN-ETHERNET-INTERNET", "123456789");\r
 \r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);\r
@@ -297,7 +297,7 @@ public class GenericGetServiceTest extends WorkflowTest {
        public void testGenericGetService_success_serviceInstanceByNameEmpty() throws Exception{\r
                MockNodeQueryServiceInstanceByName("1604-MVM-26", "");\r
                \r
-               Map<String, String> variables = new HashMap<String, String>();\r
+               Map<String, String> variables = new HashMap<>();\r
                setVariablesInstance(variables, "", "1604-MVM-26", null, null);\r
 \r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);\r
@@ -324,7 +324,7 @@ public class GenericGetServiceTest extends WorkflowTest {
 \r
                MockNodeQueryServiceInstanceById("MIS[%]2F1604[%]2F0026[%]2FSW_INTERNET", "");\r
 \r
-               Map<String, String> variables = new HashMap<String, String>();\r
+               Map<String, String> variables = new HashMap<>();\r
                setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);\r
 \r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);\r
@@ -350,7 +350,7 @@ public class GenericGetServiceTest extends WorkflowTest {
        @Deployment(resources = {"subprocess/GenericGetService.bpmn"})\r
        public void testGenericGetService_error_serviceInstanceInvalidVariables() throws Exception{\r
 \r
-               Map<String, String> variables = new HashMap<String, String>();\r
+               Map<String, String> variables = new HashMap<>();\r
                setVariablesInstance(variables, null, null, "SDN-ETHERNET-INTERNET", null);\r
 \r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);\r
@@ -375,7 +375,7 @@ public class GenericGetServiceTest extends WorkflowTest {
        @Deployment(resources = {"subprocess/GenericGetService.bpmn"})\r
        public void testGenericGetService_success_serviceSubscriptionInvalidVariables() throws Exception{\r
 \r
-               Map<String, String> variables = new HashMap<String, String>();\r
+               Map<String, String> variables = new HashMap<>();\r
                setVariablesSubscription(variables, "", "", "SDN-ETHERNET-INTERNET", null);\r
 \r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);\r
@@ -403,7 +403,7 @@ public class GenericGetServiceTest extends WorkflowTest {
 \r
                MockGetServiceInstance_500("SDN-ETHERNET-INTERNET", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET");\r
 \r
-               Map<String, String> variables = new HashMap<String, String>();\r
+               Map<String, String> variables = new HashMap<>();\r
                setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", "1604-MVM-26", "SDN-ETHERNET-INTERNET", "123456789");\r
 \r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);\r
@@ -430,7 +430,7 @@ public class GenericGetServiceTest extends WorkflowTest {
 \r
                MockNodeQueryServiceInstanceById_500("MIS%2F1604%2F0026%2FSW_INTERNET");\r
 \r
-               Map<String, String> variables = new HashMap<String, String>();\r
+               Map<String, String> variables = new HashMap<>();\r
                setVariablesInstance(variables, "MIS%2F1604%2F0026%2FSW_INTERNET", null, null, null);\r
 \r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);\r
@@ -459,7 +459,7 @@ public class GenericGetServiceTest extends WorkflowTest {
 \r
                MockNodeQueryServiceInstanceByName_500("1604-MVM-26");\r
 \r
-               Map<String, String> variables = new HashMap<String, String>();\r
+               Map<String, String> variables = new HashMap<>();\r
                setVariablesInstance(variables, null, "1604-MVM-26", null, null);\r
 \r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);\r
@@ -489,7 +489,7 @@ public class GenericGetServiceTest extends WorkflowTest {
         MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByNameMultiCustomer.xml");\r
         MockGetServiceInstance("XyCorporation", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");\r
 \r
-        Map<String, String> variables = new HashMap<String, String>();\r
+        Map<String, String> variables = new HashMap<>();\r
         setVariablesInstance(variables, null, "1604-MVM-26", "XyCorporation", null);\r
 \r
         WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);\r
@@ -517,7 +517,7 @@ public class GenericGetServiceTest extends WorkflowTest {
                MockNodeQueryServiceInstanceByName("1604-MVM-26", "GenericFlows/getSIUrlByNameMultiCustomer.xml");\r
                MockGetServiceInstance("CorporationNotPresent", "123456789", "MIS%252F1604%252F0026%252FSW_INTERNET", "GenericFlows/getServiceInstance.xml");\r
 \r
-               Map<String, String> variables = new HashMap<String, String>();\r
+               Map<String, String> variables = new HashMap<>();\r
                setVariablesInstance(variables, null, "1604-MVM-26", "CorporationNotPresent", null);\r
 \r
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetService", variables);\r
index 126a5fd..4922263 100644 (file)
@@ -52,7 +52,7 @@ public class GenericGetVnfTest extends WorkflowTest {
        public void testGenericGetVnf_success_genericVnf() throws Exception{
                MockGetGenericVnfByIdWithDepth("testVnfId123", 1, "GenericFlows/getGenericVnfByNameResponse.xml");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", "testVnfName123", "generic-vnf");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables);
@@ -79,7 +79,7 @@ public class GenericGetVnfTest extends WorkflowTest {
        public void testGenericGetVnf_success_vce() throws Exception{
                MockGetVceById("testVnfId123[?]depth=1", "GenericFlows/getVceResponse.xml");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", "testVnfName123", "vce");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables);
@@ -106,7 +106,7 @@ public class GenericGetVnfTest extends WorkflowTest {
        public void testGenericGetVnf_success_genericVnfByName() throws Exception{
                MockGetGenericVnfByNameWithDepth("testVnfName123", 1, "GenericFlows/getGenericVnfResponse.xml");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "", "testVnfName123", "generic-vnf");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables);
@@ -133,7 +133,7 @@ public class GenericGetVnfTest extends WorkflowTest {
        public void testGenericGetVnf_success_vceByName() throws Exception{
                MockGetGenericVceByNameWithDepth("testVnfName123", 1, "GenericFlows/getVceByNameResponse.xml");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, null, "testVnfName123", "vce");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables);
@@ -162,7 +162,7 @@ public class GenericGetVnfTest extends WorkflowTest {
 
                MockGetGenericVnfById_500("testVnfId123");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", "testVnfName123", "generic-vnf");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericGetVnf", variables);
index 149f8ae..0e0a237 100644 (file)
@@ -51,7 +51,7 @@ public class GenericPutVnfTest extends WorkflowTest {
 
                MockPutGenericVnf("testVnfId123");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", genericVnfPayload, "generic-vnf");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables);
@@ -71,7 +71,7 @@ public class GenericPutVnfTest extends WorkflowTest {
 
                MockPutVce("testVnfId123");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", vcePayload, "vce");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables);
@@ -91,7 +91,7 @@ public class GenericPutVnfTest extends WorkflowTest {
 
                MockPutGenericVnf("testVnfId123");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", genericVnfPayload, "");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables);
@@ -113,7 +113,7 @@ public class GenericPutVnfTest extends WorkflowTest {
 
                MockPutGenericVnf("testVnfId123");
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", genericVnfPayload, "");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables);
@@ -133,7 +133,7 @@ public class GenericPutVnfTest extends WorkflowTest {
        @Deployment(resources = {"subprocess/GenericPutVnf.bpmn"})
        public void testGenericPutVnf_error_404() throws Exception{
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", genericVnfPayload, "generic-vnf");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables);
@@ -154,7 +154,7 @@ public class GenericPutVnfTest extends WorkflowTest {
 
                MockPutGenericVnf("/testVnfId123", 400);
 
-               Map<String, String> variables = new HashMap<String, String>();
+               Map<String, String> variables = new HashMap<>();
                setVariables(variables, "testVnfId123", genericVnfPayload, "generic-vnf");
 
                WorkflowResponse workflowResponse = executeWorkFlow(processEngineRule, "GenericPutVnf", variables);
index e49ef00..4296c74 100644 (file)
@@ -140,7 +140,7 @@ public class HomingTest extends WorkflowTest {
                mockSNIRO();
 
                String businessKey = UUID.randomUUID().toString();
-               Map<String, Object> variables = new HashMap<String, Object>();
+               Map<String, Object> variables = new HashMap<>();
                setVariables(variables);
 
                invokeSubProcess("Homing", businessKey, variables);
@@ -183,7 +183,7 @@ public class HomingTest extends WorkflowTest {
                mockSNIRO();
 
                String businessKey = UUID.randomUUID().toString();
-               Map<String, Object> variables = new HashMap<String, Object>();
+               Map<String, Object> variables = new HashMap<>();
                setVariables2(variables);
 
                invokeSubProcess("Homing", businessKey, variables);
@@ -237,7 +237,7 @@ public class HomingTest extends WorkflowTest {
 //System.out.println("At start of testHoming_success_vnfResourceList");
                MockGetServiceResourcesCatalogData("1cc4e2e4-eb6e-404d-a66f-c8733cedcce8", "5.0", "/BuildingBlocks/catalogResp.json");
                String busKey = UUID.randomUUID().toString();
-               Map<String, Object> vars = new HashMap<String, Object>();
+               Map<String, Object> vars = new HashMap<>();
                setVariablesForServiceDecomposition(vars, "testRequestId123", "ff5256d2-5a33-55df-13ab-12abad84e7ff");
                invokeSubProcess("DecomposeService", busKey, vars);
                
@@ -252,7 +252,7 @@ public class HomingTest extends WorkflowTest {
                mockSNIRO();
 
                String businessKey = UUID.randomUUID().toString();
-               Map<String, Object> variables = new HashMap<String, Object>();
+               Map<String, Object> variables = new HashMap<>();
                variables.put("isDebugLogEnabled", "true");
                variables.put("msoRequestId", "testRequestId");
                variables.put("serviceInstanceId", "testServiceInstanceId");
@@ -288,7 +288,7 @@ public class HomingTest extends WorkflowTest {
        public void testHoming_error_inputVariable() throws Exception {
 
                String businessKey = UUID.randomUUID().toString();
-               Map<String, Object> variables = new HashMap<String, Object>();
+               Map<String, Object> variables = new HashMap<>();
                setVariables3(variables);
 
                invokeSubProcess("Homing", businessKey, variables);
@@ -307,7 +307,7 @@ public class HomingTest extends WorkflowTest {
                mockSNIRO_500();
 
                String businessKey = UUID.randomUUID().toString();
-               Map<String, Object> variables = new HashMap<String, Object>();
+               Map<String, Object> variables = new HashMap<>();
                setVariables(variables);
 
                invokeSubProcess("Homing", businessKey, variables);
@@ -326,7 +326,7 @@ public class HomingTest extends WorkflowTest {
                mockSNIRO();
 
                String businessKey = UUID.randomUUID().toString();
-               Map<String, Object> variables = new HashMap<String, Object>();
+               Map<String, Object> variables = new HashMap<>();
                setVariables(variables);
 
                invokeSubProcess("Homing", businessKey, variables);
@@ -347,7 +347,7 @@ public class HomingTest extends WorkflowTest {
                mockSNIRO();
 
                String businessKey = UUID.randomUUID().toString();
-               Map<String, Object> variables = new HashMap<String, Object>();
+               Map<String, Object> variables = new HashMap<>();
                setVariables(variables);
 
                invokeSubProcess("Homing", businessKey, variables);
@@ -368,7 +368,7 @@ public class HomingTest extends WorkflowTest {
                mockSNIRO();
 
                String businessKey = UUID.randomUUID().toString();
-               Map<String, Object> variables = new HashMap<String, Object>();
+               Map<String, Object> variables = new HashMap<>();
                setVariables(variables);
 
                invokeSubProcess("Homing", businessKey, variables);
index 6141ee0..a7c2d19 100644 (file)
@@ -67,7 +67,7 @@ public class ManualHandlingTest extends WorkflowTest {
        public void  TestManualHandlingSuccess() {
 
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          
-               Map<String, Object> variables = new HashMap<String, Object>();          
+               Map<String, Object> variables = new HashMap<>();
                variables.put("isDebugLogEnabled","true");
                variables.put("msoRequestId", "testRequestId");
                variables.put("serviceType", "X");
@@ -103,7 +103,7 @@ public class ManualHandlingTest extends WorkflowTest {
                        System.out.println("TASK NAME: " + task.getName());
                        try {
                                System.out.println("Completing the task");
-                               Map<String,Object> completeVariables = new HashMap<String,Object>();
+                               Map<String,Object> completeVariables = new HashMap<>();
                                completeVariables.put("responseValue", "skip");
                                taskService.complete(task.getId(), completeVariables);                  
                        }
index 441cefd..be74770 100644 (file)
@@ -60,7 +60,7 @@ public class PrepareUpdateAAIVfModuleTest extends WorkflowTest {
                MockPatchVfModuleId("skask", "supercool");\r
                \r
                String businessKey = UUID.randomUUID().toString();\r
-               Map<String, Object> variables = new HashMap<String, Object>();\r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("mso-request-id", "999-99-9999");\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);\r
@@ -94,7 +94,7 @@ public class PrepareUpdateAAIVfModuleTest extends WorkflowTest {
                MockGetGenericVnfById_404("skask[?]depth=1");\r
                \r
                String businessKey = UUID.randomUUID().toString();\r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("mso-request-id", "999-99-9999");\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);\r
@@ -129,7 +129,7 @@ public class PrepareUpdateAAIVfModuleTest extends WorkflowTest {
                MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");\r
                \r
                String businessKey = UUID.randomUUID().toString();\r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("mso-request-id", "999-99-9999");\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);\r
@@ -159,7 +159,7 @@ public class PrepareUpdateAAIVfModuleTest extends WorkflowTest {
                MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");              \r
                \r
                String businessKey = UUID.randomUUID().toString();\r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("mso-request-id", "999-99-9999");\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);\r
@@ -190,7 +190,7 @@ public class PrepareUpdateAAIVfModuleTest extends WorkflowTest {
                MockAAIVfModuleBadPatch("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask/vf-modules/vf-module/supercool", 404);\r
                \r
                String businessKey = UUID.randomUUID().toString();\r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("mso-request-id", "999-99-9999");\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("PrepareUpdateAAIVfModuleRequest", prepareUpdateAAIVfModuleRequest);\r
index 8a78f32..65575ba 100644 (file)
@@ -57,7 +57,7 @@ public class RainyDayHandlerTest extends WorkflowTest {
        public void  TestRainyDayHandlingSuccess() {\r
 \r
                RuntimeService runtimeService = processEngineRule.getRuntimeService();                          \r
-               Map<String, Object> variables = new HashMap<String, Object>();          \r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("msoRequestId", "testRequestId");\r
                variables.put("serviceType", "X");\r
index 4669192..a806515 100644 (file)
@@ -85,7 +85,7 @@ public class ReceiveWorkflowMessageTest extends WorkflowTest {
                logStart();
 
                String businessKey = UUID.randomUUID().toString();
-               Map<String, Object> variables = new HashMap<String, Object>();
+               Map<String, Object> variables = new HashMap<>();
                variables.put("mso-request-id", "dffbae0e-5588-4bd6-9749-b0f0adb52312");
                variables.put("isDebugLogEnabled", "true");
                variables.put("RCVWFMSG_timeout", "PT1M");
@@ -115,7 +115,7 @@ public class ReceiveWorkflowMessageTest extends WorkflowTest {
                logStart();
 
                String businessKey = UUID.randomUUID().toString();
-               Map<String, Object> variables = new HashMap<String, Object>();
+               Map<String, Object> variables = new HashMap<>();
                variables.put("mso-request-id", "dffbae0e-5588-4bd6-9749-b0f0adb52312");
                variables.put("isDebugLogEnabled", "true");
                variables.put("RCVWFMSG_timeout", "PT0.1S");
index 778eec1..0349b17 100644 (file)
@@ -75,12 +75,12 @@ public class SDNCAdapterV1Test extends WorkflowTest {
 \r
        private WorkflowResponse invokeFlow(String workflowRequest) {\r
 \r
-               Map<String, Object>valueMap = new HashMap<String, Object>();\r
+               Map<String, Object>valueMap = new HashMap<>();\r
                valueMap.put("value", workflowRequest);\r
-               Map<String, Object> variables = new HashMap<String, Object>();\r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("sdncAdapterWorkflowRequest", valueMap);\r
 \r
-               Map<String, Object> valueMap2 = new HashMap<String, Object>();\r
+               Map<String, Object> valueMap2 = new HashMap<>();\r
                valueMap2.put("value", "true");\r
                variables.put("isDebugLogEnabled", valueMap2);\r
 \r
index 20f6f6d..7c557ff 100644 (file)
@@ -59,7 +59,7 @@ public class UpdateAAIGenericVnfTest extends WorkflowTest {
                MockPatchGenericVnf("skask");\r
                \r
                String businessKey = UUID.randomUUID().toString();\r
-               Map<String, Object> variables = new HashMap<String, Object>();\r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("mso-request-id", "999-99-9999");\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);\r
@@ -92,7 +92,7 @@ public class UpdateAAIGenericVnfTest extends WorkflowTest {
                MockGetGenericVnfByIdWithDepth("skask", 1, "VfModularity/GenericVnf.xml");\r
                \r
                String businessKey = UUID.randomUUID().toString();\r
-               Map<String, Object> variables = new HashMap<String, Object>();\r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("mso-request-id", "999-99-9999");\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);\r
@@ -122,7 +122,7 @@ public class UpdateAAIGenericVnfTest extends WorkflowTest {
                MockGetGenericVnfById_404("skask[?]depth=1");\r
                \r
                String businessKey = UUID.randomUUID().toString();\r
-               Map<String, Object> variables = new HashMap<String, Object>();\r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("mso-request-id", "999-99-9999");\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);\r
@@ -156,7 +156,7 @@ public class UpdateAAIGenericVnfTest extends WorkflowTest {
                MockAAIVfModuleBadPatch("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask", 404);\r
                \r
                String businessKey = UUID.randomUUID().toString();\r
-               Map<String, Object> variables = new HashMap<String, Object>();\r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("mso-request-id", "999-99-9999");\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("UpdateAAIGenericVnfRequest", updateAAIGenericVnfRequest);\r
index 0e523cb..30d7e6d 100644 (file)
@@ -58,7 +58,7 @@ public class UpdateAAIVfModuleTest extends WorkflowTest {
                MockPatchVfModuleId("skask", "supercool");\r
                \r
                String businessKey = UUID.randomUUID().toString();\r
-               Map<String, Object> variables = new HashMap<String, Object>();\r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("mso-request-id", "999-99-9999");\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("UpdateAAIVfModuleRequest", updateAAIVfModuleRequest);\r
@@ -89,7 +89,7 @@ public class UpdateAAIVfModuleTest extends WorkflowTest {
                MockGetGenericVnfById("/skask/vf-modules/vf-module/.*", "VfModularity/VfModule-supercool.xml", 404);\r
                \r
                String businessKey = UUID.randomUUID().toString();\r
-               Map<String, Object> variables = new HashMap<String, Object>();\r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("mso-request-id", "999-99-9999");\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("UpdateAAIVfModuleRequest", updateAAIVfModuleRequest);\r
@@ -122,7 +122,7 @@ public class UpdateAAIVfModuleTest extends WorkflowTest {
                MockAAIVfModuleBadPatch("/aai/v[0-9]+/network/generic-vnfs/generic-vnf/skask/vf-modules/vf-module/supercool", 404);\r
                \r
                String businessKey = UUID.randomUUID().toString();\r
-               Map<String, Object> variables = new HashMap<String, Object>();\r
+               Map<String, Object> variables = new HashMap<>();\r
                variables.put("mso-request-id", "999-99-9999");\r
                variables.put("isDebugLogEnabled","true");\r
                variables.put("UpdateAAIVfModuleRequest", updateAAIVfModuleRequest);\r
index 707fe46..fb029fa 100644 (file)
@@ -241,7 +241,7 @@ public class VnfAdapterRestV1Test extends WorkflowTest {
                String request = CREATE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
 
                String businessKey = UUID.randomUUID().toString();
-               Map<String, Object> variables = new HashMap<String, Object>();
+               Map<String, Object> variables = new HashMap<>();
                variables.put("mso-request-id", requestId);
                variables.put("isDebugLogEnabled", "true");
                variables.put("vnfAdapterRestV1Request", request);
@@ -272,7 +272,7 @@ public class VnfAdapterRestV1Test extends WorkflowTest {
                String request = UPDATE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
 
                String businessKey = UUID.randomUUID().toString();
-               Map<String, Object> variables = new HashMap<String, Object>();
+               Map<String, Object> variables = new HashMap<>();
                variables.put("mso-request-id", requestId);
                variables.put("isDebugLogEnabled", "true");
                variables.put("vnfAdapterRestV1Request", request);
@@ -303,7 +303,7 @@ public class VnfAdapterRestV1Test extends WorkflowTest {
                String request = DELETE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
 
                String businessKey = UUID.randomUUID().toString();
-               Map<String, Object> variables = new HashMap<String, Object>();
+               Map<String, Object> variables = new HashMap<>();
                variables.put("mso-request-id", requestId);
                variables.put("isDebugLogEnabled", "true");
                variables.put("vnfAdapterRestV1Request", request);
@@ -334,7 +334,7 @@ public class VnfAdapterRestV1Test extends WorkflowTest {
                String request = ROLLBACK_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
 
                String businessKey = UUID.randomUUID().toString();
-               Map<String, Object> variables = new HashMap<String, Object>();
+               Map<String, Object> variables = new HashMap<>();
                variables.put("mso-request-id", requestId);
                variables.put("isDebugLogEnabled", "true");
                variables.put("vnfAdapterRestV1Request", request);
@@ -365,7 +365,7 @@ public class VnfAdapterRestV1Test extends WorkflowTest {
                String request = CREATE_VF_MODULE_REQUEST.replace("{{MESSAGE-ID}}", messageId);
 
                String businessKey = UUID.randomUUID().toString();
-               Map<String, Object> variables = new HashMap<String, Object>();
+               Map<String, Object> variables = new HashMap<>();
                variables.put("mso-request-id", requestId);
                variables.put("isDebugLogEnabled", "true");
                variables.put("vnfAdapterRestV1Request", request);
index 426bcee..5f91298 100644 (file)
@@ -42,7 +42,7 @@ public class WorkflowAsyncResourceTest extends WorkflowTest {
                //it can be any request which asynchronously processed by the workflow
                String request = "<aetgt:CreateTenantRequest xmlns:aetgt=\"http://org.openecomp/mso/workflow/schema/v1\" xmlns:sdncadapterworkflow=\"http://org.openecomp/mso/workflow/schema/v1\" xmlns:ns5=\"http://org.openecomp/mso/request/types/v1\">  <msoservtypes:service-information xmlns:msoservtypes=\"http://org.openecomp/mso/request/types/v1\">    <msoservtypes:service-type>SDN-ETHERNET-INTERNET</msoservtypes:service-type>    <msoservtypes:service-instance-id>HI/VLXM/950604//SW_INTERNET</msoservtypes:service-instance-id>    <msoservtypes:subscriber-name>SubName01</msoservtypes:subscriber-name> </msoservtypes:service-information> </aetgt:CreateTenantRequest>";
 
-               Map<String,String> variables = new HashMap<String,String>();
+               Map<String,String> variables = new HashMap<>();
                variables.put("testAsyncRequestMsg", request);
                variables.put("mso-request-id", UUID.randomUUID().toString());
                variables.put("mso-service-request-timeout", "5");
@@ -56,17 +56,17 @@ public class WorkflowAsyncResourceTest extends WorkflowTest {
                WorkflowAsyncResource workflowResource = new WorkflowAsyncResource();
                VariableMapImpl variableMap = new VariableMapImpl();
 
-               Map<String, Object> variableValueType = new HashMap<String, Object>();
+               Map<String, Object> variableValueType = new HashMap<>();
 
-               Map<String, Object> requestMsg = new HashMap<String, Object>();
+               Map<String, Object> requestMsg = new HashMap<>();
                requestMsg.put("value", request);
                requestMsg.put("type", "String");
 
-               Map<String, Object> msorequestId = new HashMap<String, Object>();
+               Map<String, Object> msorequestId = new HashMap<>();
                msorequestId.put("type", "String");
                msorequestId.put("value",requestId);
 
-               Map<String, Object> timeout = new HashMap<String, Object>();
+               Map<String, Object> timeout = new HashMap<>();
                timeout.put("type", "String");
                timeout.put("value","5"); 
 
index df15a2a..b71f708 100644 (file)
@@ -327,7 +327,7 @@ public class WorkflowTest {
                        String businessKey, String request, Map<String, Object> injectedVariables,\r
                        boolean serviceInstantiationModel) {\r
 \r
-               Map<String, Object> variables = new HashMap<String, Object>();\r
+               Map<String, Object> variables = new HashMap<>();\r
 \r
                // These variables may be overridded by injected variables.\r
                variables.put("mso-service-request-timeout", "180");\r
@@ -422,7 +422,7 @@ public class WorkflowTest {
         * @return a VariableMap\r
         */\r
        private VariableMapImpl createVariableMapImpl(Map<String, Object> variables) {\r
-               Map<String, Object> wrappedVariables = new HashMap<String, Object>();\r
+               Map<String, Object> wrappedVariables = new HashMap<>();\r
 \r
                for (String key : variables.keySet()) {\r
                        Object value = variables.get(key);\r
@@ -441,7 +441,7 @@ public class WorkflowTest {
         * @return the wrapped variable\r
         */\r
        private Map<String, Object> wrapVariableValue(Object value) {\r
-               HashMap<String, Object> valueMap = new HashMap<String, Object>();\r
+               HashMap<String, Object> valueMap = new HashMap<>();\r
                valueMap.put("value", value);\r
                return valueMap;\r
        }\r
@@ -1634,11 +1634,7 @@ public class WorkflowTest {
                                return null;\r
                        }\r
 \r
-                       processInstanceList.sort(new Comparator<HistoricProcessInstance>() {\r
-                               public int compare(HistoricProcessInstance m1, HistoricProcessInstance m2) {\r
-                                       return m1.getStartTime().compareTo(m2.getStartTime());\r
-                               }\r
-                       });\r
+                       processInstanceList.sort((m1, m2) -> m1.getStartTime().compareTo(m2.getStartTime()));\r
 \r
                        HistoricProcessInstance processInstance = processInstanceList.get(0);\r
 \r
@@ -1672,11 +1668,7 @@ public class WorkflowTest {
                                return null;\r
                        }\r
 \r
-                       processInstanceList.sort(new Comparator<HistoricProcessInstance>() {\r
-                               public int compare(HistoricProcessInstance m1, HistoricProcessInstance m2) {\r
-                                       return m1.getStartTime().compareTo(m2.getStartTime());\r
-                               }\r
-                       });\r
+                       processInstanceList.sort((m1, m2) -> m1.getStartTime().compareTo(m2.getStartTime()));\r
 \r
                        HistoricProcessInstance processInstance = processInstanceList.get(subflowInstanceIndex);\r
 \r
@@ -1784,7 +1776,7 @@ public class WorkflowTest {
         * An object that contains callback data for a "program".\r
         */\r
        public class CallbackSet {\r
-               private final Map<String, CallbackData> map = new HashMap<String, CallbackData>();\r
+               private final Map<String, CallbackData> map = new HashMap<>();\r
 \r
                /**\r
                 * Add untyped callback data to the set.\r
@@ -1983,8 +1975,8 @@ public class WorkflowTest {
         * A NamespaceContext class based on a Map.\r
         */\r
        private class SimpleNamespaceContext implements NamespaceContext {\r
-               private Map<String, String> prefixMap = new HashMap<String, String>();\r
-               private Map<String, String> uriMap = new HashMap<String, String>();\r
+               private Map<String, String> prefixMap = new HashMap<>();\r
+               private Map<String, String> uriMap = new HashMap<>();\r
 \r
                public synchronized void add(String prefix, String uri) {\r
                        prefixMap.put(prefix, uri);\r
@@ -1998,7 +1990,7 @@ public class WorkflowTest {
 \r
                @Override\r
                public Iterator<String> getPrefixes(String uri) {\r
-                       List<String> list = new ArrayList<String>();\r
+                       List<String> list = new ArrayList<>();\r
                        String prefix = uriMap.get(uri);\r
                        if (prefix != null) {\r
                                list.add(prefix);\r
index fc97e69..74f50ba 100644 (file)
@@ -45,7 +45,7 @@ public class MockResource {
        private boolean started = false;
        private final Integer defaultPort = 28090;
        private WireMockServer wireMockServer = null;
-       private static Map<String,String> mockProperties = new HashMap<String,String>();
+       private static Map<String,String> mockProperties = new HashMap<>();
 
        public static String getMockProperties(String key) {
                return mockProperties.get(key);
index ebbfea5..ba48bff 100644 (file)
@@ -31,8 +31,8 @@ import javax.ws.rs.core.Application;
 @ApplicationPath("/console")
 public class MockResourceApplication extends Application {
 
-       private Set<Object> singletons = new HashSet<Object>();
-       private Set<Class<?>> classes = new HashSet<Class<?>>();
+       private Set<Object> singletons = new HashSet<>();
+       private Set<Class<?>> classes = new HashSet<>();
 
        public MockResourceApplication() {
                singletons.add(new MockResource());
index 204d9e4..584ccda 100644 (file)
@@ -238,7 +238,7 @@ public class HealthCheckHandler  {
         BPMNLogger.debug(healthcheckDebugEnabled, "Post url is: " + url);
 
         //now create a soap request message as follows:
-        final StringBuffer payload = new StringBuffer();
+        final StringBuilder payload = new StringBuilder();
         payload.append("\n");
         payload.append("<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:req=\"" + adapterNamespace + "/requestsdb\">\n");
         payload.append("<soapenv:Header/>\n");
@@ -270,7 +270,7 @@ public class HealthCheckHandler  {
         BufferedReader rd = new BufferedReader(
                 new InputStreamReader(response.getEntity().getContent()));
 
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         String line = "";
         while ((line = rd.readLine()) != null) {
             result.append(line);
index 0e985cc..f5283f4 100644 (file)
@@ -150,7 +150,7 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable {
         */\r
        @JsonIgnore\r
        public String getServiceResourcesJsonString(){\r
-               StringBuffer serviceResourcesJsonStringBuffer = new StringBuffer();\r
+               StringBuilder serviceResourcesJsonStringBuffer = new StringBuilder();\r
                serviceResourcesJsonStringBuffer.append(listToJson((this.getServiceNetworks())));\r
                serviceResourcesJsonStringBuffer.append(listToJson((this.getServiceVnfs())));\r
                serviceResourcesJsonStringBuffer.append(listToJson((this.getServiceAllottedResources())));\r
index 640dc69..b47d73f 100644 (file)
@@ -122,7 +122,7 @@ public class JsonUtils {
         * @return String containing the XML translation\r
         */\r
        public static String toXMLString(Object obj, String tagName) throws JSONException {\r
-               StringBuffer strBuf = new StringBuffer();\r
+               StringBuilder strBuf = new StringBuilder();\r
                int i;\r
                JSONArray jsonArr;\r
                JSONObject jsonObj;\r
index c2b8328..fbfe226 100644 (file)
@@ -64,10 +64,10 @@ public final class XmlTool {
        private static final Map<String, Integer> ENTITIES = new HashMap<>();
        private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.BPEL);
        static {
-               ENTITIES.put("amp", new Integer(38));
-               ENTITIES.put("quot", new Integer(34));
-               ENTITIES.put("lt", new Integer(60));
-               ENTITIES.put("gt", new Integer(62));
+               ENTITIES.put("amp", 38);
+               ENTITIES.put("quot", 34);
+               ENTITIES.put("lt", 60);
+               ENTITIES.put("gt", 62);
        }
 
        /**
index c0997f3..cf69e1c 100644 (file)
@@ -159,7 +159,7 @@ public class MsoJsonProperties extends AbstractMsoProperties {
 
        @Override
        public String toString() {
-               StringBuffer response = new StringBuffer();
+               StringBuilder response = new StringBuilder();
                response.append("Config file " + propertiesFileName + "(Timer:" + automaticRefreshInMinutes + "mins):"
                                + System.getProperty("line.separator"));
                response.append(this.jsonRootNode.toString());
index 42cd190..5d0ff5b 100644 (file)
@@ -72,13 +72,13 @@ public final class CryptoUtils {
     }
 
     public static String byteArrayToHexString (byte[] b) {
-        StringBuffer sb = new StringBuffer (b.length * 2);
-        for (int i = 0; i < b.length; i++) {
-            int v = b[i] & 0xff;
+        StringBuilder sb = new StringBuilder(b.length * 2);
+        for (byte aB : b) {
+            int v = aB & 0xff;
             if (v < 16) {
-                sb.append ('0');
+                sb.append('0');
             }
-            sb.append (Integer.toHexString (v));
+            sb.append(Integer.toHexString(v));
         }
         return sb.toString ().toUpperCase ();
     }
index 27c3c2b..ad76a15 100644 (file)
@@ -741,7 +741,7 @@ public class MsoRequest {
             if ((status == Status.FAILED) || (status == Status.COMPLETE)) {
                 aq.setStatusMessage (this.errorMessage);
                 aq.setResponseBody (this.responseBody);
-                aq.setProgress(new Long(100));
+                aq.setProgress(100L);
 
                 Timestamp endTimeStamp = new Timestamp (System.currentTimeMillis());
                 aq.setEndTime (endTimeStamp);
index bcea8fd..4e1468c 100644 (file)
@@ -295,8 +295,8 @@ public class NetworkInfoHandler {
 
     private String translateNetworkRequests (List <NetworkRequest> queryResponseList) {
         NetworkRequests queryResponses = new NetworkRequests ();
-        for (int i = 0; i < queryResponseList.size (); i++) {
-            queryResponses.getNetworkRequest ().add (queryResponseList.get (i));
+        for (NetworkRequest aQueryResponseList : queryResponseList) {
+            queryResponses.getNetworkRequest().add(aQueryResponseList);
         }
 
         StringWriter stringWriter = new StringWriter ();
index 981fee9..79247de 100644 (file)
@@ -323,8 +323,8 @@ public class NetworkRequestHandler {
 
     private String translateNetworkRequests (List <NetworkRequest> queryResponseList) {
         NetworkRequests queryResponses = new NetworkRequests ();
-        for (int i = 0; i < queryResponseList.size (); i++) {
-            queryResponses.getNetworkRequest ().add (queryResponseList.get (i));
+        for (NetworkRequest aQueryResponseList : queryResponseList) {
+            queryResponses.getNetworkRequest().add(aQueryResponseList);
         }
 
         StringWriter stringWriter = new StringWriter ();
index b01c6d6..43f2d2a 100644 (file)
@@ -78,13 +78,13 @@ public class NetworkTypesHandler {
 
         ObjectFactory beansObjectFactory = new ObjectFactory ();
         NetworkTypes networkTypes = beansObjectFactory.createNetworkTypes ();
-        for (int i = 0; i < networkResources.size (); i++) {
-            NetworkType networkType = beansObjectFactory.createNetworkType ();
-            NetworkResource vr = networkResources.get (i);
-            networkType.setType (vr.getModelName());
-            networkType.setDescription (vr.getDescription ());
-            networkType.setId (String.valueOf (vr.getModelUUID()));
-            networkTypes.getNetworkType ().add (networkType);
+        for (NetworkResource networkResource : networkResources) {
+            NetworkType networkType = beansObjectFactory.createNetworkType();
+            NetworkResource vr = networkResource;
+            networkType.setType(vr.getModelName());
+            networkType.setDescription(vr.getDescription());
+            networkType.setId(String.valueOf(vr.getModelUUID()));
+            networkTypes.getNetworkType().add(networkType);
         }
 
         StringWriter stringWriter = new StringWriter ();
index 57720dc..df51a8f 100644 (file)
@@ -74,17 +74,17 @@ public class VfModuleModelNamesHandler {
 
         ObjectFactory beansObjectFactory = new ObjectFactory ();
         VfModuleModelNames vfModuleModelNames = beansObjectFactory.createVfModuleModelNames ();
-        for (int i = 0; i < vfModules.size (); i++) {
-            VfModuleModelName vfModuleModelName = beansObjectFactory.createVfModuleModelName ();
-            VfModule vm = vfModules.get (i);
-            vfModuleModelName.setModelName (vm.getModelName ());
-            vfModuleModelName.setModelVersion (vm.getVersion ());
-            vfModuleModelName.setModelInvariantUuid (vm.getModelInvariantUuid ());
+        for (VfModule vfModule : vfModules) {
+            VfModuleModelName vfModuleModelName = beansObjectFactory.createVfModuleModelName();
+            VfModule vm = vfModule;
+            vfModuleModelName.setModelName(vm.getModelName());
+            vfModuleModelName.setModelVersion(vm.getVersion());
+            vfModuleModelName.setModelInvariantUuid(vm.getModelInvariantUuid());
             vfModuleModelName.setIsBase(vm.isBase());
-            vfModuleModelName.setDescription (vm.getDescription ());
-            vfModuleModelName.setId (String.valueOf (vm.getModelUUID()));
-            vfModuleModelName.setAsdcServiceModelVersion(vm.getVersion ());
-            vfModuleModelNames.getVfModuleModelName ().add (vfModuleModelName);
+            vfModuleModelName.setDescription(vm.getDescription());
+            vfModuleModelName.setId(String.valueOf(vm.getModelUUID()));
+            vfModuleModelName.setAsdcServiceModelVersion(vm.getVersion());
+            vfModuleModelNames.getVfModuleModelName().add(vfModuleModelName);
         }
 
         StringWriter stringWriter = new StringWriter ();
index 7071ed5..a5e1f6f 100644 (file)
@@ -332,8 +332,8 @@ public class VnfInfoHandler {
 
     private String translateVnfRequests (List <VnfRequest> queryResponseList) {
         VnfRequests queryResponses = new VnfRequests ();
-        for (int i = 0; i < queryResponseList.size (); i++) {
-            queryResponses.getVnfRequest ().add (queryResponseList.get (i));
+        for (VnfRequest aQueryResponseList : queryResponseList) {
+            queryResponses.getVnfRequest().add(aQueryResponseList);
         }
 
         StringWriter stringWriter = new StringWriter ();
index a55c13b..7a61c64 100644 (file)
@@ -363,8 +363,8 @@ public class VnfRequestHandler {
 
     private String translateVnfRequests (List <VnfRequest> queryResponseList) {
         VnfRequests queryResponses = new VnfRequests ();
-        for (int i = 0; i < queryResponseList.size (); i++) {
-            queryResponses.getVnfRequest ().add (queryResponseList.get (i));
+        for (VnfRequest aQueryResponseList : queryResponseList) {
+            queryResponses.getVnfRequest().add(aQueryResponseList);
         }
 
         StringWriter stringWriter = new StringWriter ();
index 44cf038..3d87d13 100644 (file)
@@ -85,12 +85,12 @@ public class VnfTypesHandler {
 
         ObjectFactory beansObjectFactory = new ObjectFactory ();
         VnfTypes vnfTypes = beansObjectFactory.createVnfTypes ();
-        for (int i = 0; i < vnfResources.size (); i++) {
-            VnfType vnfType = beansObjectFactory.createVnfType ();
-            VnfResource vr = vnfResources.get (i);
-            vnfType.setDescription (vr.getDescription ());
-            vnfType.setId (String.valueOf (vr.getModelUuid()));
-            vnfTypes.getVnfType ().add (vnfType);
+        for (VnfResource vnfResource : vnfResources) {
+            VnfType vnfType = beansObjectFactory.createVnfType();
+            VnfResource vr = vnfResource;
+            vnfType.setDescription(vr.getDescription());
+            vnfType.setId(String.valueOf(vr.getModelUuid()));
+            vnfTypes.getVnfType().add(vnfType);
         }
 
         StringWriter stringWriter = new StringWriter ();
index 6618fcf..3de945a 100644 (file)
@@ -314,8 +314,8 @@ public class VolumeInfoHandler {
 
     private String translateVolumeRequests (List <VolumeRequest> queryResponseList) {
         VolumeRequests queryResponses = new VolumeRequests ();
-        for (int i = 0; i < queryResponseList.size (); i++) {
-            queryResponses.getVolumeRequest ().add (queryResponseList.get (i));
+        for (VolumeRequest aQueryResponseList : queryResponseList) {
+            queryResponses.getVolumeRequest().add(aQueryResponseList);
         }
 
         StringWriter stringWriter = new StringWriter ();
index 2c1f506..3fa4a7a 100644 (file)
@@ -346,8 +346,8 @@ public class VolumeRequestHandler {
 
     private String translateVolumeRequests (List <VolumeRequest> queryResponseList) {
         VolumeRequests queryResponses = new VolumeRequests ();
-        for (int i = 0; i < queryResponseList.size (); i++) {
-            queryResponses.getVolumeRequest ().add (queryResponseList.get (i));
+        for (VolumeRequest aQueryResponseList : queryResponseList) {
+            queryResponses.getVolumeRequest().add(aQueryResponseList);
         }
 
         StringWriter stringWriter = new StringWriter ();
index 98121d8..d9448d0 100644 (file)
@@ -38,6 +38,7 @@ import org.hibernate.criterion.Criterion;
 import org.hibernate.criterion.Order;
 import org.hibernate.criterion.Restrictions;
 import org.openecomp.mso.db.AbstractSessionFactoryManager;
+import org.openecomp.mso.requestsdb.RequestsDbConstant.Status;
 import org.openecomp.mso.requestsdb.RequestsDbSessionFactoryManager;
 import org.openecomp.mso.logger.MsoLogger;
 
@@ -757,9 +758,9 @@ public class RequestsDatabase {
             int resourceCount = lstResourceStatus.size();
             int progress = 0;
             boolean isFinished = true;
-            for(int i = 0; i < resourceCount; i++) {
-                progress = progress + Integer.valueOf(lstResourceStatus.get(i).getProgress()) / resourceCount;
-                if(RequestsDbConstant.Status.PROCESSING.equals(lstResourceStatus.get(i).getStatus())) {
+            for (ResourceOperationStatus lstResourceStatu : lstResourceStatus) {
+                progress = progress + Integer.valueOf(lstResourceStatu.getProgress()) / resourceCount;
+                if (Status.PROCESSING.equals(lstResourceStatu.getStatus())) {
                     isFinished = false;
                 }
             }
index 66db7df..daeefcc 100644 (file)
@@ -131,7 +131,7 @@ public class AllottedResourceCustomization extends MavenLikeVersioning implement
 
        @Override
        public String toString () {
-               StringBuffer sb = new StringBuffer();
+               StringBuilder sb = new StringBuilder();
                sb.append("modelCustomizationUuid=");
                sb.append(this.modelCustomizationUuid);
                sb.append(",modelInstanceName=");
index fd2b6ff..cd2821a 100644 (file)
@@ -142,7 +142,7 @@ public class VfModule extends MavenLikeVersioning implements Serializable {
 
        @Override
        public String toString () {
-       StringBuffer buf = new StringBuffer();
+       StringBuilder buf = new StringBuilder();
 
        buf.append("VFModule:");
        buf.append("modelName=");
index 1e5f69c..42d6b82 100644 (file)
@@ -64,7 +64,7 @@ public class VnfComponentsRecipe extends Recipe implements Serializable {
 
        @Override
        public String toString () {
-               StringBuffer sb = new StringBuffer();
+               StringBuilder sb = new StringBuilder();
                sb.append(super.toString());
                sb.append (",vnfComponentParamXSD=" + vnfComponentParamXSD);
                sb.append (",serviceType=" + getServiceType ());
index 55bb33a..29e4b89 100644 (file)
@@ -56,7 +56,7 @@ public class VnfRecipe extends Recipe implements Serializable {
        
        @Override
        public String toString () {
-               StringBuffer sb = new StringBuffer();
+               StringBuilder sb = new StringBuilder();
                sb.append(super.toString());
                sb.append (",vnfParamXSD=" + vnfParamXSD);
                sb.append (",serviceType=" + getServiceType ());
index 7495015..37040d6 100644 (file)
@@ -240,7 +240,7 @@ public class VnfResource extends MavenLikeVersioning implements Serializable {
 
        @Override
        public String toString () {
-               StringBuffer buf = new StringBuffer();
+               StringBuilder buf = new StringBuilder();
 
                buf.append("VNF=");
                buf.append(",modelVersion=");