MQVersion throws ArrayIndexOutOfBoundsException for negative version values
- Dominant language
- Java
- Stars
- 22.6k
- Forks
- 12k
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 27
Description
MQVersion.getVersionDesc and value2Version clamp values above the known range, but negative values index the version array directly and throw ArrayIndexOutOfBoundsException. Version values originate from remote client metadata, so malformed or unknown negative values should be handled without crashing callers. Expected behavior: clamp negative values to the earliest known version, consistently with the existing upper-bound handling.
Contributor guide
Research direction
Start by locating the MQVersion class and reading getVersionDesc and value2Version, especially their existing handling of values above the known range. Verify that negative inputs no longer cause an ArrayIndexOutOfBoundsException and instead resolve to the earliest known version, with tests covering both methods.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100