summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCoreBPMN/src
diff options
context:
space:
mode:
authorMunir Ahmad <munir.ahmad@bell.ca>2018-03-02 19:47:30 -0500
committerSeshu Kumar M <seshu.kumar.m@huawei.com>2018-03-06 14:40:52 +0000
commit2c3be92eccd45ebad09d4fea7245f11a3c14f583 (patch)
treeb18a696ea61d917e332b19157ffcd2b66f6e4cb1 /bpmn/MSOCoreBPMN/src
parent9f4a5beffd747c5e816f97d8c04d99ceee4a32f3 (diff)
Replace explicit type with dimond type
Change-Id: I1dedb9ef1ca7b734e3cfc0a3a594d733dbd298d4 Issue-ID: SO-437 Signed-off-by: Munir Ahmad <munir.ahmad@bell.ca>
Diffstat (limited to 'bpmn/MSOCoreBPMN/src')
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfigurationSetup.java4
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java4
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java6
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/VnfResource.java2
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/CustomMyBatisSessionFactory.java2
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/WorkflowExceptionPlugin.java10
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java2
7 files changed, 15 insertions, 15 deletions
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfigurationSetup.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfigurationSetup.java
index ce171b56e4..b972d6a815 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfigurationSetup.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfigurationSetup.java
@@ -156,7 +156,7 @@ public class PropertyConfigurationSetup {
* Create a map to hold properties to be added to mso.bpmn.properties.
*/
public static Map<String, String> createBpmnProperties() {
- Map<String, String> properties = new HashMap<String, String>();
+ Map<String, String> properties = new HashMap<>();
properties.put("PROPERTIES-TYPE", PropertyConfiguration.MSO_BPMN_PROPERTIES);
return properties;
}
@@ -165,7 +165,7 @@ public class PropertyConfigurationSetup {
* Create a map to hold properties to be added to mso.bpmn.urn.properties.
*/
public static Map<String, String> createBpmnUrnProperties() {
- Map<String, String> properties = new HashMap<String, String>();
+ Map<String, String> properties = new HashMap<>();
properties.put("PROPERTIES-TYPE", PropertyConfiguration.MSO_BPMN_URN_PROPERTIES);
return properties;
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java
index b65034432d..f49712ee8b 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/RollbackData.java
@@ -35,7 +35,7 @@ public class RollbackData implements Serializable {
private static final long serialVersionUID = 1L;
private Map<String, Map<String, Serializable>> dictionary =
- new HashMap<String, Map<String, Serializable>>();
+ new HashMap<>();
/**
* Returns true if the specified type is stored in this object.
@@ -55,7 +55,7 @@ public class RollbackData implements Serializable {
*/
public void put(String type, String key, String value) {
Map<String, Serializable> mapForType = dictionary
- .computeIfAbsent(type, k -> new HashMap<String, Serializable>());
+ .computeIfAbsent(type, k -> new HashMap<>());
mapForType.put(key, value);
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java
index c81e96dccb..221068424b 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/ServiceDecomposition.java
@@ -203,7 +203,7 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable {
*/
public void addVnfResource(Resource vnfResource) {
if (vnfResources == null){
- vnfResources = new ArrayList<VnfResource>();
+ vnfResources = new ArrayList<>();
}
this.vnfResources.add((VnfResource)vnfResource);
}
@@ -213,7 +213,7 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable {
*/
public void addNetworkResource(Resource networkResource) {
if (networkResources == null){
- networkResources = new ArrayList<NetworkResource>();
+ networkResources = new ArrayList<>();
}
this.networkResources.add((NetworkResource)networkResource);
}
@@ -223,7 +223,7 @@ public class ServiceDecomposition extends JsonWrapper implements Serializable {
*/
public void addAllottedResource(Resource allottedResource) {
if (allottedResources == null){
- allottedResources = new ArrayList<AllottedResource>();
+ allottedResources = new ArrayList<>();
}
this.allottedResources.add((AllottedResource)allottedResource);
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/VnfResource.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/VnfResource.java
index 0d8721b4d1..a09f5a7849 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/VnfResource.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/VnfResource.java
@@ -134,7 +134,7 @@ public class VnfResource extends Resource {
// methods to add to the list
public void addVfModule(ModuleResource moduleResource) {
if (vfModules == null){
- vfModules = new ArrayList<ModuleResource>();
+ vfModules = new ArrayList<>();
}
this.vfModules.add(moduleResource);
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/CustomMyBatisSessionFactory.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/CustomMyBatisSessionFactory.java
index ad4a1a52c8..4dde5ae595 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/CustomMyBatisSessionFactory.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/mybatis/CustomMyBatisSessionFactory.java
@@ -88,7 +88,7 @@ public class CustomMyBatisSessionFactory extends
@Override
protected Collection<? extends CommandInterceptor> getDefaultCommandInterceptorsTxRequired() {
List<CommandInterceptor> defaultCommandInterceptorsTxRequired =
- new ArrayList<CommandInterceptor>();
+ new ArrayList<>();
defaultCommandInterceptorsTxRequired.add(new LogInterceptor());
defaultCommandInterceptorsTxRequired.add(new CommandContextInterceptor(
commandContextFactory, this, true));
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/WorkflowExceptionPlugin.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/WorkflowExceptionPlugin.java
index 18113fabcd..d25dcb6f3c 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/WorkflowExceptionPlugin.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/plugins/WorkflowExceptionPlugin.java
@@ -65,7 +65,7 @@ public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
processEngineConfiguration.getCustomPreBPMNParseListeners();
if (preParseListeners == null) {
- preParseListeners = new ArrayList<BpmnParseListener>();
+ preParseListeners = new ArrayList<>();
processEngineConfiguration.setCustomPreBPMNParseListeners(preParseListeners);
}
@@ -76,7 +76,7 @@ public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
@Override
public void parseProcess(Element processElement, ProcessDefinitionEntity processDefinition) {
AtomicInteger triggerTaskIndex = new AtomicInteger(1);
- List<ActivityImpl> activities = new ArrayList<ActivityImpl>(processDefinition.getActivities());
+ List<ActivityImpl> activities = new ArrayList<>(processDefinition.getActivities());
recurse(activities, triggerTaskIndex);
}
@@ -103,7 +103,7 @@ public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
// cause the process to die.
List<PvmTransition> outTransitions =
- new ArrayList<PvmTransition>(activity.getOutgoingTransitions());
+ new ArrayList<>(activity.getOutgoingTransitions());
for (PvmTransition transition : outTransitions) {
String triggerTaskId = "WorkflowExceptionTriggerTask_" + triggerTaskIndex;
@@ -112,7 +112,7 @@ public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
ClassDelegateActivityBehavior behavior = new ClassDelegateActivityBehavior(
WorkflowExceptionTriggerTask.class.getName(),
- new ArrayList<FieldDeclaration>(0));
+ new ArrayList<>(0));
triggerTask.setActivityBehavior(behavior);
triggerTask.setName("Workflow Exception Trigger Task " + triggerTaskIndex);
@@ -124,7 +124,7 @@ public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin {
transitionImpl.setDestination(triggerTask);
}
} else if ("subProcess".equals(type)) {
- recurse(new ArrayList<ActivityImpl>(activity.getActivities()), triggerTaskIndex);
+ recurse(new ArrayList<>(activity.getActivities()), triggerTaskIndex);
}
}
}
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java
index 9730b129be..2d204c338a 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java
@@ -55,7 +55,7 @@ public class TestBaseTask {
@Test
@Deployment(resources={"BaseTaskTest.bpmn"})
public void shouldInvokeService() {
- Map<String, Object> variables = new HashMap<String, Object>();
+ Map<String, Object> variables = new HashMap<>();
variables.put("firstName", "Jane");
variables.put("lastName", "Doe");
variables.put("age", (Integer)25);