GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Accept null VAddParams in vaddFP32 with reduceDim by HDPark95 · Pull Request #4684 · redis/jedis

Conversation

@HDPark95

@HDPark95 HDPark95 commented Aug 15, 2026 •
edited by cursor Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Summary

CommandObjects.vaddFP32(String, byte[], String, int, VAddParams) called args.addParams(params) directly, so a null params threw NullPointerException before the command was built.

Key Decisions & Assumptions

The other 21 vector set overloads route params through the null tolerant addOptionalParams helper, including the binary sibling vaddFP32(byte[], byte[], byte[], int, VAddParams), so the two paths disagreed on identical arguments. No overload takes reduceDim without params, so null is the only way to ask for FP32 plus REDUCE and nothing else.

Testing

CommandObjectsVectorSetTest needs no server. It pins the argv for the string and binary overloads with null params, plus a non-null case, and fails with the NPE on master. Full JDK 8 unit run: 3294 tests, 0 failures.


Note

Low Risk
Single-line behavioral alignment with existing vector-set helpers; no auth, data, or API contract changes beyond fixing null params.

Overview
Fixes a null-handling bug in CommandObjects.vaddFP32 for the string-key overload that includes reduceDim. That method used args.addParams(params) directly, so passing null for VAddParams threw an NPE while building the command.

The change routes params through addOptionalParams, matching the other vector-set vadd / vaddFP32 overloads (including the byte-key reduceDim variant). Callers can now use FP32 + REDUCE with no extra VADD options by passing null params.

Reviewed by Cursor Bugbot for commit 1e8e135. Bugbot is set up for automated code reviews on this repo. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@HDPark95
Accept null VAddParams in vaddFP32 with reduceDim
c31eb56
vaddFP32(String, byte[], String, int, VAddParams) called
args.addParams(params) directly, so a null params threw a
NullPointerException before the command was built.

The other 21 vector set overloads route params through the null
tolerant addOptionalParams helper, including the binary sibling
vaddFP32(byte[], byte[], byte[], int, VAddParams), so the string
and binary paths disagreed on the same arguments. There is no
vaddFP32 overload that takes reduceDim without params, so passing
null is the only way to ask for FP32 plus REDUCE and nothing else.

Route this overload through the same helper.

Regression coverage is CommandObjectsVectorSetTest, a unit test that
needs no server: it pins the VADD argv for both the string and binary
overloads with null params, and keeps a non-null case to show the
options are still appended.
@ggivo ggivo added the enhancement label Aug 18, 2026
@ggivo ggivo mentioned this pull request Aug 18, 2026
Vector sets: add plain overloads for optional params and stop accepting null while the API is @Experimental #4688
Open
ggivo added 2 commits August 18, 2026 11:17
@ggivo
Drop null-params tests pending vector-set overload rework
0c4f93a
Any test of the null fix pins null-params acceptance as public
contract, which redis#4688 plans to replace with plain
overloads while the API is still @experimental. Coverage for the
family arrives with that work.
@ggivo
Merge branch 'master' into fix/vaddfp32-reducedim-null-params
1e8e135
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Aug 18, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1e8e135f3a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/main/java/redis/clients/jedis/CommandObjects.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@ggivo

ggivo commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

Taking the one-line fix for 8.1.0 — it unifies the String overload with the rest of the vadd family, which already tolerates null params. Dropped the tests in 0c4f93a on purpose: they'd cement null-acceptance as tested contract, and #4688 plans to replace null with plain overloads while the API is still @experimental;

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ggivo
ggivo merged commit 9eb1007 into redis:master Aug 19, 2026
14 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@ggivo ggivo added bug and removed enhancement labels Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

bug

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@HDPark95 @ggivo
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.