Skip to content

Commit

Permalink
Dependency updates >>> 1.3.0 (#82)
Browse files Browse the repository at this point in the history
* Use PhoneLib 8.13.47 and prepare release

* Start Snapshot 1.2.10 after release 1.2.9

* Dependency Upgrade because of CVE-2024-38808 in spring-expression 5.3.32:
- org.springframework.spring-context 5.3.32 >>> 5.3.39
- org.apache.commons.commons-lang3 3.12.0 >>> 3.17.0
- io.swagger.swagger-annotations 1.6.11 >>> 1.6.14
- com.fasterxml.jackson.core.jackson-core 2.15.2 >>> 2.18.0
- com.fasterxml.jackson.core.jackson-annotations 2.15.2 >>> 2.8.0
- com.fasterxml.jackson.core.jackson-databind 2.15.2 >>> 2.18.0
- org.slf4j.slf4j-api 2.0.7 >>> 2.0.16
- org.codehaus.groovy.groovy-all 3.0.17 >>> 3.0.22
- org.spockframework.spock-core 2.3-groovy-3.0 >>> 2.4-M4-groovy-3.0
- org.testng.testng 7.8.0 >>> 7.10.2

Fixing code in IsValidNumberTest and correct Expected Fails for:
- 016013
- 016250
- 016255
- 016399
- 0181
- 01988
  • Loading branch information
Anrufliste authored Oct 5, 2024
1 parent 740dfd7 commit 4b0b2c0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
22 changes: 11 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<artifactId>normalizer</artifactId>
<name>Phonenumber Normalizer</name>
<description>Library to work with phonenumbers, especially to fix googles PhoneLib ignoring German Landline specifics.</description>
<version>1.2.10-SNAPSHOT</version>
<version>1.3.0</version>
<packaging>jar</packaging>
<url>https://github.com/telekom/phonenumber-normalizer</url>

Expand Down Expand Up @@ -101,37 +101,37 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.3.32</version>
<version>5.3.39</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<version>3.17.0</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.6.11</version>
<version>1.6.14</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.15.2</version>
<version>2.18.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.15.2</version>
<version>2.18.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.15.2</version>
<version>2.18.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.7</version>
<version>2.0.16</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
Expand All @@ -156,7 +156,7 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>3.0.17</version>
<version>3.0.22</version>
<scope>test</scope>
<type>pom</type>
<exclusions>
Expand All @@ -175,14 +175,14 @@
<dependency>
<groupId>org.spockframework</groupId>
<artifactId>spock-core</artifactId>
<version>2.3-groovy-3.0</version>
<version>2.4-M4-groovy-3.0</version>
<scope>test</scope>
</dependency>
<!-- Replace Version 7.5 which has https://devhub.checkmarx.com/cve-details/CVE-2022-4065/?utm_source=jetbrains&utm_medium=referral&utm_campaign=idea&utm_term=maven -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.8.0</version>
<version>7.10.2</version>
<scope>test</scope>
</dependency>
<!--Replaces Version 3.5.1 which has https://devhub.checkmarx.com/cve-details/CVE-2007-2379/?utm_source=jetbrains&utm_medium=referral&utm_campaign=idea -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1502,7 +1502,7 @@ class IsValidNumberTest extends Specification {
false, true, true, false]

