From: Robert Varga Date: Sun, 18 May 2014 13:38:43 +0000 (+0200) Subject: Do not declare Throwable as thrown X-Git-Tag: release/helium~553 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=e05eb2a18777e0256b2047f0940066d542f6b7f8;p=yangtools.git Do not declare Throwable as thrown Let's not force our callers to deal with Throwable -- Exception is bad enough. Change-Id: I938ddfd6c08d5cf5a954a3455cfea612ea742784 Signed-off-by: Robert Varga --- diff --git a/restconf/restconf-client-impl/src/main/java/org/opendaylight/yangtools/restconf/client/BindingToRestRpc.java b/restconf/restconf-client-impl/src/main/java/org/opendaylight/yangtools/restconf/client/BindingToRestRpc.java index fe4eb76695..40d29da662 100644 --- a/restconf/restconf-client-impl/src/main/java/org/opendaylight/yangtools/restconf/client/BindingToRestRpc.java +++ b/restconf/restconf-client-impl/src/main/java/org/opendaylight/yangtools/restconf/client/BindingToRestRpc.java @@ -48,7 +48,7 @@ public class BindingToRestRpc implements InvocationHandler { private final SchemaContext schcemaContext; private final Module module; - public BindingToRestRpc(Class proxiedInterface,BindingIndependentMappingService mappingService,RestconfClientImpl client,SchemaContext schemaContext) throws Exception { + public BindingToRestRpc(final Class proxiedInterface,final BindingIndependentMappingService mappingService,final RestconfClientImpl client,final SchemaContext schemaContext) throws Exception { this.mappingService = mappingService; this.client = client; this.schcemaContext = schemaContext; @@ -57,7 +57,7 @@ public class BindingToRestRpc implements InvocationHandler { } @Override - public Object invoke(Object o,final Method method, Object[] objects) throws Throwable { + public Object invoke(final Object o,final Method method, final Object[] objects) throws Exception { for (RpcDefinition rpcDef:module.getRpcs()){ if (method.getName().equals(BindingMapping.getMethodName(rpcDef.getQName()))){ @@ -77,7 +77,7 @@ public class BindingToRestRpc implements InvocationHandler { final DataSchemaNode rpcOutputSchema = rpcDef.getOutput(); return client.post(ResourceUri.OPERATIONS.getPath() + "/" + moduleName + ":" + rpcMethodName,payloadString,new Function() { @Override - public Object apply(ClientResponse clientResponse) { + public Object apply(final ClientResponse clientResponse) { if (clientResponse.getStatus() != 200) { throw new IllegalStateException("Can't get data from restconf. "+clientResponse.getClientResponseStatus()); } @@ -101,10 +101,10 @@ public class BindingToRestRpc implements InvocationHandler { throw new IllegalStateException("Unexpected state of proxy method."); } - public static T getProxy(Class proxiedInterface, - BindingIndependentMappingService mappingService, - RestconfClientImpl restconfClient, - SchemaContext schemaContext) { + public static T getProxy(final Class proxiedInterface, + final BindingIndependentMappingService mappingService, + final RestconfClientImpl restconfClient, + final SchemaContext schemaContext) { T proxiedType = null; try { proxiedType = (T) Proxy.newProxyInstance