Polishing

This commit is contained in:
Juergen Hoeller
2014-09-04 00:55:38 +02:00
parent 8543a5548e
commit 97bd0ccfec
10 changed files with 319 additions and 445 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,10 +20,10 @@ import java.io.IOException;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* @author Arjen Poutsma
*/
@@ -44,10 +44,9 @@ public class ListenableFutureTaskTests {
public void onSuccess(String result) {
assertEquals(s, result);
}
@Override
public void onFailure(Throwable t) {
fail(t.getMessage());
public void onFailure(Throwable ex) {
fail(ex.getMessage());
}
});
task.run();
@@ -68,15 +67,12 @@ public class ListenableFutureTaskTests {
public void onSuccess(String result) {
fail("onSuccess not expected");
}
@Override
public void onFailure(Throwable t) {
assertEquals(s, t.getMessage());
public void onFailure(Throwable ex) {
assertEquals(s, ex.getMessage());
}
});
task.run();
}
}