when:
Boolean[] results = []
PhoneNumberUtil.ValidationResult[] results = []
for (number in numbersToTest) {
def phoneNumber = phoneUtil.parse(number, regionCode)
results += phoneUtil.isPossibleNumberWithReason(phoneNumber)
Expand All @@ -1522,17 +1522,17 @@ class IsValidNumberTest extends Specification {
//
// 0160
//
"016013" | "DE" | [true, false, false, true, true, false, false, true]
"016013" | "DE" | [true, true, true, true, true, true, true, true]
//
// 0162
//
"016250" | "DE" | [true, false, false, true, true, false, false, true]
"016255" | "DE" | [true, false, false, true, true, false, false, true]
"016250" | "DE" | [true, true, true, true, true, true, true, true]
"016255" | "DE" | [true, true, true, true, true, true, true, true]

//
// 0163
//
"016399" | "DE" | [true, false, false, true, true, false, false, true]
"016399" | "DE" | [true, true, true, true, true, true, true, true]
}

def "check if original lib fixed isValid for German reserve 16 range"(String reserve, regionCode, boolean[] expectingFails) {
Expand All @@ -1552,7 +1552,7 @@ class IsValidNumberTest extends Specification {
Boolean[] expectedResults = [false, false, false, false, false, false, false, false, false, false, false]

when:
Boolean[] results = []
PhoneNumberUtil.ValidationResult[] results = []
for (number in numbersToTest) {
def phoneNumber = phoneUtil.parse(number, regionCode)
results += phoneUtil.isPossibleNumberWithReason(phoneNumber)
Expand Down Expand Up @@ -2093,7 +2093,7 @@ class IsValidNumberTest extends Specification {
true, true, true, true, true, true, true, true, false]

when:
Boolean[] results = []
PhoneNumberUtil.ValidationResult[] results = []
for (number in numbersToTest) {
def phoneNumber = phoneUtil.parse(number, regionCode)
results += phoneUtil.isPossibleNumberWithReason(phoneNumber)
Expand All @@ -2109,8 +2109,8 @@ class IsValidNumberTest extends Specification {
// 0181 is VPN: https://www.bundesnetzagentur.de/DE/Fachthemen/Telekommunikation/Nummerierung/0181/181_node.html
// Number Plan https://www.bundesnetzagentur.de/SharedDocs/Downloads/DE/Sachgebiete/Telekommunikation/Unternehmen_Institutionen/Nummerierung/Rufnummern/0181/Nummernplan_IVPN.pdf?__blob=publicationFile&v=1
// nation number with 14 digits
"0181" | "DE" | [true, true, true, false, false, false, false, false, false, false, false, true]
"+49181" | "FR" | [true, true, true, false, false, false, false, false, false, false, false, true]
"0181" | "DE" | [true, true, true, true, true, true, true, true, true, true, true, true]
"+49181" | "FR" | [true, true, true, true, true, true, true, true, true, true, true, true]
}

def "check if original lib fixed isValid for German VPN 18(2-9) range"(String reserve, regionCode, boolean[] expectingFails) {
Expand Down Expand Up @@ -2822,7 +2822,7 @@ class IsValidNumberTest extends Specification {
}

when:
Boolean[] results = []
PhoneNumberUtil.ValidationResult[] results = []
for (number in numbersToTest) {
def phoneNumber = phoneUtil.parse(number, regionCode)
results += phoneUtil.isPossibleNumberWithReason(phoneNumber)
Expand All @@ -2841,9 +2841,9 @@ class IsValidNumberTest extends Specification {
// 01988-xx TODO: verify called number information is transfered outside the number (no digits after xx)
// for traditional libphone it makes no difference if number is used by public user or operator, so one of it will always fail until it could distinguish it
"01988" | false | "DE" | [true, true, true, true, true, true, true, true, true, true, true, true, true]
"01988" | true | "DE" | [true, true, false, true, true, true, true, true, false, true, true, true, true]
"01988" | true | "DE" | [true, true, true, true, true, true, true, true, true, true, true, true, true]
"+491988" | false | "FR" | [true, true, true, true, true, true, true, true, true, true, true, true, true]
"+491988" | true | "FR" | [true, true, false, true, true, true, true, true, false, true, true, true, true]
"+491988" | true | "FR" | [true, true, true, true, true, true, true, true, true, true, true, true, true]
}

def "check if original lib fixed isValid for German traffic routing 01989 for Call Assistant"(String number, boolean Operator, regionCode, expectedResult, expectingFail) {
Expand Down

0 comments on commit 4b0b2c0

Please sign in to comment.