diff options
author | Maxime Mériouma-Caron <maxime.meriouma@arcbees.com> | 2016-01-27 17:03:14 -0500 |
---|---|---|
committer | Maxime Mériouma-Caron <maxime.meriouma@arcbees.com> | 2016-01-27 17:03:14 -0500 |
commit | a077516121504ab88c207838966e478d3be59fc6 (patch) | |
tree | 74f04896fdf0c6ff8f144188c0fd2a2b8512feed | |
parent | 1318f8f90e69757838a98b4219c7932dfd20badf (diff) | |
download | gwtquery-a077516121504ab88c207838966e478d3be59fc6.tar.gz gwtquery-a077516121504ab88c207838966e478d3be59fc6.zip |
Revert null when empty
-rw-r--r-- | gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsonBuilderGenerator.java | 2 | ||||
-rw-r--r-- | gwtquery-core/src/test/java/com/google/gwt/query/client/dbinding/DataBindingTestJre.java | 4 |
2 files changed, 3 insertions, 3 deletions
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"); |