]> source.dussan.org Git - vaadin-framework.git/commitdiff
Throw IllegalArgumentException from addParameter for null parameters instead of silen...
authorArtur Signell <artur.signell@itmill.com>
Fri, 3 Aug 2012 12:45:39 +0000 (12:45 +0000)
committerArtur Signell <artur.signell@itmill.com>
Fri, 3 Aug 2012 12:45:39 +0000 (12:45 +0000)
svn changeset:24057/svn branch:6.8

src/com/vaadin/data/util/sqlcontainer/query/generator/StatementHelper.java

index f9458609c38dcd8d4a41b2c775def40ec1b312dc..b012ce7685f01153f1fc69d828c2a89898d60ddc 100644 (file)
@@ -47,6 +47,10 @@ public class StatementHelper implements Serializable {
         if (parameter != null) {
             parameters.add(parameter);
             dataTypes.put(parameters.size() - 1, parameter.getClass());
+        } else {
+            throw new IllegalArgumentException(
+                    "You cannot add null parameters using addParamaters(Object). "
+                            + "Use addParameters(Object,Class) instead");
         }
     }