]> source.dussan.org Git - gwtquery.git/commitdiff
Revert null when empty
authorMaxime Mériouma-Caron <maxime.meriouma@arcbees.com>
Wed, 27 Jan 2016 22:03:14 +0000 (17:03 -0500)
committerMaxime Mériouma-Caron <maxime.meriouma@arcbees.com>
Wed, 27 Jan 2016 22:03:14 +0000 (17:03 -0500)
gwtquery-core/src/main/java/com/google/gwt/query/rebind/JsonBuilderGenerator.java
gwtquery-core/src/test/java/com/google/gwt/query/client/dbinding/DataBindingTestJre.java

index 86bf6377e8cfdeb8ab1d08d19a87ef575a42e2aa..e30b7588b1b9a24c7d8882ac343b17534cfbc467 100644 (file)
@@ -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()
index 903ef138168e271b9cf13c581e8ab9ef90903911..a8770cc2e59ee34a5964052ab461eb7d76c26168 100644 (file)
@@ -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");