diff options
-rw-r--r-- | src/com/vaadin/ui/AbstractComponent.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/com/vaadin/ui/AbstractComponent.java b/src/com/vaadin/ui/AbstractComponent.java index db6be1e4b8..e440bc57c5 100644 --- a/src/com/vaadin/ui/AbstractComponent.java +++ b/src/com/vaadin/ui/AbstractComponent.java @@ -1603,13 +1603,8 @@ public abstract class AbstractComponent implements Component, MethodEventSource */ protected <T> void registerRpcImplementation(T implementation, Class<T> rpcInterfaceType) { - if (this instanceof RpcTarget) { - rpcManagerMap.put(rpcInterfaceType, new ServerRpcManager<T>(this, - implementation, rpcInterfaceType)); - } else { - throw new RuntimeException( - "Cannot register an RPC implementation for a component that is not an RpcTarget"); - } + rpcManagerMap.put(rpcInterfaceType, new ServerRpcManager<T>(this, + implementation, rpcInterfaceType)); } /** |