solomax commented on code in PR #184:
URL: https://github.com/apache/openjpa/pull/184#discussion_r4011711990


##########
openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/StoredProcedureQuery.java:
##########
@@ -186,15 +186,17 @@ public ResultObjectProvider executeQuery(StoreQuery q, 
Object[] params, Range ra
                 stmnt = conn.prepareCall(_proc.getCallSQL());
 
                 final StoredProcedureQuery spq = (StoredProcedureQuery) q;
+                // no parameter values at all: leave the (un)binding to the 
driver
+                final boolean bind = params != null && params.length > 0;
                 for (Column c : spq.getProcedure().getInColumns()) {
-                    if (params != null && c.getIndex() < params.length) {
+                    if (bind) {

Review Comment:
   `c.getIndex() < params.length` was dropped in 2 code blocks
   Are you sure this check is not necessary anymore?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to