summaryrefslogtreecommitdiffstats
path: root/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java
diff options
context:
space:
mode:
Diffstat (limited to 'client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java')
-rw-r--r--client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java
index c966f7f65e..856f67657f 100644
--- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java
+++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ClientRpcVisitor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2000-2013 Vaadin Ltd.
+ * Copyright 2000-2014 Vaadin Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
@@ -29,6 +29,7 @@ public class ClientRpcVisitor extends TypeVisitor {
@Override
public void visitClientRpc(TreeLogger logger, JClassType type,
ConnectorBundle bundle) throws UnableToCompleteException {
+ checkGenericType(logger, type);
Set<? extends JClassType> hierarchy = type
.getFlattenedSupertypeHierarchy();
for (JClassType subType : hierarchy) {
@@ -47,6 +48,17 @@ public class ClientRpcVisitor extends TypeVisitor {
}
}
+ public static void checkGenericType(TreeLogger logger, JClassType type)
+ throws UnableToCompleteException {
+ if (type.isGenericType() != null) {
+ logger.log(Type.ERROR,
+ "Type " + type.getParameterizedQualifiedSourceName()
+ + "is parameterizied generic. RPC proxy "
+ + "for parameterizied types is not supported.");
+ throw new UnableToCompleteException();
+ }
+ }
+
public static void checkReturnType(TreeLogger logger, JMethod method)
throws UnableToCompleteException {
if (!method.getReturnType().getQualifiedSourceName().equals("void")) {