aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-07-11 09:40:17 -0400
committerAlexander Kurtakov2018-07-11 09:40:17 -0400
commit5b9c6184d579f1208e5baf755f22fe277496e069 (patch)
tree83751ff59f88b0235ba03b623f77ebbe0ddb10aa
parent5b8f70cc034458202a9feb740a398aa7deb9860a (diff)
downloadeclipse.platform.runtime-5b9c6184d579f1208e5baf755f22fe277496e069.zip
eclipse.platform.runtime-5b9c6184d579f1208e5baf755f22fe277496e069.tar.gz
eclipse.platform.runtime-5b9c6184d579f1208e5baf755f22fe277496e069.tar.xz
Lambda conversion in core.tests.harness bundle.
Change-Id: I8a69c2338315579960764e985ad815e29a1cc1cb Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--tests/org.eclipse.core.tests.harness/src/org/eclipse/core/tests/harness/BundleTestingHelper.java13
-rw-r--r--tests/org.eclipse.core.tests.harness/src/org/eclipse/core/tests/session/SessionTestSuite.java10
2 files changed, 7 insertions, 16 deletions
diff --git a/tests/org.eclipse.core.tests.harness/src/org/eclipse/core/tests/harness/BundleTestingHelper.java b/tests/org.eclipse.core.tests.harness/src/org/eclipse/core/tests/harness/BundleTestingHelper.java
index c2e6693..4e78b16 100644
--- a/tests/org.eclipse.core.tests.harness/src/org/eclipse/core/tests/harness/BundleTestingHelper.java
+++ b/tests/org.eclipse.core.tests.harness/src/org/eclipse/core/tests/harness/BundleTestingHelper.java
@@ -77,14 +77,11 @@ public class BundleTestingHelper {
// but this should allow for some progress...
// (patch from John A.)
final boolean[] flag = new boolean[] {false};
- FrameworkListener listener = new FrameworkListener() {
- @Override
- public void frameworkEvent(FrameworkEvent event) {
- if (event.getType() == FrameworkEvent.PACKAGES_REFRESHED) {
- synchronized (flag) {
- flag[0] = true;
- flag.notifyAll();
- }
+ FrameworkListener listener = event -> {
+ if (event.getType() == FrameworkEvent.PACKAGES_REFRESHED) {
+ synchronized (flag) {
+ flag[0] = true;
+ flag.notifyAll();
}
}
};
diff --git a/tests/org.eclipse.core.tests.harness/src/org/eclipse/core/tests/session/SessionTestSuite.java b/tests/org.eclipse.core.tests.harness/src/org/eclipse/core/tests/session/SessionTestSuite.java
index a79985d..55ad1e7 100644
--- a/tests/org.eclipse.core.tests.harness/src/org/eclipse/core/tests/session/SessionTestSuite.java
+++ b/tests/org.eclipse.core.tests.harness/src/org/eclipse/core/tests/session/SessionTestSuite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2015 IBM Corporation and others.
+ * Copyright (c) 2004, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,7 +11,6 @@
package org.eclipse.core.tests.session;
import java.util.Arrays;
-import java.util.Comparator;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Set;
@@ -112,12 +111,7 @@ public class SessionTestSuite extends TestSuite {
allTests[i] = e.nextElement();
}
if (sort) {
- Arrays.sort(allTests, new Comparator<Test>() {
- @Override
- public int compare(Test o1, Test o2) {
- return ((TestCase) o1).getName().compareTo(((TestCase) o2).getName());
- }
- });
+ Arrays.sort(allTests, (o1, o2) -> ((TestCase) o1).getName().compareTo(((TestCase) o2).getName()));
}
return allTests;
}