You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UriUtils ignores allowReservedCharacters=false when the input has no percent triplet #3625
UriUtils.encode("a&b=c", false) returns a&b=c, whereas the corresponding call with an existing triplet, UriUtils.encode("a&b=c%20", false), encodes the raw reserved characters. The no-triplet branch in encodeInternal passes a hard-coded true to encodeChunk instead of the argument.
Expected: a%26b%3Dc when the flag is false; existing %XX triplets should still be preserved. The true-flag and flagless overloads keep their current behavior. This concerns the existing boolean contract, separate from #2002's discussion of double encoding.
Reproduced on current master with UriUtilsTest: 32 tests, four failures, no errors or skips. The failing cases include both boolean overloads and non-ASCII input. Main sources compile with JDK 8 and tests run with actual JDK 25 using the project's dev profile.
I will pass the flag through in that branch and add these regressions. The scope is UriUtils, its existing test suite, and the changelog; no URI-template expansion or query collection changes.
Reproduction and report prepared and posted by an AI assistant for @hutiefang76.
Activity