Skip to content

Commit e87bfd5

Browse files
chore: Publish v5.4.0 (#296)
Co-authored-by: dtayeh <[email protected]>
1 parent 9f742e0 commit e87bfd5

File tree

71 files changed

+15379
-4944
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+15379
-4944
lines changed

code/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<dependency>
66
<groupId>com.expediagroup</groupId>
77
<artifactId>rapid-sdk</artifactId>
8-
<version>5.3.2</version>
8+
<version>5.4.0</version>
99
</dependency>
1010
```
1111

code/pom.xml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>com.expediagroup</groupId>
66
<artifactId>rapid-sdk</artifactId>
7-
<version>5.3.2</version>
7+
<version>5.4.0</version>
88
<name>EG rapid-sdk for Java</name>
9-
<description>EG rapid-sdk v5.3.2</description>
9+
<description>EG rapid-sdk v5.4.0</description>
1010
<url>https://github.com/ExpediaGroup/test-sdk</url>
1111
<inceptionYear>2022</inceptionYear>
1212
<packaging>jar</packaging>
@@ -63,27 +63,27 @@
6363
<sdk-title>${project.artifactId}</sdk-title>
6464

6565
<!-- Plugin Versions -->
66-
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
66+
<maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
6767
<maven-dependency-plugin.version>3.8.1</maven-dependency-plugin.version>
6868
<maven-enforcer-plugin.version>3.5.0</maven-enforcer-plugin.version>
6969
<maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
7070
<maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
7171
<maven-shade-plugin.version>3.6.0</maven-shade-plugin.version>
7272
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
73-
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
73+
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
7474
<build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
7575
<ktlint-plugin.version>3.5.0</ktlint-plugin.version>
76-
<jacoco-plugin.version>0.8.12</jacoco-plugin.version>
76+
<jacoco-plugin.version>0.8.13</jacoco-plugin.version>
7777
<dokka-plugin.version>2.0.0</dokka-plugin.version>
7878
<dokka-old-versions.location/> <!-- passed as a property when running dokka:dokka-->
7979
<properties.maven.plugin.version>1.2.1</properties.maven.plugin.version>
8080
<maven.licence.plugin.version>4.6</maven.licence.plugin.version>
81-
<flatten.maven.plugin.version>1.6.0</flatten.maven.plugin.version>
82-
<kotlin.version>2.1.0</kotlin.version>
81+
<flatten.maven.plugin.version>1.7.0</flatten.maven.plugin.version>
82+
<kotlin.version>2.1.20</kotlin.version>
8383
<kotlinx.coroutines.version>1.10.1</kotlinx.coroutines.version>
84-
<ktor.version>3.0.3</ktor.version>
84+
<ktor.version>3.1.2</ktor.version>
8585
<kotlin-atomic.version>0.27.0</kotlin-atomic.version>
86-
<slf4j.version>2.0.16</slf4j.version>
86+
<slf4j.version>2.0.17</slf4j.version>
8787
<maven.nexus-staging.plugin.version>1.7.0</maven.nexus-staging.plugin.version>
8888
<maven.gpg.plugin.version>3.2.7</maven.gpg.plugin.version>
8989
</properties>
@@ -131,7 +131,7 @@
131131
<dependency>
132132
<groupId>com.fasterxml.jackson</groupId>
133133
<artifactId>jackson-bom</artifactId>
134-
<version>2.18.2</version>
134+
<version>2.18.3</version>
135135
<type>pom</type>
136136
<scope>import</scope>
137137
</dependency>
@@ -153,7 +153,7 @@
153153
<dependency>
154154
<groupId>com.fasterxml.jackson.core</groupId>
155155
<artifactId>jackson-annotations</artifactId>
156-
<version>2.18.2</version>
156+
<version>2.18.3</version>
157157
</dependency>
158158
</dependencies>
159159
</dependencyManagement>
@@ -739,7 +739,7 @@
739739
<dependency>
740740
<groupId>org.apache.commons</groupId>
741741
<artifactId>commons-text</artifactId>
742-
<version>1.13.0</version>
742+
<version>1.13.1</version>
743743
</dependency>
744744

745745
<dependency>

code/src/main/kotlin/com/expediagroup/sdk/core/constant/provider/LogMaskingRegexProvider.kt

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,38 @@
1616
package com.expediagroup.sdk.core.constant.provider
1717

1818
internal object LogMaskingRegexProvider {
19+
/**
20+
* Generates a regex pattern to match specified fields in a JSON string.
21+
*
22+
* @param maskedBodyFields the set of fields to be masked
23+
* @param valueToMatch regex pattern to match the value of the fields. Default: match any sequence of characters except double quotes.
24+
* @return the regex pattern to match the specified fields and their values
25+
*/
1926
fun getMaskedFieldsRegex(
2027
maskedBodyFields: Set<String>,
21-
value: String = "[^\\\"]+"
28+
valueToMatch: String = "[^\\\"]+"
2229
): Regex {
2330
val fields = maskedBodyFields.joinToString("|")
24-
return "\"($fields)(\\\\*\"\\s*:\\s*\\\\*\")$value(?:\\\\?\"|)".toRegex()
31+
// The pattern matches:
32+
// - The field name (one of the specified fields) captured in group 1.
33+
// - Optional backslash, closing double quotes, colon(:), optional whitespace, and opening double quotes.
34+
// - The value of the field, matching the specified valueToMatch pattern.
35+
// - Optional backslash, followed by a closing double quote
36+
return "\"($fields)(\\\\?\"\\s*:\\s*\\\\*\")$valueToMatch(?:\\\\?\")".toRegex()
2537
}
2638

39+
/**
40+
* Generates a regex pattern to match a specified field in a JSON string.
41+
*
42+
* @param maskedBodyField the field to be masked
43+
* @param valueToMatch regex pattern to match the value of the field. Default: match any sequence of characters except double quotes.
44+
* @return the regex pattern to match the specified field and its value
45+
*/
2746
fun getMaskedFieldsRegex(
2847
maskedBodyField: String,
29-
value: String = "[^\\\"]+"
48+
valueToMatch: String = "[^\\\"]+"
3049
): Regex {
3150
val fields = setOf(maskedBodyField)
32-
return getMaskedFieldsRegex(fields, value)
51+
return getMaskedFieldsRegex(fields, valueToMatch)
3352
}
3453
}

0 commit comments

Comments
 (0)