Conversation
…al lookup Look stored procedure parameters up with containsKey so a parameter bound to null is not replaced by the value registered under its position. Index the parameter array by the parameter position so IN parameters following an OUT parameter are bound instead of being silently skipped.
solomax
reviewed
Sep 15, 2026
| final boolean bind = params != null && params.length > 0; | ||
| for (Column c : spq.getProcedure().getInColumns()) { | ||
| if (params != null && c.getIndex() < params.length) { | ||
| if (bind) { |
Contributor
There was a problem hiding this comment.
c.getIndex() < params.length was dropped in 2 code blocks
Are you sure this check is not necessary anymore?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stored procedure parameters are now looked up with
containsKey, so a named parameter bound to null is no longer replaced by the value registered under its position. The parameter array is now indexed by position, so an IN parameter that follows an OUT parameter gets bound instead of being silently skipped. New tests inTestStoredProcedureQueryFixescover both cases.