Skip to content

fix(rest): replace %1s/%2s width specifiers with %s in REST URL formatting - #1368

Open
chjpooh2002 wants to merge 1 commit into
a2aproject:mainfrom
chjpooh2002:issue-1367
Open

chjpooh2002 wants to merge 1 commit into
a2aproject:mainfrom
chjpooh2002:issue-1367

Conversation

@chjpooh2002

Copy link
Copy Markdown

Description

Replaces %1s and %2s width specifiers with %s in RestTransport and RestTransport_v0_3 when formatting REST endpoint paths.

In java.util.Formatter, %2s pads 1-character values with a leading space (e.g., /tasks/task-1/pushNotificationConfigs/ 5), which causes URI.create(...) to throw IllegalArgumentException: Illegal character in path.

Changes

  • Replace %1s/%2s with %s in RestTransport (8 occurrences) and RestTransport_v0_3 (3 occurrences).
  • Add regression tests for single-character push notification config IDs (5) for both GET and DELETE in RestTransportTest and RestTransport_v0_3_Test.

Verification

Fixes #1367

…tting

Replace %1s and %2s width specifiers with %s in RestTransport and RestTransport_v0_3 so single-character push notification config IDs are not space-padded.

This fixes a2aproject#1367

This branch has not been deployed

No deployments
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.

[Bug]: REST transport uses %1s/%2s width specifiers, padding single-char push notification config IDs with spaces

1 participant