groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [09/50] [abbrv] groovy git commit: GROOVY-8174: Groovy.Sql+Oracle parameter substitution problem (closes #534)
Date Wed, 10 May 2017 22:26:37 GMT
GROOVY-8174: Groovy.Sql+Oracle parameter substitution problem (closes #534)


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/921f96d0
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/921f96d0
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/921f96d0

Branch: refs/heads/parrot
Commit: 921f96d0477308350c81690213d3ab5ec35fbfe9
Parents: 2093378
Author: paulk <paulk@asert.com.au>
Authored: Thu May 4 10:53:41 2017 +1000
Committer: paulk <paulk@asert.com.au>
Committed: Thu May 11 08:05:34 2017 +1000

----------------------------------------------------------------------
 subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/921f96d0/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java b/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
index 26d52df..fd0ff13 100644
--- a/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
+++ b/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
@@ -4114,8 +4114,10 @@ public class Sql {
                 Map paramsMap = (Map) params.get(0);
                 if (paramsMap.isEmpty()) return;
             }
-            if (metaData.getParameterCount() != params.size()) {
+            if (metaData.getParameterCount() < params.size()) {
                 throw new IllegalArgumentException("Found " + metaData.getParameterCount()
+ " parameter placeholders but supplied with " + params.size() + " parameters");
+            } else if (metaData.getParameterCount() != params.size()) {
+                LOG.warning("Found " + metaData.getParameterCount() + " parameter placeholders
but supplied with " + params.size() + " parameters");
             }
         }
         for (Object value : params) {


Mime
View raw message