Skip to content

Commit

Permalink
- fixes parameters names replacement regression
Browse files Browse the repository at this point in the history
  • Loading branch information
baywet committed Sep 8, 2023
1 parent 1531620 commit 25cfbdc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

## [0.7.4] - 2023-09-08

### Fixed

- Fixed a regression where query parameters name replacement would fail with group like regex syntax ($ sign)

## [0.7.3] - 2023-09-04

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.Objects;
import java.util.AbstractMap.SimpleEntry;
import java.util.Map.Entry;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -120,7 +121,7 @@ public static String decodeQueryParameters(@Nullable final String original, @Non

for (final Entry<String, String> symbolToReplace : symbolsToReplace) {
for (final Entry<String, String> queryParameter : toDecode) {
queryParameter.setValue(queryParameter.getValue().replaceAll("(?i)"+Pattern.quote(symbolToReplace.getKey()), symbolToReplace.getValue()));
queryParameter.setValue(queryParameter.getValue().replaceAll("(?i)"+Pattern.quote(symbolToReplace.getKey()), Matcher.quoteReplacement(symbolToReplace.getValue())));
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ org.gradle.caching=true
mavenGroupId = com.microsoft.kiota
mavenMajorVersion = 0
mavenMinorVersion = 7
mavenPatchVersion = 3
mavenPatchVersion = 4
mavenArtifactSuffix =

#These values are used to run functional tests
Expand Down

0 comments on commit 25cfbdc

Please sign in to comment.