diff options
author | Henri Sara <hesara@vaadin.com> | 2014-05-16 11:41:42 +0300 |
---|---|---|
committer | Henri Sara <hesara@vaadin.com> | 2014-05-16 13:03:09 +0300 |
commit | b4180f2388a6ec97c422097f16da617114aba590 (patch) | |
tree | 86d73cb261f89d7360d5810e2986a6e78e066374 /client-compiler | |
parent | e65231e6028892bd6847777c5bad982b73278b14 (diff) | |
parent | 0f74fdff68cef4eac27913bb4fd0943ff39ca604 (diff) | |
download | vaadin-framework-7.3.0.alpha2.tar.gz vaadin-framework-7.3.0.alpha2.zip |
Merge master into valo7.3.0.alpha2
This change does not include all release notes updates
from master.
Change-Id: I209dc06d03d4541ac33746d1161630f0ca8ae5d9
Diffstat (limited to 'client-compiler')
21 files changed, 55 insertions, 25 deletions
diff --git a/client-compiler/ivy.xml b/client-compiler/ivy.xml index 8c45597214..0b87069f2c 100644 --- a/client-compiler/ivy.xml +++ b/client-compiler/ivy.xml @@ -45,10 +45,15 @@ <dependency org="ant" name="ant-launcher" rev="1.6.5" conf="build,ide -> default" /> - <dependency org="org.eclipse.jetty" name="jetty-server" + <dependency org="org.eclipse.jetty" name="jetty-annotations" rev="8.1.12.v20130726" conf="build,ide -> default"> <exclude org="org.eclipse.jetty.orbit"></exclude> </dependency> + <dependency org="org.eclipse.jetty" name="jetty-servlets" + rev="8.1.12.v20130726" conf="build,ide -> default"> + <exclude org="org.eclipse.jetty.orbit"></exclude> + </dependency> + <dependency org="org.eclipse.jetty" name="jetty-util" rev="8.1.12.v20130726" conf="build,ide -> default" /> @@ -56,8 +61,8 @@ rev="1.1" conf="build,ide -> default" /> <dependency org="commons-codec" name="commons-codec" rev="1.8" conf="build,ide -> default" /> - <dependency org="commons-io" name="commons-io" rev="${commons-io.version}" - conf="build,ide -> default" /> + <dependency org="commons-io" name="commons-io" + rev="${commons-io.version}" conf="build,ide -> default" /> <dependency org="org.apache.commons" name="commons-lang3" rev="3.1" conf="build,ide -> default" /> <dependency org="org.apache.james" name="apache-mime4j" diff --git a/client-compiler/src/com/vaadin/sass/linker/SassLinker.java b/client-compiler/src/com/vaadin/sass/linker/SassLinker.java index 3183f4bfe7..dda6733384 100644 --- a/client-compiler/src/com/vaadin/sass/linker/SassLinker.java +++ b/client-compiler/src/com/vaadin/sass/linker/SassLinker.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 diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/AcceptCriteriaFactoryGenerator.java b/client-compiler/src/com/vaadin/server/widgetsetutils/AcceptCriteriaFactoryGenerator.java index ae7e117965..b7850e6370 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/AcceptCriteriaFactoryGenerator.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/AcceptCriteriaFactoryGenerator.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 diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java b/client-compiler/src/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java index 9b00142534..cc1841ec05 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/ConnectorBundleLoaderFactory.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 @@ -189,6 +189,8 @@ public class ConnectorBundleLoaderFactory extends Generator { if (isNative) { outdent(); println("}-*/;"); + // To support fields of type long (#13692) + println("@com.google.gwt.core.client.UnsafeNativeLong"); println("private native void %s(%s) /*-{", newMethod, args); } else { println("%s();", newMethod); @@ -313,6 +315,8 @@ public class ConnectorBundleLoaderFactory extends Generator { // Separate method for loading native JS stuff (e.g. callbacks) String loadNativeJsMethodName = "loadNativeJs"; + // To support fields of type long (#13692) + w.println("@com.google.gwt.core.client.UnsafeNativeLong"); w.println("private native void %s(%s store) /*-{", loadNativeJsMethodName, TypeDataStore.class.getName()); w.indent(); diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java index 38d97e9751..6ffd6c5462 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ArraySerializer.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 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")) { diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java index f762a484b7..8a4ca8f795 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.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 diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ConnectorInitVisitor.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ConnectorInitVisitor.java index 293a6ca613..ea3b097fa2 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ConnectorInitVisitor.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ConnectorInitVisitor.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 diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/CustomSerializer.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/CustomSerializer.java index 00a19d2656..bb3dd4f61d 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/CustomSerializer.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/CustomSerializer.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 diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/EnumSerializer.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/EnumSerializer.java index cd6eebddd1..18e9652ed1 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/EnumSerializer.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/EnumSerializer.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 diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/FieldProperty.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/FieldProperty.java index e9ff4587fb..6c242dfd74 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/FieldProperty.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/FieldProperty.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 @@ -45,17 +45,25 @@ public class FieldProperty extends Property { @Override public void writeSetterBody(TreeLogger logger, SourceWriter w, String beanVariable, String valueVariable) { + // Don't try to unbox Longs in javascript, as it's not supported. + // (#13692) + boolean shouldUnbox = !"long".equals(field.getType() + .getSimpleSourceName()); w.println("%s.@%s::%s = %s;", beanVariable, getBeanType() - .getQualifiedSourceName(), getName(), unboxValue(valueVariable)); + .getQualifiedSourceName(), getName(), + shouldUnbox ? unboxValue(valueVariable) : valueVariable); } @Override public void writeGetterBody(TreeLogger logger, SourceWriter w, String beanVariable) { + // Longs are not unboxed, as it's not supported. (#13692) + boolean shouldBox = !"long".equals(field.getType() + .getSimpleSourceName()); String value = String.format("%s.@%s::%s", beanVariable, getBeanType() .getQualifiedSourceName(), getName()); w.print("return "); - w.print(boxValue(value)); + w.print(shouldBox ? boxValue(value) : value); w.println(";"); } diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/GeneratedSerializer.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/GeneratedSerializer.java index 53b0022fd0..6afb172ea2 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/GeneratedSerializer.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/GeneratedSerializer.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 diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/JsonSerializer.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/JsonSerializer.java index 69445b3cc1..0509689850 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/JsonSerializer.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/JsonSerializer.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 diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/MethodProperty.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/MethodProperty.java index 1d9deef265..32aad92774 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/MethodProperty.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/MethodProperty.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 diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/OnStateChangeVisitor.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/OnStateChangeVisitor.java index ea3e639486..1c0da9d9e8 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/OnStateChangeVisitor.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/OnStateChangeVisitor.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 diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/Property.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/Property.java index 381af23b42..f07b1c29fd 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/Property.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/Property.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 diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java index 651596c9cf..6ad0d2fd98 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ServerRpcVisitor.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 @@ -28,6 +28,7 @@ public class ServerRpcVisitor extends TypeVisitor { @Override public void visitServerRpc(TreeLogger logger, JClassType type, ConnectorBundle bundle) throws UnableToCompleteException { + ClientRpcVisitor.checkGenericType(logger, type); bundle.setNeedsProxySupport(type); Set<? extends JClassType> superTypes = type diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/StateInitVisitor.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/StateInitVisitor.java index f58d1c5d40..046c5c4611 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/StateInitVisitor.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/StateInitVisitor.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 diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/TypeVisitor.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/TypeVisitor.java index aae610cdcd..028e4cc44d 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/TypeVisitor.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/TypeVisitor.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 diff --git a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java index bac7f5a0f7..e3fee8d9ee 100644 --- a/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.java +++ b/client-compiler/src/com/vaadin/server/widgetsetutils/metadata/WidgetInitVisitor.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 diff --git a/client-compiler/src/com/vaadin/tools/WidgetsetCompiler.java b/client-compiler/src/com/vaadin/tools/WidgetsetCompiler.java index e57468c675..7c06e9d7af 100755 --- a/client-compiler/src/com/vaadin/tools/WidgetsetCompiler.java +++ b/client-compiler/src/com/vaadin/tools/WidgetsetCompiler.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 |