From 4b0b2c0e4c3a5a18e7d5c690a3cf8f294d5e79de Mon Sep 17 00:00:00 2001 From: Emil Thies Date: Sat, 5 Oct 2024 15:21:11 +0200 Subject: [PATCH] Dependency updates >>> 1.3.0 (#82) * 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 --- pom.xml | 22 ++++++++--------- .../PhoneNumberUtil/IsValidNumberTest.groovy | 24 +++++++++---------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pom.xml b/pom.xml index 6326bf3..a90911d 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ normalizer Phonenumber Normalizer Library to work with phonenumbers, especially to fix googles PhoneLib ignoring German Landline specifics. - 1.2.10-SNAPSHOT + 1.3.0 jar https://github.com/telekom/phonenumber-normalizer @@ -101,37 +101,37 @@ 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.18.0 com.fasterxml.jackson.core jackson-databind - 2.15.2 + 2.18.0 org.slf4j slf4j-api - 2.0.7 + 2.0.16 javax.annotation @@ -156,7 +156,7 @@ org.codehaus.groovy groovy-all - 3.0.17 + 3.0.22 test pom @@ -175,14 +175,14 @@ org.spockframework spock-core - 2.3-groovy-3.0 + 2.4-M4-groovy-3.0 test org.testng testng - 7.8.0 + 7.10.2 test diff --git a/src/test/groovy/de/telekom/phonenumbernormalizer/extern/libphonenumber/PhoneNumberUtil/IsValidNumberTest.groovy b/src/test/groovy/de/telekom/phonenumbernormalizer/extern/libphonenumber/PhoneNumberUtil/IsValidNumberTest.groovy index 06ef306..96011d2 100644 --- a/src/test/groovy/de/telekom/phonenumbernormalizer/extern/libphonenumber/PhoneNumberUtil/IsValidNumberTest.groovy +++ b/src/test/groovy/de/telekom/phonenumbernormalizer/extern/libphonenumber/PhoneNumberUtil/IsValidNumberTest.groovy @@ -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) @@ -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) { @@ -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) @@ -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) @@ -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) { @@ -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) @@ -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) {