]> source.dussan.org Git - vaadin-framework.git/commitdiff
Removed extra check as Component extends RpcTarget
authorArtur Signell <artur@vaadin.com>
Tue, 20 Mar 2012 12:09:31 +0000 (14:09 +0200)
committerArtur Signell <artur@vaadin.com>
Wed, 21 Mar 2012 13:27:58 +0000 (15:27 +0200)
src/com/vaadin/ui/AbstractComponent.java

index db6be1e4b85414f054b0684cb9d7072565e9c459..e440bc57c5767016175af41d6fd579763f63559c 100644 (file)
@@ -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));
     }
 
     /**