groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject groovy git commit: GROOVY-8174: Groovy.Sql+Oracle parameter substitution problem (closes #534)
Date Fri, 05 May 2017 03:52:38 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_5_X abcf42c23 -> 2d83ebd82


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/2d83ebd8
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/2d83ebd8
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/2d83ebd8

Branch: refs/heads/GROOVY_2_5_X
Commit: 2d83ebd829d0d0da58f63eb54b652b48e02f718f
Parents: abcf42c
Author: paulk <paulk@asert.com.au>
Authored: Thu May 4 10:53:41 2017 +1000
Committer: paulk <paulk@asert.com.au>
Committed: Fri May 5 13:52:19 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/2d83ebd8/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