Merge pull request #956 from andrewgaul/checkstyle-illegal-throws

Enforce no illegal throws via Checkstyle
This commit is contained in:
Adrian Cole 2012-11-04 17:14:14 -08:00
commit c00ef4c941
5 changed files with 4 additions and 4 deletions

View File

@ -134,7 +134,7 @@ public class SyncProxy implements InvocationHandler {
return methodNanos;
}
public Object invoke(Object o, Method method, Object[] args) throws Throwable {
public Object invoke(Object o, Method method, Object[] args) throws Exception {
if (method.getName().equals("equals")) {
return this.equals(o);
} else if (method.getName().equals("hashCode")) {

View File

@ -99,7 +99,7 @@ public class BinderUtils {
return (T) Proxy.newProxyInstance(clazz.getClassLoader(), new Class<?>[] { clazz }, new InvocationHandler() {
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
public Object invoke(Object proxy, Method method, Object[] args) {
return null;
}

View File

@ -133,7 +133,7 @@ public class AsyncRestClientProxy<T> implements InvocationHandler {
};
public Object invoke(Object o, Method method, Object[] args) throws Throwable {
public Object invoke(Object o, Method method, Object[] args) throws ExecutionException {
if (method.getName().equals("equals")) {
return this.equals(o);
} else if (method.getName().equals("toString")) {

View File

@ -23,7 +23,6 @@ import static com.google.common.base.Preconditions.checkNotNull;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import javax.inject.Inject;
import javax.inject.Named;

View File

@ -6,6 +6,7 @@
<module name="NewlineAtEndOfFile"/>
<module name="TreeWalker">
<module name="EmptyStatement"/>
<module name="IllegalThrows"/>
<module name="LineLength">
<property name="ignorePattern" value="^import\s.*;$"/>
<property name="max" value="120"/>