From 2c3be92eccd45ebad09d4fea7245f11a3c14f583 Mon Sep 17 00:00:00 2001 From: Munir Ahmad Date: Fri, 2 Mar 2018 19:47:30 -0500 Subject: Replace explicit type with dimond type Change-Id: I1dedb9ef1ca7b734e3cfc0a3a594d733dbd298d4 Issue-ID: SO-437 Signed-off-by: Munir Ahmad --- .../openecomp/mso/bpmn/core/PropertyConfigurationSetup.java | 4 ++-- .../main/java/org/openecomp/mso/bpmn/core/RollbackData.java | 4 ++-- .../openecomp/mso/bpmn/core/domain/ServiceDecomposition.java | 6 +++--- .../java/org/openecomp/mso/bpmn/core/domain/VnfResource.java | 2 +- .../mso/bpmn/core/mybatis/CustomMyBatisSessionFactory.java | 2 +- .../mso/bpmn/core/plugins/WorkflowExceptionPlugin.java | 10 +++++----- 6 files changed, 14 insertions(+), 14 deletions(-) (limited to 'bpmn/MSOCoreBPMN/src/main') 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 createBpmnProperties() { - Map properties = new HashMap(); + Map 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 createBpmnUrnProperties() { - Map properties = new HashMap(); + Map 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> dictionary = - new HashMap>(); + 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 mapForType = dictionary - .computeIfAbsent(type, k -> new HashMap()); + .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(); + 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(); + 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(); + 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(); + 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 getDefaultCommandInterceptorsTxRequired() { List defaultCommandInterceptorsTxRequired = - new ArrayList(); + 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(); + 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 activities = new ArrayList(processDefinition.getActivities()); + List activities = new ArrayList<>(processDefinition.getActivities()); recurse(activities, triggerTaskIndex); } @@ -103,7 +103,7 @@ public class WorkflowExceptionPlugin extends AbstractProcessEnginePlugin { // cause the process to die. List outTransitions = - new ArrayList(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(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(activity.getActivities()), triggerTaskIndex); + recurse(new ArrayList<>(activity.getActivities()), triggerTaskIndex); } } } -- cgit 1.2.3-korg