Preserve attribute values containing an equals sign in AttributeParser#10552
Open
vasiliy-mikhailov wants to merge 1 commit into
Open
Preserve attribute values containing an equals sign in AttributeParser#10552vasiliy-mikhailov wants to merge 1 commit into
vasiliy-mikhailov wants to merge 1 commit into
Conversation
The value was split on the equals sign without a limit, truncating values that contain an equals sign. Split with a limit of 2 to keep the full value.
RockteMQ-AI
approved these changes
Jun 27, 2026
RockteMQ-AI
left a comment
Contributor
There was a problem hiding this comment.
Review by github-manager-bot
Summary
Changes AttributeParser.parseToMap() to split on = with a limit of 2, so that attribute values containing = characters are preserved instead of being silently truncated.
Findings
- [Info]
AttributeParser.java:47— The one-line fix (split(ATTR_KEY_VALUE_EQUAL_SIGN, 2)) is the standard Java idiom for key-value parsing where values may contain the delimiter. Correct and minimal. - [Info]
AttributeParserTest.java:124-128— Test case"+key=val=ue"→{"val=ue"}directly validates the fix.
Verdict
Clean one-line bug fix with a targeted test. LGTM.
Automated review by github-manager-bot
RockteMQ-AI
reviewed
Jun 27, 2026
RockteMQ-AI
left a comment
Contributor
There was a problem hiding this comment.
Review by github-manager-bot
Summary
Fixes AttributeParser.parseToMap() to correctly handle attribute values that contain an equals sign (=) by limiting the split() to 2 parts.
Findings
- [Info]
AttributeParser.java:47— Changingsplit(ATTR_KEY_VALUE_EQUAL_SIGN)tosplit(ATTR_KEY_VALUE_EQUAL_SIGN, 2)is the correct and minimal fix. Withlimit=2, only the first=is used as a delimiter; everything after it (including additional=characters) is preserved insplits[1]. - [Info]
AttributeParserTest.java:124-128— Test caseparseToMap_ValueContainingEqualsSign_PreservesFullValuedirectly validates the fix with+key=val=ue→val=ue. Good coverage.
Suggestions
- The existing test
testParseBetweenStringAndDistortionalready covers round-trip fidelity for simple cases. Consider adding a round-trip test where the value contains=to ensureparseToString→parseToMapround-trips correctly (e.g.,+key=val=ueshould survive a full round-trip).
Verdict
Clean, minimal one-character fix (split limit). LGTM.
Automated review by github-manager-bot
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.
AttributeParsersplits eachkey=valuepair on=without a limit, so a value that itself contains=is truncated (only the part before the second=is kept). Split with a limit of 2 so the full value is preserved.Added a test for a value containing an
=.Verifying this change
The added
AttributeParserTest#parseToMap_ValueContainingEqualsSign_PreservesFullValuefails on the currentdevelopand passes with this change:Before the fix (on
develop):After the fix:
AI assistance disclosure
This contribution was produced with the help of an AI pipeline. The pipeline processed a large amount of source code to surface suspected bugs, reproduced a subset of them with failing unit tests and generated candidate fixes, and prepared pull requests from the ones that held up. Each PR was then reviewed and verified by a human before being opened: the fix and test were checked by hand and the test was confirmed to fail before the change and pass after.