From: Maxime Mériouma-Caron Date: Wed, 27 Jan 2016 22:03:14 +0000 (-0500) Subject: Revert null when empty X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a077516121504ab88c207838966e478d3be59fc6;p=gwtquery.git Revert null when empty --- 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 86bf6377..e30b7588 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 (a == null ? null : Arrays.asList(" + ret + "));"); + sw.println("return Arrays.asList(" + ret + ");"); } } else if (method.getReturnType().isEnum() != null) { sw.println("return " + method.getReturnType().getQualifiedSourceName() 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 903ef138..a8770cc2 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 @@ -238,8 +238,8 @@ public class DataBindingTestJre extends GWTTestCase { //THEN assertEquals(0, retrievedUser.getPhones().size()); } - - public void test_return_null_when_list_is_not_specified() { + + public void _test_return_null_when_list_is_not_specified() { //GIVEN a JSON representation of a user GUser user = GQ.create(GUser.class); user.set("email", "a@b.com");