diff options
author | Artur Signell <artur.signell@itmill.com> | 2012-08-03 12:45:39 +0000 |
---|---|---|
committer | Artur Signell <artur.signell@itmill.com> | 2012-08-03 12:45:39 +0000 |
commit | fcee628c1292fe0c32de9036ab97be15f2d9823f (patch) | |
tree | 92e99e7b64c3ea4624e45696bee00848edcb0f85 /src/com/vaadin | |
parent | 98207e5a3b98f8e257ebf87608331f01dee909ed (diff) | |
download | vaadin-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.java | 4 |
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"); } } |