From 5d63e31d8184b848bb96697c02fd18dec25b0124 Mon Sep 17 00:00:00 2001 From: Munir Ahmad Date: Sat, 24 Feb 2018 12:15:43 -0500 Subject: Make use of lambda for comparator Change-Id: Iff3cf5202d754c926b010e1d1dd82418b42ae241 Issue-ID: SO-437 Signed-off-by: Munir Ahmad --- .../java/org/openecomp/mso/bpmn/common/WorkflowTest.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java index df15a2a9cc..54c48bd9e7 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/openecomp/mso/bpmn/common/WorkflowTest.java @@ -1634,11 +1634,7 @@ public class WorkflowTest { return null; } - processInstanceList.sort(new Comparator() { - public int compare(HistoricProcessInstance m1, HistoricProcessInstance m2) { - return m1.getStartTime().compareTo(m2.getStartTime()); - } - }); + processInstanceList.sort((m1, m2) -> m1.getStartTime().compareTo(m2.getStartTime())); HistoricProcessInstance processInstance = processInstanceList.get(0); @@ -1672,11 +1668,7 @@ public class WorkflowTest { return null; } - processInstanceList.sort(new Comparator() { - public int compare(HistoricProcessInstance m1, HistoricProcessInstance m2) { - return m1.getStartTime().compareTo(m2.getStartTime()); - } - }); + processInstanceList.sort((m1, m2) -> m1.getStartTime().compareTo(m2.getStartTime())); HistoricProcessInstance processInstance = processInstanceList.get(subflowInstanceIndex); -- cgit 1.2.3-korg