Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Le Menez2019-06-14 12:54:36 +0000
committerQuentin Le Menez2019-08-06 13:24:07 +0000
commit1d290819592299eb05c29550075cfb631f5043c5 (patch)
treeb16f259b2102d2501dde9930ebf19c7fd7b86d08 /tests/junit/plugins
parentfa1f3e5c6fbd3dd4b65e11fa85e8ff78a9a959b0 (diff)
downloadorg.eclipse.papyrus-1d290819592299eb05c29550075cfb631f5043c5.tar.gz
org.eclipse.papyrus-1d290819592299eb05c29550075cfb631f5043c5.tar.xz
org.eclipse.papyrus-1d290819592299eb05c29550075cfb631f5043c5.zip
Bug 549266 - [Releng] Guava 27.1 compatibility patch
- Add guava Futures compilation corrections (addCallback, transform, transformAsync) Change-Id: I236e3ba5cf9f4068168f5203688e99ac00fde4e8 Signed-off-by: Quentin Le Menez <quentin.lemenez@cea.fr>
Diffstat (limited to 'tests/junit/plugins')
-rw-r--r--tests/junit/plugins/infra/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/utils/JobBasedFutureTest.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/junit/plugins/infra/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/utils/JobBasedFutureTest.java b/tests/junit/plugins/infra/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/utils/JobBasedFutureTest.java
index e49554a04b4..109978e83d7 100644
--- a/tests/junit/plugins/infra/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/utils/JobBasedFutureTest.java
+++ b/tests/junit/plugins/infra/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/utils/JobBasedFutureTest.java
@@ -43,6 +43,7 @@ import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.MoreExecutors;
/**
* JUnit tests for the {@link JobBasedFuture} class.
@@ -164,6 +165,7 @@ public class JobBasedFutureTest extends AbstractPapyrusTest {
Runnable reader = new Runnable() {
+ @Override
public void run() {
ISchedulingRule rule_ = (rule == null) ? null : rule.get();
@@ -228,16 +230,18 @@ public class JobBasedFutureTest extends AbstractPapyrusTest {
for (int i = 0; i < CONCURRENT_THREAD_COUNT; i++) {
Futures.addCallback(fixture, new FutureCallback<Boolean>() {
+ @Override
public void onSuccess(Boolean result) {
results.add(result);
latch.countDown();
}
+ @Override
public void onFailure(Throwable t) {
thrown.add(t);
latch.countDown();
}
- });
+ }, MoreExecutors.directExecutor()); // Added because of compilation error on the executor-less method call
}
try {
@@ -318,12 +322,15 @@ public class JobBasedFutureTest extends AbstractPapyrusTest {
}
static class RuleSupplier implements Supplier<ISchedulingRule> {
+ @Override
public ISchedulingRule get() {
return new ISchedulingRule() {
+ @Override
public boolean isConflicting(ISchedulingRule rule) {
return rule == this;
}
+ @Override
public boolean contains(ISchedulingRule rule) {
return rule == this;
}

Back to the top