Merge "Reorder modifiers"
[so.git] / bpmn / MSOCoreBPMN / src / main / java / org / openecomp / mso / bpmn / core / plugins / LoggingAndURNMappingPlugin.java
index c346308..b66169d 100644 (file)
@@ -321,14 +321,8 @@ public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin {
                }
 
                private void loadFromDB(DelegateExecution execution, ProcessEngineConfigurationImpl processEngineConfiguration) {
-                       Command<List<URNMapping>> command = new Command<List<URNMapping>>() {
-                               @SuppressWarnings("unchecked")
-                               @Override
-                               public List<URNMapping> execute(CommandContext commandContext) {
-                                       return (List<URNMapping>) commandContext.getDbSqlSession().selectList(
-                                               "mso.urnMapping.selectAll", null);
-                               }
-                       };
+                       Command<List<URNMapping>> command = commandContext -> (List<URNMapping>) commandContext.getDbSqlSession()
+                               .selectList("mso.urnMapping.selectAll", null);
 
                        CustomMyBatisSessionFactory sessionFactory = new CustomMyBatisSessionFactory();
                        sessionFactory.initFromProcessEngineConfiguration(processEngineConfiguration,
@@ -427,7 +421,7 @@ public class LoggingAndURNMappingPlugin extends AbstractProcessEnginePlugin {
                                try {
                                        String id = execution.getId();
                                        if ("START".equals(event) && id != null ) {
-                                               startTimes.put(id, (Long)System.currentTimeMillis());
+                                               startTimes.put(id, System.currentTimeMillis());
                                        } else if ("END".equals(event) && id != null) {
                                                String prefix = (String) execution.getVariable("prefix");