From 006b9db202e20ff1470625adb2438cc320d47642 Mon Sep 17 00:00:00 2001
From: Emil Thies
Date: Mon, 29 Jan 2024 17:07:11 +0100
Subject: [PATCH 1/5] Upgrading used Java Version from 11 to 17 Updating
Dependencies to newer versions - keeping groovy for testing on version 3
Colloquial wording "PhoneLib" is replaced by Google's library name
LibPhoneNumber
---
README.md | 36 ++++++-------
REPORTED_ISSUES.md | 4 +-
UPDATE_FOR_NEW_PHONELIB.md | 29 ++++-------
pom.xml | 50 ++++++++++---------
.../PhoneNumberAreaLabelImpl.java | 2 +-
.../PhoneNumberNormalizer.java | 4 +-
.../PhoneNumberNormalizerImpl.java | 6 +--
.../numberplans/NumberPlan.java | 2 +-
.../numberplans/PhoneLibWrapper.java | 42 ++++++++--------
.../PhoneNumberOfflineGeocoderTest.groovy | 36 ++++++-------
.../libphonenumber/PhoneNumberUtilTest.groovy | 12 ++---
.../numberplans/PhoneLibWrapperTest.groovy | 6 +--
12 files changed, 112 insertions(+), 117 deletions(-)
diff --git a/README.md b/README.md
index 4bcf39f..63f516d 100644
--- a/README.md
+++ b/README.md
@@ -5,13 +5,13 @@
With the phonenumber-normalizer library, you can normalize phone numbers to the E164 format and national format, taking into account the specific complexities of the German number plan. The library can also differentiate between short numbers and those with NDCs and NACs, and can be useful for handling phone numbers in fixed-line contexts.
-While Google's [PhoneLib](https://github.com/google/libphonenumber) is a general-purpose library for handling phone numbers worldwide, phonenumber-normalizer a wrapper around it, which is specifically tailored to handle the complexities of the German number plan. Especially, phonenumber-normalizer can differentiate between short numbers and those with NDCs and NACs. When PhoneLib is not able to make this distinction, our wrapping corrects the result.
+While Google's [LibPhoneNumber](https://github.com/google/libphonenumber) is a general-purpose library for handling phone numbers worldwide, phonenumber-normalizer a wrapper around it, which is specifically tailored to handle the complexities of the German number plan. Especially, phonenumber-normalizer can differentiate between short numbers and those with NDCs and NACs. When LibPhoneNumber is not able to make this distinction, our wrapping corrects the result.
![Phone Number Normalizer](https://user-images.githubusercontent.com/3244965/235174029-e58fab4c-37e9-49ba-834e-067b50082abb.png)
## Problem Statement(s)
-If you have to deal with the complexity of telephone numbers your natural choice of handling it, should be the great [PhoneLib](https://github.com/google/libphonenumber) of [Google](https://opensource.google).
+If you have to deal with the complexity of telephone numbers your natural choice of handling it, should be the great [LibPhoneNumber](https://github.com/google/libphonenumber) of [Google](https://opensource.google).
That's what we did for some projects.
And when we found bugs, we [returned that as feedback](./REPORTED_ISSUES.md) in good open-source tradition.
@@ -41,7 +41,7 @@ c) a SN with NDC and NAC
d) a SN with NDC and CC (but without NAC in Germany but with in Italy)
We need that differentiation upfront normalization to E164 (which is d).
-Currently, PhoneLib does not identify this situation and adds the CC infront a number b-style, which represents a complete different phone line.
+Currently, LibPhoneNumber does not identify this situation and adds the CC infront a number b-style, which represents a complete different phone line.
### Example of failing normalization
@@ -62,10 +62,10 @@ Additionally, we want to normalize a number with a default NDC, because we might
### Root Cause
We think the problem arises from the following situation:
-- PhoneLib is storing the National Significant Number (NSN) as the number, which is the combination of NDC + SN.
-- PhoneLib is storing the number as uint64 which does not allow to store (a) leading Zero(s)
-- PhoneLib is storing leading Zeros in hasNumberOfLeadingZeros and getNumberOfLeadingZeros
-- PhoneLib checks "IS_POSSIBLE_LOCAL_ONLY" only by comparing the length of a number, which might work in a fix length number plan like the North American Number plan, but not with variable number length and optional NDC as in Germany.
+- LibPhoneNumber is storing the National Significant Number (NSN) as the number, which is the combination of NDC + SN.
+- LibPhoneNumber is storing the number as uint64 which does not allow to store (a) leading Zero(s)
+- LibPhoneNumber is storing leading Zeros in hasNumberOfLeadingZeros and getNumberOfLeadingZeros
+- LibPhoneNumber checks "IS_POSSIBLE_LOCAL_ONLY" only by comparing the length of a number, which might work in a fix length number plan like the North American Number plan, but not with variable number length and optional NDC as in Germany.
What needs to be done:
- Checking if the Country is supporting optional NDC
@@ -75,13 +75,13 @@ What needs to be done:
- if that all applies, such an input needs to be treated as a short number and not be changed for E164 or National format (see short number [normalization of 116116](https://libphonenumber.appspot.com/phonenumberparser?number=116116&country=DE))
The problem has been addressed but rejected like with [issue tracker 180311606](https://issuetracker.google.com/issues/180311606).
-Reasons are either PhoneLib just make best efforts for formatting and not format checking or that they focus on mobile context while most problems happens in fixed-line context.
+Reasons are either LibPhoneNumber just make best efforts for formatting and not format checking or that they focus on mobile context while most problems happens in fixed-line context.
## State of Our Implementation
### Code
-As a wrapper we did not change any code of PhoneLib itself, so an [upgrade to the newest version should be possible by just updating the version in the dependency POM definition](UPDATE_FOR_NEW_PHONELIB.md).
+As a wrapper we did not change any code of LibPhoneNumber itself, so an [upgrade to the newest version should be possible by just updating the version in the dependency POM definition](UPDATE_FOR_NEW_PHONELIB.md).
You could either take the sourcecode directly from the repository or use Maven dependency management by adding:
```
@@ -117,37 +117,37 @@ Now we get a E164 formatted number, because now we know, how which NDC has to be
### Use Of Reflection
-To check if a number plan of a country is using an optional NDC and NAC, we need to get the countries region metadata from PhoneLib.
+To check if a number plan of a country is using an optional NDC and NAC, we need to get the countries region metadata from LibPhoneNumber.
With getMetadataForRegion there is a method on the PhoneNumberUtil class, but it is not public.
So we are forced to [use reflection and override its accessibility](https://github.com/telekom/phonenumber-normalizer/blob/main/src/main/java/de/telekom/phonenumbernormalizer/numberplans/PhoneLibWrapper.java#L280).
If you are using AOT (ahead of time) compiler, you need to take care of this.
-(While it is used indirectly with the normal PhoneLib use of the wrapper, it might not be safe for all AOT compilers).
+(While it is used indirectly with the normal LibPhoneNumber use of the wrapper, it might not be safe for all AOT compilers).
### Use of Own ShortNumber Recognition
-When we started with the wrapper, PhoneLib did not recognize some phone assistant services as short numbers.
+When we started with the wrapper, LibPhoneNumber did not recognize some phone assistant services as short numbers.
This as been fixed by [issue tracker 182490059](https://issuetracker.google.com/u/1/issues/182490059).
-But for the EU Social Service Number Range 116xxx, PhoneLib is only checking the assigned number 116116 in Germany.
+But for the EU Social Service Number Range 116xxx, LibPhoneNumber is only checking the assigned number 116116 in Germany.
This is in contradiction to normal validation, where the range is checked and assignment checks are explicitly not in scope.
But for the [issue 183669955](https://issuetracker.google.com/u/1/issues/183669955), they insist on assignment, since they need it for free call checks.
-But for other EU states PhoneLib is using the full raneg (e.g. [CZ](https://github.com/google/libphonenumber/blob/4c532d93587d2f9d16dc7a536df55bf179158210/resources/ShortNumberMetadata.xml#L3342))
+But for other EU states LibPhoneNumber is using the full raneg (e.g. [CZ](https://github.com/google/libphonenumber/blob/4c532d93587d2f9d16dc7a536df55bf179158210/resources/ShortNumberMetadata.xml#L3342))
### One More Thing: Area Gecode Label
There is a table of names for the area code from the BNetzA, which is using non-common abbreviations, which wouldn't be understood by end users.
-But PhoneLib is using those and refusing the long transcription, because they only trust the BNetzA document (see [issue tracker 183383466](https://issuetracker.google.com/issues/183383466)).
+But LibPhoneNumber is using those and refusing the long transcription, because they only trust the BNetzA document (see [issue tracker 183383466](https://issuetracker.google.com/issues/183383466)).
In addition, the BNetzA has published a [document on the ITU](https://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000510006PDFE.pdf) and [its own website](https://www.bundesnetzagentur.de/SharedDocs/Downloads/DE/Sachgebiete/Telekommunikation/Unternehmen_Institutionen/Nummerierung/Rufnummern/ONRufnr/Vorwahlverzeichnis_ONB.zip.zip?__blob=publicationFile&v=298), which differ for some values, too.
We provide resolution for each country but also for cities in Germany and states in the US.
Our engine is using easy to generate [JSON data](./src/main/resources/arealabels/nationallabels/), so you could also provide your own resolution.
-We only rely on the number analysis / formation logic of PhoneLib.
+We only rely on the number analysis / formation logic of LibPhoneNumber.
Their GeoCoder is not used for your labeling.
-We only use the PhoneLib's GeoCoder in some testcases, to check if ours and their labeling against each other.
+We only use the LibPhoneNumber's GeoCoder in some testcases, to check if ours and their labeling against each other.
```
String normalizedNumber = "+493020355555";
@@ -163,7 +163,7 @@ This project has adopted the [Contributor Covenant](https://www.contributor-cove
By participating in this project, you agree to abide by its [Code of Conduct](./CODE_OF_CONDUCT.md) at all times.
-A simple regular task is to adapt the project to use a new versions of Google's [PhoneLib](https://github.com/google/libphonenumber). We also have a [guide](UPDATE_FOR_NEW_PHONELIB.md) for this.
+A simple regular task is to adapt the project to use a new versions of Google's [LibPhoneNumber](https://github.com/google/libphonenumber). We also have a [guide](UPDATE_FOR_NEW_PHONELIB.md) for this.
## Licensing
diff --git a/REPORTED_ISSUES.md b/REPORTED_ISSUES.md
index 7d81191..ae9bd10 100644
--- a/REPORTED_ISSUES.md
+++ b/REPORTED_ISSUES.md
@@ -15,7 +15,7 @@ This issue has been resolved.
### 2021-03-25 - [Germany (DE, +49): 116xxx Short Number valid vs. assigned](https://issuetracker.google.com/issues/183669955)
-This issue pertains to the EU-wide special social number short code definition. Although the regulation clearly defines a range, PhoneLib is not validating against that range, but against a list of currently assigned/operated numbers. At least for the German number space, as mentioned in the initial issue discussion (see first one above), the library is only partly or even completely checking the whole range in other EU number spaces.
+This issue pertains to the EU-wide special social number short code definition. Although the regulation clearly defines a range, LibPhoneNumber is not validating against that range, but against a list of currently assigned/operated numbers. At least for the German number space, as mentioned in the initial issue discussion (see first one above), the library is only partly or even completely checking the whole range in other EU number spaces.
On the one hand, the [FAQ](https://github.com/google/libphonenumber/blob/master/FAQ.md#what_is_valid)(https://github.com/google/libphonenumber/blob/master/FAQ.md) states that “valid” does not mean “numbers are currently assigned to a specific user and reachable.”
On the other hand, it states that “a valid number range is one from which numbers can be freely assigned by carriers to users,” which is not the case for EU-wide numbers that require special clearance.
@@ -25,7 +25,7 @@ While it seems that the last point is the argument for rejecting the issue (whic
## Internal Implementation
After a long discussion and closing the issues as stated above, we decided to implement a minimal fix for normalizing German Phonenumbers for our internal use, to support the phoning capability of Deutsche Telekom Smart Speaker.
-We also set up [test cases to verify if PhoneLib behavior changes to correctly normalize the currently failing cases](https://github.com/telekom/phonenumber-normalizer/blob/main/src/test/groovy/de/telekom/phonenumbernormalizer/extern/libphonenumber/PhoneNumberUtilTest.groovy), so that our implementation would become unnecessary.
+We also set up [test cases to verify if LibPhoneNumber behavior changes to correctly normalize the currently failing cases](https://github.com/telekom/phonenumber-normalizer/blob/main/src/test/groovy/de/telekom/phonenumbernormalizer/extern/libphonenumber/PhoneNumberUtilTest.groovy), so that our implementation would become unnecessary.
We also discovered, during its development, that the geolocation method uses BenetzA given labels, which include abbreviations.
[For a smart speaker, we needed a “speakable” label - so we created the following issue and added our own list to our interim solution](https://github.com/telekom/phonenumber-normalizer/blob/main/src/main/resources/arealabels/nationallabels/de.json).
diff --git a/UPDATE_FOR_NEW_PHONELIB.md b/UPDATE_FOR_NEW_PHONELIB.md
index 5cdb306..9275489 100644
--- a/UPDATE_FOR_NEW_PHONELIB.md
+++ b/UPDATE_FOR_NEW_PHONELIB.md
@@ -1,31 +1,22 @@
-# How to adapt to a new Version of PhoneLib
+# How to adapt to a new Version of Google's LibPhoneNumber
-If Google updates its [PhoneLib](https://github.com/google/libphonenumber), this project should be updated to use that new version. This file is a step by step instruction how to do this:
+If Google updates its [LibPhoneNumber](https://github.com/google/libphonenumber), this project should be updated to use that new version. This file is a step by step instruction how to do this:
1. Create a new local branch - best name it ```phonelib/X_YY_ZZ``` so it is easily seen that this branch is just an update for the version X.YY.ZZ, without any new features.
-2. Update [pom.xml](pom.xml) to use the new phonelib version:
+2. Update [pom.xml](pom.xml) to use the new LibPhoneNumber version in the properties section:
```
-
- com.googlecode.libphonenumber
- libphonenumber
- X.YY.ZZ
-
+ X.YY.ZZ
```
3. Check on Maven Central ```https://central.sonatype.com/artifact/com.googlecode.libphonenumber/libphonenumber/X.YY.ZZ/dependents``` the version number for ```geocoder``` (referred as A.BBB).
-4. Update [pom.xml](pom.xml) to use the new geocoder version in testing:
+4. Update [pom.xml](pom.xml) to use the new geocoder version in testing in the properties section:
```
-
- com.googlecode.libphonenumber
- geocoder
- A.BBB
- test
-
+ A.BBB
```
-5. Run all unit test and check log messages if Phonelib still is not correctly:
+5. Run all unit test and check log messages if LibPhoneNumber still is not correctly:
a) normalizing specific number -> this project is still necessary
b) labeling specific numbers -> own area labels for DE still necessary
if there are corrections or additional mismatches listed - name those in the commit message and update tests.
@@ -34,7 +25,7 @@ If Google updates its [PhoneLib](https://github.com/google/libphonenumber), this
7. Commit & Push the Snapshot with a message like:
```
- Use PhoneLib X.YY.ZZ and prepare release
+ Use LibPhoneNumber X.YY.ZZ and prepare release
```
8. Go to Github and create a pull request for the branch.
@@ -43,7 +34,7 @@ If Google updates its [PhoneLib](https://github.com/google/libphonenumber), this
10. After merge has finished, draft a new Release. Use as tag the ```v```+ the version number of the pom, where you removed ```-SNAPSHOT```. As Release title use ```PhoneLib X.YY.ZZ``` and add a message like:
```
- Use the latest PhoneLib version from four days ago.
+ Use the latest LibPhoneNumber version from four days ago.
```
Keep the flag "Set as the latest release" and press Publish release.
@@ -62,4 +53,4 @@ If Google updates its [PhoneLib](https://github.com/google/libphonenumber), this
16. Delete the branch ```phonelib/X_YY_ZZ```.
-Congratulation! You have updated the project to the [current PhoneLib version](https://central.sonatype.com/artifact/com.googlecode.libphonenumber/libphonenumber).
+Congratulation! You have updated the project to the [current LibPhoneNumber version](https://central.sonatype.com/artifact/com.googlecode.libphonenumber/libphonenumber).
diff --git a/pom.xml b/pom.xml
index 1bfc4a2..2cae923 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,8 +21,8 @@
de.telekom.phonenumbernormalizer
- Phonenumber Normalizer
- Library to work with phonenumbers, especially to fix googles PhoneLib ignoring German Landline specifics.
+ Phone Number Normalizer
+ Library to wrap around Google's LibPhoneNumber library, to fix the ignoring of German Landline specifics when normalizing phone numbers.1.2.0-SNAPSHOTjarhttps://github.com/telekom/phonenumber-normalizer
@@ -67,8 +67,17 @@
${project.basedir}/..UTF-8UTF-8
+
+ 8.13.29
+ 2.223
+
+ 171.3.0.Final1.18.28
+ 2.22.2
+ 2.16.1
+ 1.11.0
+ 6.1.3${project.basedir}jacoco
@@ -77,7 +86,6 @@
${project.basedir}/../${aggregate.report.dir}
- 2.22.2
@@ -86,7 +94,7 @@
com.googlecode.libphonenumberlibphonenumber
- 8.13.29
+ ${libphonenumber.version}
@@ -95,54 +103,51 @@
provided${lombok.version}
-
org.springframeworkspring-context
- 5.3.31
+ ${org.springframework.version}org.apache.commonscommons-lang3
- 3.12.0
+ 3.14.0io.swaggerswagger-annotations
- 1.6.11
+ 1.6.13com.fasterxml.jackson.corejackson-core
- 2.15.2
+ ${com.fasterxml.jackson.core.version}com.fasterxml.jackson.corejackson-annotations
- 2.15.2
+ ${com.fasterxml.jackson.core.version}com.fasterxml.jackson.corejackson-databind
- 2.15.2
+ ${com.fasterxml.jackson.core.version}org.slf4jslf4j-api
- 2.0.7
+ 2.0.11
- javax.annotation
- javax.annotation-api
- 1.3.2
+ jakarta.annotation
+ jakarta.annotation-api
+ 3.0.0-M1com.googlecode.libphonenumbergeocoder
- 2.223
+ ${geocoder.version}test
@@ -167,7 +172,7 @@
org.spockframeworkspock-core
- 2.3-groovy-3.0
+ 2.4-M1-groovy-3.0test
@@ -236,7 +241,7 @@
org.codehaus.gmavenplusgmavenplus-plugin
- 1.11.0
+ ${org.codehaus.gmavenplus.version}
@@ -346,8 +351,7 @@
maven-compiler-plugin3.8.0
- 11
-
+ ${java.version}
@@ -397,7 +401,7 @@
org.codehaus.gmavenplusgmavenplus-plugin
- 1.11.0
+ ${org.codehaus.gmavenplus.version}
diff --git a/src/main/java/de/telekom/phonenumbernormalizer/PhoneNumberAreaLabelImpl.java b/src/main/java/de/telekom/phonenumbernormalizer/PhoneNumberAreaLabelImpl.java
index 520d5ce..1590399 100644
--- a/src/main/java/de/telekom/phonenumbernormalizer/PhoneNumberAreaLabelImpl.java
+++ b/src/main/java/de/telekom/phonenumbernormalizer/PhoneNumberAreaLabelImpl.java
@@ -32,7 +32,7 @@
import org.springframework.stereotype.Component;
-import javax.annotation.PostConstruct;
+import jakarta.annotation.PostConstruct;
import java.io.IOException;
import java.util.*;
import java.util.regex.Pattern;
diff --git a/src/main/java/de/telekom/phonenumbernormalizer/PhoneNumberNormalizer.java b/src/main/java/de/telekom/phonenumbernormalizer/PhoneNumberNormalizer.java
index 290ea3b..7926eda 100644
--- a/src/main/java/de/telekom/phonenumbernormalizer/PhoneNumberNormalizer.java
+++ b/src/main/java/de/telekom/phonenumbernormalizer/PhoneNumberNormalizer.java
@@ -34,7 +34,7 @@ public interface PhoneNumberNormalizer {
void setFallbackRegionCode(String fallBackRegionCode);
/**
- * Normalizes the number using PhoneLib with some additions to compensate.
+ * Normalizes the number using LibPhoneNumber with some additions to compensate.
*
* Preferable to {@link PhoneNumberNormalizer#normalizePhoneNumber(String, String)}, because default NDC can be provided, so that more compensation for generating a valid E164 can be done.
*
@@ -47,7 +47,7 @@ public interface PhoneNumberNormalizer {
String normalizePhoneNumber(String number, DeviceContext deviceContext);
/**
- * Normalizes the number using PhoneLib with some additions to compensate.
+ * Normalizes the number using LibPhoneNumber with some additions to compensate.
*
* Not as powerful as {@link PhoneNumberNormalizer#normalizePhoneNumber(String, DeviceContext)}, because no default NDC can be set.
*
diff --git a/src/main/java/de/telekom/phonenumbernormalizer/PhoneNumberNormalizerImpl.java b/src/main/java/de/telekom/phonenumbernormalizer/PhoneNumberNormalizerImpl.java
index 3748e14..a068d82 100644
--- a/src/main/java/de/telekom/phonenumbernormalizer/PhoneNumberNormalizerImpl.java
+++ b/src/main/java/de/telekom/phonenumbernormalizer/PhoneNumberNormalizerImpl.java
@@ -71,14 +71,14 @@ private String fallbackNormalizationFromDeviceContextToDefaultRegionCode(String
}
/**
- * Uses wrapper of PhoneLib to identify if special rules apply for normalization.
+ * Uses wrapper of LibPhoneNumber to identify if special rules apply for normalization.
* Using device context for enriching the number make it normalizable to E164 format if NDC is optional in the used number plan, but not used in the phone number to be normalized.
- * @param wrapper instanced wrapper of PhoneLib
+ * @param wrapper instanced wrapper of LibPhoneNumber
* @param deviceContext information like CC, NDC and {@link de.telekom.phonenumbernormalizer.dto.DeviceContextLineType} from which the number is dialled
* @return E164 formatted phone number or dialable version of it or null
*/
private String normalize(PhoneLibWrapper wrapper, DeviceContext deviceContext) {
- // international prefix has been added by PhoneLib even if it's not valid in the number plan.
+ // international prefix has been added by LibPhoneNumber even if it's not valid in the number plan.
if (wrapper == null) {
LOGGER.debug("PhoneLipWrapper was not initialized");
return null;
diff --git a/src/main/java/de/telekom/phonenumbernormalizer/numberplans/NumberPlan.java b/src/main/java/de/telekom/phonenumbernormalizer/numberplans/NumberPlan.java
index 1b45737..70db6b9 100644
--- a/src/main/java/de/telekom/phonenumbernormalizer/numberplans/NumberPlan.java
+++ b/src/main/java/de/telekom/phonenumbernormalizer/numberplans/NumberPlan.java
@@ -29,7 +29,7 @@
* This class provides basic logic to check a given number against a simple set of rules to identify if it is short numbers, which does not need normalization.
* It also needs to provide its country calling code, to specify where the rules apply.
*
- * PhoneLib already provide a ShortNumbers, but for EU wide 116xxx range only a few countries are configured to support the range.
+ * LibPhoneNumber already provide a ShortNumbers, but for EU wide 116xxx range only a few countries are configured to support the range.
* For Germany only currently assigned numbers are configured which is in contrast to Googles definition of checks,
* but nevertheless the corresponding Issues has been rejected.
*
diff --git a/src/main/java/de/telekom/phonenumbernormalizer/numberplans/PhoneLibWrapper.java b/src/main/java/de/telekom/phonenumbernormalizer/numberplans/PhoneLibWrapper.java
index cb80983..121a8cc 100644
--- a/src/main/java/de/telekom/phonenumbernormalizer/numberplans/PhoneLibWrapper.java
+++ b/src/main/java/de/telekom/phonenumbernormalizer/numberplans/PhoneLibWrapper.java
@@ -26,11 +26,11 @@
import java.util.Objects;
/**
- * Wrapper around the PhoneLib library from Google
+ * Wrapper around the LibPhoneNumber library from Google
*
* Using reflection to access internal information to know if a region has a nation prefix & which one it is.
*
- * Providing own NumberPlans logic as an alternative to PhoneLib ShortNumber.
+ * Providing own NumberPlans logic as an alternative to LibPhoneNumber ShortNumber.
*
* @see NumberPlan
*/
@@ -48,7 +48,7 @@ public class PhoneLibWrapper {
String dialableNumber;
/**
- * The given number normalized with PhoneLib, risking we get a incorrect normalization
+ * The given number normalized with LibPhoneNumber, risking we get an incorrect normalization
*
* @see PhoneLibWrapper#PhoneLibWrapper(String, String)
* @see PhoneLibWrapper#isNormalizingTried()
@@ -65,24 +65,24 @@ public class PhoneLibWrapper {
String regionCode;
/**
- * The number plan metadata which PhoneLib is using for the given region code.
+ * The number plan metadata which LibPhoneNumber is using for the given region code.
*
* @see PhoneLibWrapper#PhoneLibWrapper(String, String)
*/
Phonemetadata.PhoneMetadata metadata;
/**
- * An instance of the PhoneLib short number utility.
+ * An instance of the LibPhoneNumber short number utility.
*/
private static final ShortNumberInfo shortNumberUtil = ShortNumberInfo.getInstance();
/**
- * An instance of the PhoneLib number utility.
+ * An instance of the LibPhoneNumber number utility.
*/
private static final PhoneNumberUtil phoneUtil = PhoneNumberUtil.getInstance();
/**
- * Storing if PhoneLib has been used to parse the given number into semiNormalizedNumber.
+ * Storing if LibPhoneNumber has been used to parse the given number into semiNormalizedNumber.
*
* @see PhoneLibWrapper#PhoneLibWrapper(String, String)
* @see PhoneLibWrapper#semiNormalizedNumber
@@ -116,7 +116,7 @@ public PhoneLibWrapper(String number, String regionCode) {
}
/**
- * If PhoneLib has been used to parse the given number into semiNormalizedNumber.
+ * If LibPhoneNumber has been used to parse the given number into semiNormalizedNumber.
*
* @return {@link PhoneLibWrapper#isNormalizingTried}
*
@@ -127,11 +127,11 @@ public boolean isNormalizingTried() {
}
/**
- * Using PhoneLib short number utility if it identifies the given number as a short number, which would not need a NAC.
+ * Using LibPhoneNumber short number utility if it identifies the given number as a short number, which would not need a NAC.
*
* This is a fallback for {@link PhoneLibWrapper#isShortNumber(NumberPlan)}, when we do not have an own number plan information.
*
- * @return if PhoneLib identifies given number as a short number
+ * @return if LibPhoneNumber identifies given number as a short number
*
* @see PhoneLibWrapper#PhoneLibWrapper(String, String)
* @see PhoneLibWrapper#isShortNumber(NumberPlan)
@@ -146,7 +146,7 @@ public boolean isShortNumber() {
* If no number plan is given, {@link PhoneLibWrapper#isShortNumber} is used as fallback.
*
* @param numberplan the number plan we identified to be used for a check
- * @return if number plan or as fallback PhoneLib identifies given number as a short number
+ * @return if number plan or as fallback LibPhoneNumber identifies given number as a short number
*
* @see PhoneLibWrapper#PhoneLibWrapper(String, String)
*/
@@ -174,7 +174,7 @@ public boolean hasNoCountryCodeNorNationalAccessCode() {
}
/**
- * Using PhoneLib to get a E164 formatted representation of the given number
+ * Using LibPhoneNumber to get a E164 formatted representation of the given number
*
* This is a straight invocation, so no compensation of some inaccuracy is done here.
*
@@ -232,7 +232,7 @@ static boolean isSpecialFormat(String value) {
}
/**
- * Use PhoneLib to parse a number for a regions code. If any exception occurs, they are logged and null is returned.
+ * Use LibPhoneNumber to parse a number for a regions code. If any exception occurs, they are logged and null is returned.
* @param number the phone number to be parsed
* @param regionCode ISO2 code for the regions number plan used for parsing the number
* @return either the parsed {@link Phonenumber.PhoneNumber} or null
@@ -249,7 +249,7 @@ private static Phonenumber.PhoneNumber parseNumber(String number, String regionC
}
/**
- * The National Access Code used before the National Destination Code in the given region from PhoneLib
+ * The National Access Code used before the National Destination Code in the given region from LibPhoneNumber
* @return NAC of given {@link PhoneLibWrapper#regionCode}
*/
public String getNationalAccessCode() {
@@ -260,7 +260,7 @@ public String getNationalAccessCode() {
}
/**
- * From PhoneLib, if a National Access Code is used before the National Destination Code in the given region
+ * From LibPhoneNumber, if a National Access Code is used before the National Destination Code in the given region
* @return if given {@link PhoneLibWrapper#regionCode} is using NAC
*/
public boolean hasRegionNationalAccessCode() {
@@ -287,7 +287,7 @@ private Phonemetadata.PhoneMetadata getMetadataForRegion() {
}
/**
- * Using PhoneLib to get the national number from the given number
+ * Using LibPhoneNumber to get the national number from the given number
*
* @return national number without NAC, but any other leading zero.
*
@@ -300,10 +300,10 @@ private String getNationalPhoneNumberWithoutNationalAccessCode() {
}
/**
- * Using PhoneLib to get the national number from a parsed phone number with leading zeros, if those are not representing a National Access Code.
+ * Using LibPhoneNumber to get the national number from a parsed phone number with leading zeros, if those are not representing a National Access Code.
*
- * This is necessary, because PhoneLib is storing the national number as a long, so leading "0" Digits as part of it are stored in other attributes.
- * @param phoneNumber A PhoneLib parsed phone number
+ * This is necessary, because LibPhoneNumber is storing the national number as a long, so leading "0" Digits as part of it are stored in other attributes.
+ * @param phoneNumber A LibPhoneNumber parsed phone number
* @return national number part without NationalPrefix (aka NAC) but any other leading zero.
*/
private static String nationalPhoneNumberWithoutNationalPrefix(Phonenumber.PhoneNumber phoneNumber) {
@@ -320,7 +320,7 @@ private static String nationalPhoneNumberWithoutNationalPrefix(Phonenumber.Phone
}
/**
- * Using PhoneLib to get the Country Calling Code for a region code
+ * Using LibPhoneNumber to get the Country Calling Code for a region code
*
* e.g. "DE" is "49"
*
@@ -332,7 +332,7 @@ public static int getCountryCodeForRegion(String regionCode) {
}
/**
- * Using PhoneLib to get the region code for a Country Calling Code
+ * Using LibPhoneNumber to get the region code for a Country Calling Code
*
* e.g. "49" is "DE"
*
diff --git a/src/test/groovy/de/telekom/phonenumbernormalizer/extern/libphonenumber/PhoneNumberOfflineGeocoderTest.groovy b/src/test/groovy/de/telekom/phonenumbernormalizer/extern/libphonenumber/PhoneNumberOfflineGeocoderTest.groovy
index 20b8f25..6155a51 100644
--- a/src/test/groovy/de/telekom/phonenumbernormalizer/extern/libphonenumber/PhoneNumberOfflineGeocoderTest.groovy
+++ b/src/test/groovy/de/telekom/phonenumbernormalizer/extern/libphonenumber/PhoneNumberOfflineGeocoderTest.groovy
@@ -48,13 +48,13 @@ class PhoneNumberOfflineGeocoderTest extends Specification {
then: "is number expected: $expectedResult"
if ((result != expectedResult) && (result2 != expectedResult)){
if (expectingFail) {
- logger.info("PhoneLib is still not correctly labeling $areacode to $expectedResult by giving $result")
+ logger.info("LibPhoneNumber is still not correctly labeling $areacode to $expectedResult by giving $result")
} else {
- logger.warning("PhoneLib is suddenly not correctly labeling $areacode to $expectedResult by giving $result")
+ logger.warning("LibPhoneNumber is suddenly not correctly labeling $areacode to $expectedResult by giving $result")
}
} else {
if (expectingFail) {
- logger.info("!!! PhoneLib is now correctly labeling $areacode to $expectedResult !!!")
+ logger.info("!!! LibPhoneNumber is now correctly labeling $areacode to $expectedResult !!!")
}
}
@@ -1586,7 +1586,7 @@ class PhoneNumberOfflineGeocoderTest extends Specification {
"38326" | "Grimmen" | false
"38327" | "Elmenhorst Vorpommern" | true // see https://issuetracker.google.com/issues/183383466
"38328" | "Miltzow" | false
- "38331" | "Rakow Vorpommern" | true // Both ITU and BNetzA "Rakow Vorpom", which is short form of "Vorpommern", it is included in PhoneLibe data, but Geocoder does not delivers it.
+ "38331" | "Rakow Vorpommern" | true // Both ITU and BNetzA "Rakow Vorpom", which is short form of "Vorpommern", it is included in LibPhoneNumber data, but Geocoder does not delivers it.
"38332" | "Gross Bisdorf" | false
"38333" | "Horst bei Grimmen" | false
"38334" | "Grammendorf" | false
@@ -1612,7 +1612,7 @@ class PhoneNumberOfflineGeocoderTest extends Specification {
"38391" | "Altenkirchen Rügen" | false
"38392" | "Sassnitz" | false
"38393" | "Binz Ostseebad" | false
- "3841" | "Wismar Mecklenburg" | true // TODO: ITU "Wismar" only, but BNetzA "Wismar Meckl", which is short form of "Mecklenburg", it is not included in PhoneLibe data.
+ "3841" | "Wismar Mecklenburg" | true // TODO: ITU "Wismar" only, but BNetzA "Wismar Meckl", which is short form of "Mecklenburg", it is not included in LibPhoneNumber data.
"38422" | "Neukloster" | false
"38423" | "Bad Kleinen" | false
"38424" | "Bobitz" | false
@@ -1634,7 +1634,7 @@ class PhoneNumberOfflineGeocoderTest extends Specification {
"38458" | "Zehna" | false
"38459" | "Laage" | false
"38461" | "Bützow" | false
- "38462" | "Baumgarten Mecklenburg" | true // TODO: ITU "Baumgarten" only, but BNetzA "Baumgarten Meckl", which is short form of "Mecklenburg", it is not included in PhoneLibe data.
+ "38462" | "Baumgarten Mecklenburg" | true // TODO: ITU "Baumgarten" only, but BNetzA "Baumgarten Meckl", which is short form of "Mecklenburg", it is not included in LibPhoneNumber data.
"38464" | "Bernitt" | false
"38466" | "Jürgenshagen" | false
"3847" | "Sternberg" | false
@@ -1645,7 +1645,7 @@ class PhoneNumberOfflineGeocoderTest extends Specification {
"38485" | "Dabel" | false
"38486" | "Gustävel" | false
"38488" | "Demen" | false
- "385" | "Schwerin Mecklenburg" | true // TODO: ITU "Schwerin" only, but BNetzA "Schwerin Meckl", which is short form of "Mecklenburg", it is not included in PhoneLibe data.
+ "385" | "Schwerin Mecklenburg" | true // TODO: ITU "Schwerin" only, but BNetzA "Schwerin Meckl", which is short form of "Mecklenburg", it is not included in LibPhoneNumber data.
"3860" | "Raben Steinfeld" | false
"3861" | "Plate" | false
"3863" | "Crivitz" | false
@@ -1669,17 +1669,17 @@ class PhoneNumberOfflineGeocoderTest extends Specification {
"38732" | "Gallin bei Lübz" | false
"38733" | "Karbow Vietlübbe" | false
"38735" | "Plau am See" | false
- "38736" | "Goldberg Mecklenburg" | true // TODO: ITU "Goldberg" only, but BNetzA "Goldberg Meckl", which is short form of "Mecklenburg", it is not included in PhoneLibe data.
+ "38736" | "Goldberg Mecklenburg" | true // TODO: ITU "Goldberg" only, but BNetzA "Goldberg Meckl", which is short form of "Mecklenburg", it is not included in LibPhoneNumber data.
"38737" | "Ganzlin" | false
"38738" | "Karow bei Lübz" | false
- "3874" | "Ludwigslust Mecklenburg" | true // TODO: ITU "Ludwigslust" only, but BNetzA "Ludwigslust Meckl", which is short form of "Mecklenburg", it is not included in PhoneLibe data.
+ "3874" | "Ludwigslust Mecklenburg" | true // TODO: ITU "Ludwigslust" only, but BNetzA "Ludwigslust Meckl", which is short form of "Mecklenburg", it is not included in LibPhoneNumber data.
"38750" | "Malliss" | false
"38751" | "Picher" | false
"38752" | "Zierzow bei Ludwigslust" | false
"38753" | "Wöbbelin" | false
"38754" | "Leussow bei Ludwigslust" | false
"38755" | "Eldena" | false
- "38756" | "Grabow Mecklenburg" | true // TODO: ITU "Grabow" only, but BNetzA "Grabow Meckl", which is short form of "Mecklenburg", it is not included in PhoneLibe data.
+ "38756" | "Grabow Mecklenburg" | true // TODO: ITU "Grabow" only, but BNetzA "Grabow Meckl", which is short form of "Mecklenburg", it is not included in LibPhoneNumber data.
"38757" | "Neustadt Glewe" | false
"38758" | "Dömitz" | false
"38759" | "Tewswoos" | false
@@ -1701,14 +1701,14 @@ class PhoneNumberOfflineGeocoderTest extends Specification {
"38796" | "Viesecke" | false
"38797" | "Karstädt Kreis Prignitz" | false
"3881" | "Grevesmühlen" | false
- "38821" | "Lüdersdorf Mecklenburg" | true // TODO: ITU "Lüdersdorf" only, but BNetzA "Lüdersdorf Meckl", which is short form of "Mecklenburg", it is not included in PhoneLibe data.
+ "38821" | "Lüdersdorf Mecklenburg" | true // TODO: ITU "Lüdersdorf" only, but BNetzA "Lüdersdorf Meckl", which is short form of "Mecklenburg", it is not included in LibPhoneNumber data.
"38822" | "Diedrichshagen bei Grevesmühlen" | false
"38823" | "Selmsdorf" | false
"38824" | "Mallentin" | false
"38825" | "Klütz" | false
"38826" | "Dassow" | false
"38827" | "Kalkhorst" | false
- "38828" | "Schönberg Mecklenburg" | true // TODO: ITU "Schönberg" only, but BNetzA "Schönberg Meckl", which is short form of "Mecklenburg", it is not included in PhoneLibe data.
+ "38828" | "Schönberg Mecklenburg" | true // TODO: ITU "Schönberg" only, but BNetzA "Schönberg Meckl", which is short form of "Mecklenburg", it is not included in LibPhoneNumber data.
"3883" | "Hagenow" | false
"38841" | "Neuhaus Elbe" | false
"38842" | "Lüttenmark" | false
@@ -1718,7 +1718,7 @@ class PhoneNumberOfflineGeocoderTest extends Specification {
"38847" | "Boizenburg Elbe" | false
"38848" | "Vellahn" | false
"38850" | "Gammelin" | false
- "38851" | "Zarrentin Mecklenburg" | true // TODO: ITU "Zarrentin" only, but BNetzA "Zarrentin Meckl", which is short form of "Mecklenburg", it is not included in PhoneLibe data.
+ "38851" | "Zarrentin Mecklenburg" | true // TODO: ITU "Zarrentin" only, but BNetzA "Zarrentin Meckl", which is short form of "Mecklenburg", it is not included in LibPhoneNumber data.
"38852" | "Wittenburg" | false
"38853" | "Drönnewitz bei Hagenow" | false
"38854" | "Redefin" | false
@@ -1912,7 +1912,7 @@ class PhoneNumberOfflineGeocoderTest extends Specification {
"3949" | "Oschersleben Bode" | false
"395" | "Neubrandenburg" | false
"39600" | "Zwiedorf" | false
- "39601" | "Friedland Mecklenburg" | true // TODO: ITU "Friedland" only, but BNetzA "Friedland Meckl", which is short form of "Mecklenburg", it is not included in PhoneLibe data.
+ "39601" | "Friedland Mecklenburg" | true // TODO: ITU "Friedland" only, but BNetzA "Friedland Meckl", which is short form of "Mecklenburg", it is not included in LibPhoneNumber data.
"39602" | "Kleeth" | false
"39603" | "Burg Stargard" | false
"39604" | "Wildberg bei Altentreptow" | false
@@ -1927,7 +1927,7 @@ class PhoneNumberOfflineGeocoderTest extends Specification {
"3965" | "Burow bei Altentreptow" | false
"3966" | "Cölpin" | false
"3967" | "Oertzenhof bei Strasburg" | false
- "3968" | "Schönbeck Mecklenburg" | true // TODO: ITU "Schönbeck" only, but BNetzA "Schönbeck Meckl", which is short form of "Mecklenburg", it is not included in PhoneLibe data.
+ "3968" | "Schönbeck Mecklenburg" | true // TODO: ITU "Schönbeck" only, but BNetzA "Schönbeck Meckl", which is short form of "Mecklenburg", it is not included in LibPhoneNumber data.
"3969" | "Siedenbollentin" | false
"3971" | "Anklam" | false
"39721" | "Liepen bei Anklam" | false
@@ -1973,8 +1973,8 @@ class PhoneNumberOfflineGeocoderTest extends Specification {
"39827" | "Schwarz bei Neustrelitz" | false
"39828" | "Wustrow Kreis Mecklenburg Strelitz" | false
"39829" | "Blankenförde" | false
- "39831" | "Feldberg Mecklenburg" | true // TODO: ITU "Feldberg" only, but BNetzA "Feldberg Meckl", which is short form of "Mecklenburg", it is not included in PhoneLibe data.
- "39832" | "Wesenberg Mecklenburg" | true // TODO: ITU "Wesenberg" only, but BNetzA "Wesenberg Meckl", which is short form of "Mecklenburg", it is not included in PhoneLibe data.
+ "39831" | "Feldberg Mecklenburg" | true // TODO: ITU "Feldberg" only, but BNetzA "Feldberg Meckl", which is short form of "Mecklenburg", it is not included in LibPhoneNumber data.
+ "39832" | "Wesenberg Mecklenburg" | true // TODO: ITU "Wesenberg" only, but BNetzA "Wesenberg Meckl", which is short form of "Mecklenburg", it is not included in LibPhoneNumber data.
"39833" | "Mirow Kreis Neustrelitz" | false
"3984" | "Prenzlau" | false
"39851" | "Göritz bei Prenzlau" | false
@@ -2018,7 +2018,7 @@ class PhoneNumberOfflineGeocoderTest extends Specification {
"39952" | "Grammentin" | false
"39953" | "Schwinkendorf" | false
"39954" | "Stavenhagen Reuterstadt" | false
- "39955" | "Jürgenstorf Mecklenburg" | true // TODO: ITU "Jürgenstorf" only, but BNetzA "Jürgenstorf Meckl", which is short form of "Mecklenburg", it is not included in PhoneLibe data.
+ "39955" | "Jürgenstorf Mecklenburg" | true // TODO: ITU "Jürgenstorf" only, but BNetzA "Jürgenstorf Meckl", which is short form of "Mecklenburg", it is not included in LibPhoneNumber data.
"39956" | "Neukalen" | false
"39957" | "Gielow" | false
"39959" | "Dargun" | false
diff --git a/src/test/groovy/de/telekom/phonenumbernormalizer/extern/libphonenumber/PhoneNumberUtilTest.groovy b/src/test/groovy/de/telekom/phonenumbernormalizer/extern/libphonenumber/PhoneNumberUtilTest.groovy
index a92ea97..9e08858 100644
--- a/src/test/groovy/de/telekom/phonenumbernormalizer/extern/libphonenumber/PhoneNumberUtilTest.groovy
+++ b/src/test/groovy/de/telekom/phonenumbernormalizer/extern/libphonenumber/PhoneNumberUtilTest.groovy
@@ -45,13 +45,13 @@ class PhoneNumberUtilTest extends Specification {
then: "is number expected: $expectedResult"
if (result != expectedResult) {
if (expectingFail) {
- logger.info("PhoneLib is still not correctly normalizing $number to $expectedResult for region $regionCode, by giving $result")
+ logger.info("LibPhoneNumber is still not correctly normalizing $number to $expectedResult for region $regionCode, by giving $result")
} else {
- logger.warning("PhoneLib is suddenly not correctly normalizing $number to $expectedResult for region $regionCode, by giving $result")
+ logger.warning("LibPhoneNumber is suddenly not correctly normalizing $number to $expectedResult for region $regionCode, by giving $result")
}
} else {
if (expectingFail) {
- logger.info("!!! PhoneLib is now correctly normalizing $number to $expectedResult for region $regionCode !!!")
+ logger.info("!!! LibPhoneNumber is now correctly normalizing $number to $expectedResult for region $regionCode !!!")
}
}
@@ -88,13 +88,13 @@ class PhoneNumberUtilTest extends Specification {
then: "is number expected: $expectedResult"
if (result != expectedResult) {
if (expectingFail) {
- logger.info("PhoneLib is still not correctly validating $number to $expectedResult for region $regionCode, by giving $result")
+ logger.info("LibPhoneNumber is still not correctly validating $number to $expectedResult for region $regionCode, by giving $result")
} else {
- logger.warning("PhoneLib is suddenly not correctly validating $number to $expectedResult for region $regionCode, by giving $result")
+ logger.warning("LibPhoneNumber is suddenly not correctly validating $number to $expectedResult for region $regionCode, by giving $result")
}
} else {
if (expectingFail) {
- logger.info("!!! PhoneLib is now correctly validating $number to $expectedResult for region $regionCode !!!")
+ logger.info("!!! LibPhoneNumber is now correctly validating $number to $expectedResult for region $regionCode !!!")
}
}
diff --git a/src/test/groovy/de/telekom/phonenumbernormalizer/numberplans/PhoneLibWrapperTest.groovy b/src/test/groovy/de/telekom/phonenumbernormalizer/numberplans/PhoneLibWrapperTest.groovy
index cf7221d..490245c 100644
--- a/src/test/groovy/de/telekom/phonenumbernormalizer/numberplans/PhoneLibWrapperTest.groovy
+++ b/src/test/groovy/de/telekom/phonenumbernormalizer/numberplans/PhoneLibWrapperTest.groovy
@@ -65,17 +65,17 @@ class PhoneLibWrapperTest extends Specification {
"00" | "DE" | "TOO_SHORT_AFTER_IDD" // because IDC in Germany is 00
"00" | "US" | "00"
"00" | "IT" | "TOO_SHORT_AFTER_IDD" // because IDC in Italy is 00
- //shorter zero check - just current PhoneLib behavior
+ //shorter zero check - just current LibPhoneNumber behavior
"0" | "AU" | "NOT_A_NUMBER" // because its to short
"0" | "DE" | "NOT_A_NUMBER" // because its to short
"0" | "US" | "NOT_A_NUMBER" // because its to short
"0" | "IT" | "NOT_A_NUMBER" // because its to short
- //shorter 1 check - just current PhoneLib behavior
+ //shorter 1 check - just current LibPhoneNumber behavior
"1" | "AU" | "NOT_A_NUMBER" // because its to short
"1" | "DE" | "NOT_A_NUMBER" // because its to short
"1" | "US" | "NOT_A_NUMBER" // because its to short
"1" | "IT" | "NOT_A_NUMBER" // because its to short
- //shorter zero check - just current PhoneLib behavior
+ //shorter zero check - just current LibPhoneNumber behavior
"01" | "AU" | "01"
"01" | "DE" | "01"
"01" | "US" | "01"
From 7ad55915f28b32bd4ba848b98ec6fd233a682be2 Mon Sep 17 00:00:00 2001
From: Emil Thies
Date: Mon, 29 Jan 2024 17:17:49 +0100
Subject: [PATCH 2/5] fixing maven-compiler-plugin
---
pom.xml | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index 2cae923..dd14f04 100644
--- a/pom.xml
+++ b/pom.xml
@@ -78,6 +78,7 @@
2.16.11.11.06.1.3
+ 3.8.1${project.basedir}jacoco
@@ -223,7 +224,7 @@
org.apache.maven.pluginsmaven-compiler-plugin
- 3.8.1
+ ${maven.compiler.plugin.version}
@@ -349,9 +350,10 @@
org.apache.maven.pluginsmaven-compiler-plugin
- 3.8.0
+ ${maven.compiler.plugin.version}
- ${java.version}
+
+ ${java.version}
From 1ef549cba54c2f9b06a6a46bc9c9985326dffe25 Mon Sep 17 00:00:00 2001
From: Emil Thies
Date: Mon, 29 Jan 2024 17:21:05 +0100
Subject: [PATCH 3/5] fixing github action to use jave 17
---
.github/workflows/deploy.yml | 2 +-
.github/workflows/maven.yml | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index d5bb34c..f25d754 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -19,7 +19,7 @@ jobs:
- name: Set up Maven Central Repository
uses: actions/setup-java@v1
with:
- java-version: '11'
+ java-version: '17'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 95b13b8..89f41a1 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -13,10 +13,10 @@ jobs:
steps:
- uses: actions/checkout@v3
- - name: Set up JDK 11
+ - name: Set up JDK 17
uses: actions/setup-java@v3
with:
- java-version: '11'
+ java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
From 6146a98c6ea29d98c287c747e9e93021279de078 Mon Sep 17 00:00:00 2001
From: Emil Thies
Date: Tue, 30 Jan 2024 12:11:17 +0100
Subject: [PATCH 4/5] version jump to groovy 4
---
pom.xml | 37 ++++++++-----------------------------
1 file changed, 8 insertions(+), 29 deletions(-)
diff --git a/pom.xml b/pom.xml
index dd14f04..1d4bb60 100644
--- a/pom.xml
+++ b/pom.xml
@@ -152,45 +152,24 @@
test
- org.codehaus.groovy
+ org.apache.groovygroovy-all
- 3.0.17
+ 4.0.18testpom
-
-
-
- org.testng
- testng
-
-
-
- org.webjars
- jquery
-
-
- org.spockframework
- spock-core
- 2.4-M1-groovy-3.0
- test
-
-
-
- org.testng
- testng
- 7.8.0
+ org.junit.platform
+ junit-platform-launcher
+ 1.10.1test
-
- org.webjars
- jquery
- 3.6.4
+ org.spockframework
+ spock-core
+ 2.4-M1-groovy-4.0test
-
From 3a6ebb8eff497b1a958d20ae4cae985ec463eddd Mon Sep 17 00:00:00 2001
From: Emil Thies
Date: Tue, 30 Jan 2024 12:26:40 +0100
Subject: [PATCH 5/5] moving more version numbers into property section and
upgrading all but surefire plugin, because most current version has a
vulnerability
---
pom.xml | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/pom.xml b/pom.xml
index 1d4bb60..8b4a6a7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -72,13 +72,20 @@
2.22317
- 1.3.0.Final
- 1.18.28
- 2.22.2
+ 1.5.5.Final
+ 1.18.30
+ 2.22.22.16.11.11.06.1.33.8.1
+ 3.14.0
+ 1.6.13
+ 2.0.11
+ 3.0.0-M1
+ 4.0.18
+ 1.10.1
+ 2.4-M1-groovy-4.0${project.basedir}jacoco
@@ -112,12 +119,12 @@
org.apache.commonscommons-lang3
- 3.14.0
+ ${org.apache.commons.version}io.swaggerswagger-annotations
- 1.6.13
+ ${io.swagger.verion}com.fasterxml.jackson.core
@@ -137,12 +144,12 @@
org.slf4jslf4j-api
- 2.0.11
+ ${org.slf4j.version}jakarta.annotationjakarta.annotation-api
- 3.0.0-M1
+ ${jakarta.annotation.version}
@@ -154,20 +161,20 @@
org.apache.groovygroovy-all
- 4.0.18
+ ${org.apache.groovy.version}testpomorg.junit.platformjunit-platform-launcher
- 1.10.1
+ ${org.junit.platform.version}testorg.spockframeworkspock-core
- 2.4-M1-groovy-4.0
+ ${org.spockframework.version}test