From 416c8929052da5f7d0f2f14044b4d784e6eff913 Mon Sep 17 00:00:00 2001 From: Maxime Mériouma-Caron Date: Tue, 1 Dec 2015 19:20:48 -0500 Subject: Fix databind tests --- gwtquery-core/pom.xml | 6 +++--- .../main/java/com/google/gwt/query/rebind/JsonBuilderGenerator.java | 2 +- .../src/main/java/com/google/gwt/query/vm/JsonBuilderHandler.java | 2 +- .../com/google/gwt/query/client/dbinding/DataBindingTestJre.java | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gwtquery-core/pom.xml b/gwtquery-core/pom.xml index e1af3097..eb82473f 100644 --- a/gwtquery-core/pom.xml +++ b/gwtquery-core/pom.xml @@ -8,8 +8,8 @@ - - FF17 + + Chrome -ea -out ${basedir}/target/gwt-junit -checkAssertions @@ -17,7 +17,7 @@ test-prod diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsonBuilderGenerator.java b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsonBuilderGenerator.java index e30b7588..672ef1e7 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsonBuilderGenerator.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsonBuilderGenerator.java @@ -209,7 +209,7 @@ public class JsonBuilderGenerator extends Generator { if (arr != null) { sw.println("return " + ret + ";"); } else { - sw.println("return Arrays.asList(" + ret + ");"); + sw.println("return a == null ? null : Arrays.asList(" + ret + ");"); } } else if (method.getReturnType().isEnum() != null) { sw.println("return " + method.getReturnType().getQualifiedSourceName() diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/vm/JsonBuilderHandler.java b/gwtquery-core/src/main/java/com/google/gwt/query/vm/JsonBuilderHandler.java index 395a38a3..0cece814 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/vm/JsonBuilderHandler.java +++ b/gwtquery-core/src/main/java/com/google/gwt/query/vm/JsonBuilderHandler.java @@ -349,4 +349,4 @@ public class JsonBuilderHandler implements InvocationHandler { return ispropertyGetters; } -} \ No newline at end of file +} diff --git a/gwtquery-core/src/test/java/com/google/gwt/query/client/dbinding/DataBindingTestJre.java b/gwtquery-core/src/test/java/com/google/gwt/query/client/dbinding/DataBindingTestJre.java index 1767da99..3652ab43 100644 --- a/gwtquery-core/src/test/java/com/google/gwt/query/client/dbinding/DataBindingTestJre.java +++ b/gwtquery-core/src/test/java/com/google/gwt/query/client/dbinding/DataBindingTestJre.java @@ -249,9 +249,9 @@ public class DataBindingTestJre extends GWTTestCase { //WHEN fetching that user GUser retrievedUser = GQ.create(GUser.class); retrievedUser.parse(json, true); - + //THEN List phones = retrievedUser.getPhones(); assertNull(phones); } -} \ No newline at end of file +} -- cgit v1.2.3