Skip to content

test: preserve repeated query parameter order in the Java DSL - #1658

Merged
He-Pin merged 1 commit into
apache:mainfrom
He-Pin:test/java-query-repeated-order
Nov 26, 2026
Merged

He-Pin merged 1 commit into
apache:mainfrom
He-Pin:test/java-query-repeated-order

Conversation

@He-Pin

@He-Pin He-Pin commented Nov 26, 2026

Copy link
Copy Markdown
Member

Motivation

The Scala URI API already tests repeated query parameter order. The Java API exposes the grouped values separately and had no direct test for this behavior.

Modification

Add a UriTest case with an ordinary URI containing repeated values interleaved with another key. Assert the complete Java multimap and the list order for the repeated key, independently of map key iteration order.

Result

The test protects the Java Query.toMultiMap() behavior without changing production code or getAll().

References

Tests

  • The new JUnit case passed against the Scala 2.13.18 and 3.3.9 builds with JDK 17.
  • Java format and license header checks passed for the changed test.

Motivation:
The Java query API exposes ordered lists of repeated values, but the existing ordering tests exercise the Scala API directly.

Modification:
Verify the Java Query.toMultiMap result for a URI with interleaved query parameters and three occurrences of one key.

Result:
The Java API has direct regression coverage without changing query parsing or public behavior.
@He-Pin
He-Pin requested a review from pjfanning November 26, 2026 08:48

@pjfanning pjfanning left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@He-Pin
He-Pin merged commit 294856c into apache:main Nov 26, 2026
6 checks passed
@He-Pin
He-Pin deleted the test/java-query-repeated-order branch November 26, 2026 11:35
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.

2 participants