Skip to content

[fix][common] Preserve equals in FieldParser map values#25907

Open
hiSandog wants to merge 1 commit into
apache:masterfrom
hiSandog:fix/fieldparser-map-values-20260601
Open

[fix][common] Preserve equals in FieldParser map values#25907
hiSandog wants to merge 1 commit into
apache:masterfrom
hiSandog:fix/fieldparser-map-values-20260601

Conversation

@hiSandog
Copy link
Copy Markdown
Contributor

@hiSandog hiSandog commented Jun 1, 2026

Fixes: none

Motivation

FieldParser parses map configuration values by splitting every = character. This rejects values that contain = and also rejects empty string values such as key=, even though both are valid string map values after the first key/value separator.

Modifications

Split map entries on the first = only, preserving the rest of the value. Added a regression test covering a value that contains = and an empty map value.

Verifying this change

  • Make sure that the change passes the CI checks.

This change added tests and can be verified as follows:

  • Added FieldParserTest.testMapWithEqualsSignAndEmptyValue
  • Ran git diff --check
  • Attempted ./gradlew :pulsar-common:test --tests org.apache.pulsar.common.util.FieldParserTest, but the local environment has no Java Runtime installed, so Gradle could not start.

Does this pull request potentially affect one of the following parts:

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant