add throws clauses to Java APIs

This commit is contained in:
Roland 2012-08-09 18:15:38 +02:00
parent bf49b75d5e
commit e3ac633649
3 changed files with 5 additions and 3 deletions

View file

@ -217,7 +217,7 @@ public class JavaTestKit {
}
public abstract class ReceiveWhile<T> {
abstract protected T match(Object msg);
abstract protected T match(Object msg) throws Exception;
private Object results;
@ -237,8 +237,8 @@ public class JavaTestKit {
public ReceiveWhile(Class<T> clazz, Duration max, Duration idle, int messages) {
results = p.receiveWhile(max, idle, messages,
new CachingPartialFunction<Object, T>() {
public T match(Object msg) {
return ReceiveWhile.this.match(msg);
public T match(Object msg) throws Exception {
return ReceiveWhile.this.match(msg);
}
}).toArray(Util.classTag(clazz));
}