summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin
diff options
context:
space:
mode:
authorArtur Signell <artur.signell@itmill.com>2012-08-03 12:45:39 +0000
committerArtur Signell <artur.signell@itmill.com>2012-08-03 12:45:39 +0000
commitfcee628c1292fe0c32de9036ab97be15f2d9823f (patch)
tree92e99e7b64c3ea4624e45696bee00848edcb0f85 /src/com/vaadin
parent98207e5a3b98f8e257ebf87608331f01dee909ed (diff)
downloadvaadin-framework-fcee628c1292fe0c32de9036ab97be15f2d9823f.tar.gz
vaadin-framework-fcee628c1292fe0c32de9036ab97be15f2d9823f.zip
Throw IllegalArgumentException from addParameter for null parameters instead of silently ignoring them (#9147)
svn changeset:24057/svn branch:6.8
Diffstat (limited to 'src/com/vaadin')
-rw-r--r--src/com/vaadin/data/util/sqlcontainer/query/generator/StatementHelper.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/vaadin/data/util/sqlcontainer/query/generator/StatementHelper.java b/src/com/vaadin/data/util/sqlcontainer/query/generator/StatementHelper.java
index f9458609c3..b012ce7685 100644
--- a/src/com/vaadin/data/util/sqlcontainer/query/generator/StatementHelper.java
+++ b/src/com/vaadin/data/util/sqlcontainer/query/generator/StatementHelper.java
@@ -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");
}
}