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:53:26 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_4_X 2515ec9e9 -> 2911c5847


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

Branch: refs/heads/GROOVY_2_4_X
Commit: 2911c584713b663dd2679141c54efae872456fcc
Parents: 2515ec9
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:53:07 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/2911c584/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 41bebd1..24c993d 100644
--- a/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
+++ b/subprojects/groovy-sql/src/main/java/groovy/sql/Sql.java
@@ -4112,8 +4112,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