From 74c0e6aa5f66f217041d7f17d460c9e3e627a610 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 26 Apr 2024 12:14:42 -0400
Subject: [PATCH 01/70] Bump github/codeql-action from 3.25.1 to 3.25.3 (#271)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.1 to 3.25.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/c7f9125735019aa87cfc361530512d50ea439c71...d39d31e687223d841ef683f52467bd88e9b21c14)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/codeql-analysis.yml | 6 +++---
.github/workflows/scorecards-analysis.yml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 5f3a488e4f..66eadc2bdd 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -57,7 +57,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@c7f9125735019aa87cfc361530512d50ea439c71 # 3.25.1
+ uses: github/codeql-action/init@d39d31e687223d841ef683f52467bd88e9b21c14 # 3.25.3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -68,7 +68,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@c7f9125735019aa87cfc361530512d50ea439c71 # 3.25.1
+ uses: github/codeql-action/autobuild@d39d31e687223d841ef683f52467bd88e9b21c14 # 3.25.3
# âšī¸ Command-line programs to run using the OS shell.
# đ https://git.io/JvXDl
@@ -82,4 +82,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@c7f9125735019aa87cfc361530512d50ea439c71 # 3.25.1
+ uses: github/codeql-action/analyze@d39d31e687223d841ef683f52467bd88e9b21c14 # 3.25.3
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index c22ee1c0e1..975b9f3a2a 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -64,6 +64,6 @@ jobs:
retention-days: 5
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@c7f9125735019aa87cfc361530512d50ea439c71 # 3.25.1
+ uses: github/codeql-action/upload-sarif@d39d31e687223d841ef683f52467bd88e9b21c14 # 3.25.3
with:
sarif_file: results.sarif
From 0e538c26661eaaa082f17687824feb689cb75d5e Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 26 Apr 2024 12:15:02 -0400
Subject: [PATCH 02/70] Bump actions/upload-artifact from 4.3.2 to 4.3.3 (#273)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.2 to 4.3.3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/1746f4ab65b179e0ea60a494b83293b640dd5bba...65462800fd760344b1a7b4382951275a0abb4808)
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/scorecards-analysis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index 975b9f3a2a..a6ad3339a3 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -57,7 +57,7 @@ jobs:
publish_results: true
- name: "Upload artifact"
- uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
+ uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: SARIF file
path: results.sarif
From 2b966cc145d232991c84522e6341893f4f868945 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 26 Apr 2024 12:15:12 -0400
Subject: [PATCH 03/70] Bump actions/checkout from 4.1.3 to 4.1.4 (#272)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.3 to 4.1.4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/1d96c772d19495a3b5c517cd2bc0cb401ea0529f...0ad4b8fadaa221de15dcec353f45205ec38ea70b)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/codeql-analysis.yml | 2 +-
.github/workflows/coverage.yml | 2 +-
.github/workflows/maven.yml | 2 +-
.github/workflows/scorecards-analysis.yml | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 66eadc2bdd..04183760a0 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -45,7 +45,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # 4.1.3
+ uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4
with:
persist-credentials: false
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 1f3beb86ce..0a4addd78b 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -29,7 +29,7 @@ jobs:
java: [ 8 ]
steps:
- - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # 4.1.3
+ - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4
with:
persist-credentials: false
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 3b5054ac74..1d3dbed049 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -34,7 +34,7 @@ jobs:
experimental: true
steps:
- - uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # 4.1.3
+ - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4
with:
persist-credentials: false
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index a6ad3339a3..54f70ce033 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -40,7 +40,7 @@ jobs:
steps:
- name: "Checkout code"
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # 4.1.3
+ uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4
with:
persist-credentials: false
From b6ef905b7487706987b6db7abf1f812fee8a4c13 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Sat, 27 Apr 2024 12:58:37 +0000
Subject: [PATCH 04/70] Bump to next development version
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 9a407f652b..ff976aae06 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@ limitations under the License.
commons-codec
commons-codec
- 1.17.0
+ -SNAPSHOT
Apache Commons Codec
2002
@@ -106,7 +106,7 @@ limitations under the License.
RC1
true
scm:svn:https://dist.apache.org/repos/dist/dev/commons/${commons.componentid}
- 2024-04-20T18:05:56Z
+ 2024-04-27T12:57:44Z
0.8.12
${commons.javadoc21.java.link}
From f093e24a087679b70e5816ae9e3acb2251bdb990 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Sat, 27 Apr 2024 09:37:36 -0400
Subject: [PATCH 05/70] Add section for the next release
---
src/changes/changes.xml | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index a8a65fdc09..25c5bb1956 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -43,6 +43,11 @@ The type attribute can be add,update,fix,remove.
Apache Commons Developers
+
+
+
+
+
Wrong output of DoubleMetaphone in 1.16.1.
From 3a6873e888fa0678ee6934c0990f7e41c4df6957 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Sat, 27 Apr 2024 10:11:13 -0400
Subject: [PATCH 06/70] Fix typos
---
RELEASE-NOTES.txt | 4 ++--
pom.xml | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index ee1f2a3c34..920aa6171a 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -1,7 +1,7 @@
Apache Commons Codec 1.17.0 RELEASE NOTES
-----------------------------------------
-The Apache Commons Codec component contains encoder and decoders for
+The Apache Commons Codec component contains encoders and decoders for
various formats such as Base16, Base32, Base64, digest, and Hexadecimal. In addition to these
widely used encoders and decoders, the codec package also maintains a
collection of phonetic encoding utilities.
@@ -49,7 +49,7 @@ Download page: https://commons.apache.org/proper/commons-codec/download_codec.cg
Apache Commons Codec 1.16.1 RELEASE NOTES
-----------------------------------------
-The Apache Commons Codec component contains encoder and decoders for
+The Apache Commons Codec component contains encoders and decoders for
various formats such as Base16, Base32, Base64, digest, and Hexadecimal. In addition to these
widely used encoders and decoders, the codec package also maintains a
collection of phonetic encoding utilities.
diff --git a/pom.xml b/pom.xml
index ff976aae06..2968346ceb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@ limitations under the License.
Apache Commons Codec
2002
- The Apache Commons Codec component contains encoder and decoders for
+ The Apache Commons Codec component contains encoders and decoders for
various formats such as Base16, Base32, Base64, digest, and Hexadecimal. In addition to these
widely used encoders and decoders, the codec package also maintains a
collection of phonetic encoding utilities.
From ea648b186b50966928427a0921675defbcb0a144 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 3 May 2024 12:41:54 -0400
Subject: [PATCH 07/70] Bump codecov/codecov-action from 4.3.0 to 4.3.1 (#274)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/84508663e988701840491b86de86b666e8a86bed...5ecb98a3c6b747ed38dc09f787459979aebb39be)
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/coverage.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 0a4addd78b..aea1d2c5f9 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -47,6 +47,6 @@ jobs:
run: mvn --show-version --batch-mode --no-transfer-progress test jacoco:report
- name: Upload coverage to Codecov
- uses: codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed # v4.3.0
+ uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
with:
files: ./target/site/jacoco/jacoco.xml
From 6e198240e2824027ec9af0518566a600a6b0b223 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Sat, 4 May 2024 10:24:44 -0400
Subject: [PATCH 08/70] Group related properties
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 2968346ceb..e50f4bbb23 100644
--- a/pom.xml
+++ b/pom.xml
@@ -98,7 +98,6 @@ limitations under the License.
UTF-8
${basedir}/src/conf/checkstyle-header.txt
${basedir}/src/conf/checkstyle.xml
- false
1.17.0
1.16.1
@@ -110,6 +109,7 @@ limitations under the License.
0.8.12
${commons.javadoc21.java.link}
+ false
true
0.92
0.91
From f9e369459193e3acdb00b9e986e99b9d9abae549 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Sun, 5 May 2024 14:42:57 -0400
Subject: [PATCH 09/70] Update Checkstyle DTD version from 1.0 to 1.2
---
src/conf/checkstyle-suppressions.xml | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/conf/checkstyle-suppressions.xml b/src/conf/checkstyle-suppressions.xml
index f5dc46ba9f..40bb184602 100644
--- a/src/conf/checkstyle-suppressions.xml
+++ b/src/conf/checkstyle-suppressions.xml
@@ -1,5 +1,4 @@
-
-
-
+ "-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
+ "https://checkstyle.org/dtds/suppressions_1_2.dtd">
From 1ed698e8fd1e7b7e9ed49759f4c842acb467e77f Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 10 May 2024 12:38:50 -0400
Subject: [PATCH 10/70] Bump github/codeql-action from 3.25.3 to 3.25.4 (#275)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.3 to 3.25.4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/d39d31e687223d841ef683f52467bd88e9b21c14...ccf74c947955fd1cf117aef6a0e4e66191ef6f61)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/codeql-analysis.yml | 6 +++---
.github/workflows/scorecards-analysis.yml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 04183760a0..02d156e646 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -57,7 +57,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@d39d31e687223d841ef683f52467bd88e9b21c14 # 3.25.3
+ uses: github/codeql-action/init@ccf74c947955fd1cf117aef6a0e4e66191ef6f61 # 3.25.4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -68,7 +68,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@d39d31e687223d841ef683f52467bd88e9b21c14 # 3.25.3
+ uses: github/codeql-action/autobuild@ccf74c947955fd1cf117aef6a0e4e66191ef6f61 # 3.25.4
# âšī¸ Command-line programs to run using the OS shell.
# đ https://git.io/JvXDl
@@ -82,4 +82,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@d39d31e687223d841ef683f52467bd88e9b21c14 # 3.25.3
+ uses: github/codeql-action/analyze@ccf74c947955fd1cf117aef6a0e4e66191ef6f61 # 3.25.4
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index 54f70ce033..4a55677da4 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -64,6 +64,6 @@ jobs:
retention-days: 5
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@d39d31e687223d841ef683f52467bd88e9b21c14 # 3.25.3
+ uses: github/codeql-action/upload-sarif@ccf74c947955fd1cf117aef6a0e4e66191ef6f61 # 3.25.4
with:
sarif_file: results.sarif
From eb458ce8196b39618a496b96e99a37910ac03e6a Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 10 May 2024 12:39:01 -0400
Subject: [PATCH 11/70] Bump ossf/scorecard-action from 2.3.1 to 2.3.3 (#277)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.1 to 2.3.3.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/0864cf19026789058feabb7e87baa5f140aac736...dc50aa9510b46c811795eb24b2f1ba02a914e534)
---
updated-dependencies:
- dependency-name: ossf/scorecard-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/scorecards-analysis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index 4a55677da4..5b8dd7cd7f 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -45,7 +45,7 @@ jobs:
persist-credentials: false
- name: "Run analysis"
- uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # 2.3.1
+ uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # 2.3.3
with:
results_file: results.sarif
results_format: sarif
From 784713acb66c8b1fa9af7e26ea22a8abfb330170 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 10 May 2024 12:39:30 -0400
Subject: [PATCH 12/70] Bump actions/checkout from 4.1.4 to 4.1.5 (#276)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.4 to 4.1.5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/0ad4b8fadaa221de15dcec353f45205ec38ea70b...44c2b7a8a4ea60a981eaca3cf939b5f4305c123b)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/codeql-analysis.yml | 2 +-
.github/workflows/coverage.yml | 2 +-
.github/workflows/maven.yml | 2 +-
.github/workflows/scorecards-analysis.yml | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 02d156e646..4cfca52e0c 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -45,7 +45,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4
+ uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # 4.1.5
with:
persist-credentials: false
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index aea1d2c5f9..9331f2c7c4 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -29,7 +29,7 @@ jobs:
java: [ 8 ]
steps:
- - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4
+ - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # 4.1.5
with:
persist-credentials: false
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 1d3dbed049..90b83cf1ef 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -34,7 +34,7 @@ jobs:
experimental: true
steps:
- - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4
+ - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # 4.1.5
with:
persist-credentials: false
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index 5b8dd7cd7f..e9a04f46bd 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -40,7 +40,7 @@ jobs:
steps:
- name: "Checkout code"
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # 4.1.4
+ uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # 4.1.5
with:
persist-credentials: false
From cd16988dd46ac7533771eb6856a5f56c7aeaffba Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Thu, 16 May 2024 14:47:23 -0400
Subject: [PATCH 13/70] Show Maven stack traces on errors in GH CI
---
.github/workflows/maven.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 90b83cf1ef..048ae441b5 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -49,4 +49,4 @@ jobs:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Build with Maven
- run: mvn --show-version --batch-mode --no-transfer-progress
+ run: mvn --errors --show-version --batch-mode --no-transfer-progress
From ad28b0f1ea4010dc0eaeb1d1cda041efe0ef7323 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Thu, 16 May 2024 16:44:32 -0400
Subject: [PATCH 14/70] Md5Crypt now throws IllegalArgumentException on an
invalid prefix
---
src/changes/changes.xml | 1 +
.../org/apache/commons/codec/digest/Md5Crypt.java | 14 +++++++++++---
.../apache/commons/codec/digest/Md5CryptTest.java | 10 ++++++++++
3 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 25c5bb1956..f9094328fe 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -45,6 +45,7 @@ The type attribute can be add,update,fix,remove.
+ Md5Crypt now throws IllegalArgumentException on an invalid prefix.
diff --git a/src/main/java/org/apache/commons/codec/digest/Md5Crypt.java b/src/main/java/org/apache/commons/codec/digest/Md5Crypt.java
index 05c6a6ce20..7d25225c6d 100644
--- a/src/main/java/org/apache/commons/codec/digest/Md5Crypt.java
+++ b/src/main/java/org/apache/commons/codec/digest/Md5Crypt.java
@@ -20,6 +20,7 @@
import java.security.MessageDigest;
import java.security.SecureRandom;
import java.util.Arrays;
+import java.util.Objects;
import java.util.Random;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -238,7 +239,7 @@ public static String md5Crypt(final byte[] keyBytes, final String salt) {
* real salt value without prefix or "rounds=". The salt may be null, in which case a salt
* is generated for you using {@link SecureRandom}.
* @param prefix
- * salt prefix
+ * The salt prefix {@value #APR1_PREFIX}, {@value #MD5_PREFIX}.
* @return the hash value
* @throws IllegalArgumentException
* if the salt does not match the allowed pattern
@@ -261,13 +262,13 @@ public static String md5Crypt(final byte[] keyBytes, final String salt, final St
* real salt value without prefix or "rounds=". The salt may be null, in which case a salt
* is generated for you using {@link SecureRandom}.
* @param prefix
- * salt prefix
+ * The salt prefix {@value #APR1_PREFIX}, {@value #MD5_PREFIX}.
* @param random
* the instance of {@link Random} to use for generating the salt.
* Consider using {@link SecureRandom} for more secure salts.
* @return the hash value
* @throws IllegalArgumentException
- * if the salt does not match the allowed pattern
+ * if the salt or prefix does not match the allowed pattern
* @throws IllegalArgumentException
* when a {@link java.security.NoSuchAlgorithmException} is caught.
* @since 1.12
@@ -280,6 +281,13 @@ public static String md5Crypt(final byte[] keyBytes, final String salt, final St
if (salt == null) {
saltString = B64.getRandomSalt(8, random);
} else {
+ Objects.requireNonNull(prefix, "prefix");
+ if (prefix.length() < 3) {
+ throw new IllegalArgumentException("Invalid prefix value: " + prefix);
+ }
+ if (prefix.charAt(0) != '$' && prefix.charAt(prefix.length() - 1) != '$') {
+ throw new IllegalArgumentException("Invalid prefix value: " + prefix);
+ }
final Pattern p = Pattern.compile("^" + prefix.replace("$", "\\$") + "([\\.\\/a-zA-Z0-9]{1,8}).*");
final Matcher m = p.matcher(salt);
if (!m.find()) {
diff --git a/src/test/java/org/apache/commons/codec/digest/Md5CryptTest.java b/src/test/java/org/apache/commons/codec/digest/Md5CryptTest.java
index 8eac52f9a0..cad63b28ae 100644
--- a/src/test/java/org/apache/commons/codec/digest/Md5CryptTest.java
+++ b/src/test/java/org/apache/commons/codec/digest/Md5CryptTest.java
@@ -35,6 +35,16 @@ public void testCtor() {
assertNotNull(new Md5Crypt()); // for code-coverage
}
+ @Test
+ public void testInvalidPrefix() {
+ assertThrows(IllegalArgumentException.class, () -> Md5Crypt.md5Crypt(new byte[] { 1, 2, 3, 4, 5 },
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!", "(.*a){10000}"));
+ assertThrows(IllegalArgumentException.class, () -> Md5Crypt.md5Crypt(new byte[] { 1, 2, 3, 4, 5 },
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!", "$(.*a){10000}$"));
+ assertThrows(IllegalArgumentException.class, () -> Md5Crypt.md5Crypt(new byte[] { 1, 2, 3, 4, 5 },
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "$(.*a){10000}$"));
+ }
+
@Test
public void testMd5CryptBytes() {
// An empty Bytearray equals an empty String
From becaef05df69ace689e05dc1b2203c8bf3b9a89e Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Fri, 17 May 2024 08:42:15 -0400
Subject: [PATCH 15/70] Remove superfluous comment
---
src/test/java/org/apache/commons/codec/digest/Md5CryptTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/java/org/apache/commons/codec/digest/Md5CryptTest.java b/src/test/java/org/apache/commons/codec/digest/Md5CryptTest.java
index cad63b28ae..bde44765aa 100644
--- a/src/test/java/org/apache/commons/codec/digest/Md5CryptTest.java
+++ b/src/test/java/org/apache/commons/codec/digest/Md5CryptTest.java
@@ -32,7 +32,7 @@ public class Md5CryptTest {
@Test
public void testCtor() {
- assertNotNull(new Md5Crypt()); // for code-coverage
+ assertNotNull(new Md5Crypt());
}
@Test
From 0e9c2ee7bd2ed5a34398a93ae83e60fd111802be Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 17 May 2024 13:19:01 -0400
Subject: [PATCH 16/70] Bump github/codeql-action from 3.25.4 to 3.25.5 (#279)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.4 to 3.25.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/ccf74c947955fd1cf117aef6a0e4e66191ef6f61...b7cec7526559c32f1616476ff32d17ba4c59b2d6)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/codeql-analysis.yml | 6 +++---
.github/workflows/scorecards-analysis.yml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 4cfca52e0c..2e0f82cadb 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -57,7 +57,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@ccf74c947955fd1cf117aef6a0e4e66191ef6f61 # 3.25.4
+ uses: github/codeql-action/init@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # 3.25.5
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -68,7 +68,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@ccf74c947955fd1cf117aef6a0e4e66191ef6f61 # 3.25.4
+ uses: github/codeql-action/autobuild@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # 3.25.5
# âšī¸ Command-line programs to run using the OS shell.
# đ https://git.io/JvXDl
@@ -82,4 +82,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@ccf74c947955fd1cf117aef6a0e4e66191ef6f61 # 3.25.4
+ uses: github/codeql-action/analyze@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # 3.25.5
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index e9a04f46bd..37690b1f12 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -64,6 +64,6 @@ jobs:
retention-days: 5
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@ccf74c947955fd1cf117aef6a0e4e66191ef6f61 # 3.25.4
+ uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # 3.25.5
with:
sarif_file: results.sarif
From 67c9c01786faac04f4666ab47f5be2f1afacb806 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 17 May 2024 13:19:13 -0400
Subject: [PATCH 17/70] Bump codecov/codecov-action from 4.3.1 to 4.4.0 (#280)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.3.1 to 4.4.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/5ecb98a3c6b747ed38dc09f787459979aebb39be...6d798873df2b1b8e5846dba6fb86631229fbcb17)
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/coverage.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 9331f2c7c4..ddcf7996fb 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -47,6 +47,6 @@ jobs:
run: mvn --show-version --batch-mode --no-transfer-progress test jacoco:report
- name: Upload coverage to Codecov
- uses: codecov/codecov-action@5ecb98a3c6b747ed38dc09f787459979aebb39be # v4.3.1
+ uses: codecov/codecov-action@6d798873df2b1b8e5846dba6fb86631229fbcb17 # v4.4.0
with:
files: ./target/site/jacoco/jacoco.xml
From 19fb64d89bcfb9c2beadb854341fcf3ebd945f58 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 17 May 2024 13:19:25 -0400
Subject: [PATCH 18/70] Bump actions/checkout from 4.1.5 to 4.1.6 (#278)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.5 to 4.1.6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/44c2b7a8a4ea60a981eaca3cf939b5f4305c123b...a5ac7e51b41094c92402da3b24376905380afc29)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/codeql-analysis.yml | 2 +-
.github/workflows/coverage.yml | 2 +-
.github/workflows/maven.yml | 2 +-
.github/workflows/scorecards-analysis.yml | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 2e0f82cadb..890accbb07 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -45,7 +45,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # 4.1.5
+ uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # 4.1.6
with:
persist-credentials: false
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index ddcf7996fb..20bd1fa8aa 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -29,7 +29,7 @@ jobs:
java: [ 8 ]
steps:
- - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # 4.1.5
+ - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # 4.1.6
with:
persist-credentials: false
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 048ae441b5..e5e4361ef1 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -34,7 +34,7 @@ jobs:
experimental: true
steps:
- - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # 4.1.5
+ - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # 4.1.6
with:
persist-credentials: false
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index 37690b1f12..3c3ff8e242 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -40,7 +40,7 @@ jobs:
steps:
- name: "Checkout code"
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # 4.1.5
+ uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # 4.1.6
with:
persist-credentials: false
From f0f649c70ee212f58495937c7e3ef6ee86848181 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Sat, 18 May 2024 09:17:39 -0400
Subject: [PATCH 19/70] Javadoc
---
src/main/java/org/apache/commons/codec/binary/Base64.java | 1 -
src/main/java/org/apache/commons/codec/digest/MurmurHash3.java | 2 +-
src/main/java/org/apache/commons/codec/digest/XXHash32.java | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/codec/binary/Base64.java b/src/main/java/org/apache/commons/codec/binary/Base64.java
index 443ccc6612..971d2c2ed3 100644
--- a/src/main/java/org/apache/commons/codec/binary/Base64.java
+++ b/src/main/java/org/apache/commons/codec/binary/Base64.java
@@ -219,7 +219,6 @@ public static byte[] decodeBase64(final String base64String) {
return new Base64().decode(base64String);
}
- // Implementation of integer encoding used for crypto
/**
* Decodes a byte64-encoded integer according to crypto standards such as W3C's XML-Signature.
*
diff --git a/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java b/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
index 197c70537e..10ce3b8a2e 100644
--- a/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
+++ b/src/main/java/org/apache/commons/codec/digest/MurmurHash3.java
@@ -20,7 +20,7 @@
import org.apache.commons.codec.binary.StringUtils;
/**
- * Implementation of the MurmurHash3 32-bit and 128-bit hash functions.
+ * Implements the MurmurHash3 32-bit and 128-bit hash functions.
*
*
* MurmurHash is a non-cryptographic hash function suitable for general hash-based lookup. The name comes from two basic
diff --git a/src/main/java/org/apache/commons/codec/digest/XXHash32.java b/src/main/java/org/apache/commons/codec/digest/XXHash32.java
index fd46fc0c3c..16f59b8be3 100644
--- a/src/main/java/org/apache/commons/codec/digest/XXHash32.java
+++ b/src/main/java/org/apache/commons/codec/digest/XXHash32.java
@@ -22,7 +22,7 @@
import java.util.zip.Checksum;
/**
- * Implementation of the xxHash32 hash algorithm.
+ * Implements the xxHash32 hash algorithm.
*
*
* Copied from Commons Compress 1.14
Date: Sat, 18 May 2024 09:46:45 -0400
Subject: [PATCH 20/70] Javadoc
---
src/main/java/org/apache/commons/codec/digest/MurmurHash2.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/codec/digest/MurmurHash2.java b/src/main/java/org/apache/commons/codec/digest/MurmurHash2.java
index 04038f9585..d4d5faabf1 100644
--- a/src/main/java/org/apache/commons/codec/digest/MurmurHash2.java
+++ b/src/main/java/org/apache/commons/codec/digest/MurmurHash2.java
@@ -20,7 +20,7 @@
import org.apache.commons.codec.binary.StringUtils;
/**
- * Implementation of the MurmurHash2 32-bit and 64-bit hash functions.
+ * Implements the MurmurHash2 32-bit and 64-bit hash functions.
*
* MurmurHash is a non-cryptographic hash function suitable for general
* hash-based lookup. The name comes from two basic operations, multiply (MU)
From f1762cd82e0e2ed400c98940094258d4085b8450 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Sun, 19 May 2024 09:15:22 -0400
Subject: [PATCH 21/70] Update site URL
---
pom.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index e50f4bbb23..e4a64eb5b4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -50,9 +50,9 @@ limitations under the License.
- stagingSite
- Apache Staging Website
- ${commons.deployment.protocol}://people.apache.org/www/commons.apache.org/commons-${commons.componentid}/
+ apache.website
+ Apache Commons Site
+ scm:svn:https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-codec/
From eb2d16b1b54b188329a3ff9e51c804003dbc4e28 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Wed, 22 May 2024 08:20:32 -0400
Subject: [PATCH 22/70] Bump org.apache.commons:commons-parent from 69 to 70
Pick up Javadoc link for Java itself from parent POM configuration
---
pom.xml | 3 +--
src/changes/changes.xml | 1 +
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index e4a64eb5b4..39c559536e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@ limitations under the License.
org.apache.commons
commons-parent
- 69
+ 70
commons-codec
commons-codec
@@ -107,7 +107,6 @@ limitations under the License.
scm:svn:https://dist.apache.org/repos/dist/dev/commons/${commons.componentid}
2024-04-27T12:57:44Z
0.8.12
- ${commons.javadoc21.java.link}
false
true
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index f9094328fe..2cf01bcc65 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -48,6 +48,7 @@ The type attribute can be add,update,fix,remove.
Md5Crypt now throws IllegalArgumentException on an invalid prefix.
+ Bump org.apache.commons:commons-parent from 69 to 70.
From 5d0d2704dff3c72d5432395fe0f60cd402e10a9c Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Wed, 22 May 2024 08:22:20 -0400
Subject: [PATCH 23/70] Add 23-ea to GH CI builds
---
.github/workflows/maven.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index e5e4361ef1..b280a656a6 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -27,10 +27,10 @@ jobs:
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
- java: [ 8, 11, 17, 21 ]
+ java: [ 8, 11, 17, 21, 22 ]
experimental: [false]
include:
- - java: 22-ea
+ - java: 23-ea
experimental: true
steps:
From 10412f4028107273c0da1fb69eaa579be2072140 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Wed, 22 May 2024 08:24:31 -0400
Subject: [PATCH 24/70] Fix POM version
Update version properties
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 39c559536e..1e1cdbfa79 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@ limitations under the License.
commons-codec
commons-codec
- -SNAPSHOT
+ 1.17.1-SNAPSHOT
Apache Commons Codec
2002
@@ -99,9 +99,9 @@ limitations under the License.
${basedir}/src/conf/checkstyle-header.txt
${basedir}/src/conf/checkstyle.xml
- 1.17.0
- 1.16.1
- 1.17.1
+ 1.17.1
+ 1.17.0
+ 1.17.2
RC1
true
scm:svn:https://dist.apache.org/repos/dist/dev/commons/${commons.componentid}
From 14c4621f4cb6b01f1215446c8037418886482df9 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Thu, 23 May 2024 09:15:47 -0400
Subject: [PATCH 25/70] Javadoc
---
.../java/org/apache/commons/codec/binary/Base64.java | 2 +-
.../org/apache/commons/codec/binary/BaseNCodec.java | 10 +++++-----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/main/java/org/apache/commons/codec/binary/Base64.java b/src/main/java/org/apache/commons/codec/binary/Base64.java
index 971d2c2ed3..48ad7334e0 100644
--- a/src/main/java/org/apache/commons/codec/binary/Base64.java
+++ b/src/main/java/org/apache/commons/codec/binary/Base64.java
@@ -92,7 +92,7 @@ public Base64 get() {
* Sets the URL-safe encoding policy.
*
* @param urlSafe URL-safe encoding policy, null resets to the default.
- * @return this.
+ * @return {@code this} instance.
*/
public Builder setUrlSafe(final boolean urlSafe) {
return setEncodeTable(toUrlSafeEncodeTable(urlSafe));
diff --git a/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java b/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
index c598abc3d1..e4e3f6ae20 100644
--- a/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
+++ b/src/main/java/org/apache/commons/codec/binary/BaseNCodec.java
@@ -103,7 +103,7 @@ byte getPadding() {
* Sets the decoding policy.
*
* @param decodingPolicy the decoding policy, null resets to the default.
- * @return this.
+ * @return {@code this} instance.
*/
public B setDecodingPolicy(final CodecPolicy decodingPolicy) {
this.decodingPolicy = decodingPolicy != null ? decodingPolicy : DECODING_POLICY_DEFAULT;
@@ -114,7 +114,7 @@ public B setDecodingPolicy(final CodecPolicy decodingPolicy) {
* Sets the encode table.
*
* @param encodeTable the encode table, null resets to the default.
- * @return this.
+ * @return {@code this} instance.
*/
public B setEncodeTable(final byte... encodeTable) {
this.encodeTable = encodeTable != null ? encodeTable : defaultEncodeTable;
@@ -125,7 +125,7 @@ public B setEncodeTable(final byte... encodeTable) {
* Sets the line length.
*
* @param lineLength the line length, less than 0 resets to the default.
- * @return this.
+ * @return {@code this} instance.
*/
public B setLineLength(final int lineLength) {
this.lineLength = Math.max(0, lineLength);
@@ -136,7 +136,7 @@ public B setLineLength(final int lineLength) {
* Sets the line separator.
*
* @param lineSeparator the line separator, null resets to the default.
- * @return this.
+ * @return {@code this} instance.
*/
public B setLineSeparator(final byte... lineSeparator) {
this.lineSeparator = lineSeparator != null ? lineSeparator : CHUNK_SEPARATOR;
@@ -147,7 +147,7 @@ public B setLineSeparator(final byte... lineSeparator) {
* Sets the padding byte.
*
* @param padding the padding byte.
- * @return this.
+ * @return {@code this} instance.
*/
public B setPadding(final byte padding) {
this.padding = padding;
From ec4483074c0be014ff60bca9f39f6b6fcb2b48ad Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Thu, 23 May 2024 09:19:36 -0400
Subject: [PATCH 26/70] Javadoc
---
.../java/org/apache/commons/codec/digest/Blake3.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/main/java/org/apache/commons/codec/digest/Blake3.java b/src/main/java/org/apache/commons/codec/digest/Blake3.java
index ba6cceedf4..032ce0ffc1 100644
--- a/src/main/java/org/apache/commons/codec/digest/Blake3.java
+++ b/src/main/java/org/apache/commons/codec/digest/Blake3.java
@@ -455,7 +455,7 @@ private Blake3(final int[] key, final int flags) {
* previously finalized bytes. Note that this can finalize up to 264 bytes per instance.
*
* @param out destination array to finalize bytes into
- * @return this
+ * @return {@code this} instance.
* @throws NullPointerException if out is null
*/
public Blake3 doFinalize(final byte[] out) {
@@ -469,7 +469,7 @@ public Blake3 doFinalize(final byte[] out) {
* @param out destination array to finalize bytes into
* @param offset where in the array to begin writing bytes to
* @param length number of bytes to finalize
- * @return this
+ * @return {@code this} instance.
* @throws NullPointerException if out is null
* @throws IndexOutOfBoundsException if offset or length are negative or if offset + length is greater than the
* length of the provided array
@@ -498,7 +498,7 @@ public byte[] doFinalize(final int nrBytes) {
/**
* Resets this instance back to its initial state when it was first constructed.
- * @return this
+ * @return {@code this} instance.
*/
public Blake3 reset() {
engineState.reset();
@@ -509,7 +509,7 @@ public Blake3 reset() {
* Updates this hash state using the provided bytes.
*
* @param in source array to update data from
- * @return this
+ * @return {@code this} instance.
* @throws NullPointerException if in is null
*/
public Blake3 update(final byte[] in) {
@@ -522,7 +522,7 @@ public Blake3 update(final byte[] in) {
* @param in source array to update data from
* @param offset where in the array to begin reading bytes
* @param length number of bytes to update
- * @return this
+ * @return {@code this} instance.
* @throws NullPointerException if in is null
* @throws IndexOutOfBoundsException if offset or length are negative or if offset + length is greater than the
* length of the provided array
From f1cc4c278ed8db44a2a55970b9b0f1b2e66ea222 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 24 May 2024 13:40:15 -0400
Subject: [PATCH 27/70] Bump github/codeql-action from 3.25.5 to 3.25.6 (#283)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.5 to 3.25.6.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/b7cec7526559c32f1616476ff32d17ba4c59b2d6...9fdb3e49720b44c48891d036bb502feb25684276)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/codeql-analysis.yml | 6 +++---
.github/workflows/scorecards-analysis.yml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 890accbb07..4800243fde 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -57,7 +57,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # 3.25.5
+ uses: github/codeql-action/init@9fdb3e49720b44c48891d036bb502feb25684276 # 3.25.6
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -68,7 +68,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # 3.25.5
+ uses: github/codeql-action/autobuild@9fdb3e49720b44c48891d036bb502feb25684276 # 3.25.6
# âšī¸ Command-line programs to run using the OS shell.
# đ https://git.io/JvXDl
@@ -82,4 +82,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # 3.25.5
+ uses: github/codeql-action/analyze@9fdb3e49720b44c48891d036bb502feb25684276 # 3.25.6
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index 3c3ff8e242..3eec991d9f 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -64,6 +64,6 @@ jobs:
retention-days: 5
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # 3.25.5
+ uses: github/codeql-action/upload-sarif@9fdb3e49720b44c48891d036bb502feb25684276 # 3.25.6
with:
sarif_file: results.sarif
From 0cebd36f61a55588daffb3905d53b5bdac96eb39 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 24 May 2024 13:40:26 -0400
Subject: [PATCH 28/70] Bump codecov/codecov-action from 4.4.0 to 4.4.1 (#282)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.4.0 to 4.4.1.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/6d798873df2b1b8e5846dba6fb86631229fbcb17...125fc84a9a348dbcf27191600683ec096ec9021c)
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/coverage.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 20bd1fa8aa..8cbd776dcd 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -47,6 +47,6 @@ jobs:
run: mvn --show-version --batch-mode --no-transfer-progress test jacoco:report
- name: Upload coverage to Codecov
- uses: codecov/codecov-action@6d798873df2b1b8e5846dba6fb86631229fbcb17 # v4.4.0
+ uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c # v4.4.1
with:
files: ./target/site/jacoco/jacoco.xml
From 743c9cb42adc24ae4ce4804fc7e7788f4fd1dc59 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 31 May 2024 11:17:39 -0400
Subject: [PATCH 29/70] Bump github/codeql-action from 3.25.6 to 3.25.7 (#284)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.6 to 3.25.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/9fdb3e49720b44c48891d036bb502feb25684276...f079b8493333aace61c81488f8bd40919487bd9f)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/codeql-analysis.yml | 6 +++---
.github/workflows/scorecards-analysis.yml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 4800243fde..d0c70fbe4a 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -57,7 +57,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@9fdb3e49720b44c48891d036bb502feb25684276 # 3.25.6
+ uses: github/codeql-action/init@f079b8493333aace61c81488f8bd40919487bd9f # 3.25.7
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -68,7 +68,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@9fdb3e49720b44c48891d036bb502feb25684276 # 3.25.6
+ uses: github/codeql-action/autobuild@f079b8493333aace61c81488f8bd40919487bd9f # 3.25.7
# âšī¸ Command-line programs to run using the OS shell.
# đ https://git.io/JvXDl
@@ -82,4 +82,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@9fdb3e49720b44c48891d036bb502feb25684276 # 3.25.6
+ uses: github/codeql-action/analyze@f079b8493333aace61c81488f8bd40919487bd9f # 3.25.7
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index 3eec991d9f..7ee127277a 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -64,6 +64,6 @@ jobs:
retention-days: 5
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@9fdb3e49720b44c48891d036bb502feb25684276 # 3.25.6
+ uses: github/codeql-action/upload-sarif@f079b8493333aace61c81488f8bd40919487bd9f # 3.25.7
with:
sarif_file: results.sarif
From 3dbd866654140fada4616647efeedaa43d26b5d8 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 7 Jun 2024 12:25:46 -0400
Subject: [PATCH 30/70] Bump github/codeql-action from 3.25.7 to 3.25.8 (#285)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.7 to 3.25.8.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/f079b8493333aace61c81488f8bd40919487bd9f...2e230e8fe0ad3a14a340ad0815ddb96d599d2aff)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/codeql-analysis.yml | 6 +++---
.github/workflows/scorecards-analysis.yml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index d0c70fbe4a..984dbd08fe 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -57,7 +57,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@f079b8493333aace61c81488f8bd40919487bd9f # 3.25.7
+ uses: github/codeql-action/init@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # 3.25.8
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -68,7 +68,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@f079b8493333aace61c81488f8bd40919487bd9f # 3.25.7
+ uses: github/codeql-action/autobuild@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # 3.25.8
# âšī¸ Command-line programs to run using the OS shell.
# đ https://git.io/JvXDl
@@ -82,4 +82,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@f079b8493333aace61c81488f8bd40919487bd9f # 3.25.7
+ uses: github/codeql-action/analyze@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # 3.25.8
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index 7ee127277a..0fa7eebe61 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -64,6 +64,6 @@ jobs:
retention-days: 5
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@f079b8493333aace61c81488f8bd40919487bd9f # 3.25.7
+ uses: github/codeql-action/upload-sarif@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # 3.25.8
with:
sarif_file: results.sarif
From 12527a0858c7d8763256127081e9455289bcac53 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 14 Jun 2024 12:12:38 -0400
Subject: [PATCH 31/70] Bump org.apache.commons:commons-parent from 70 to 71
(#286)
Bumps [org.apache.commons:commons-parent](https://github.com/apache/commons-parent) from 70 to 71.
- [Changelog](https://github.com/apache/commons-parent/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-parent/commits)
---
updated-dependencies:
- dependency-name: org.apache.commons:commons-parent
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 1e1cdbfa79..c6afb11ffb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@ limitations under the License.
org.apache.commons
commons-parent
- 70
+ 71
commons-codec
commons-codec
From de36e5e5110f035396f3a5c11b2c00b50adb11a9 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 14 Jun 2024 12:12:52 -0400
Subject: [PATCH 32/70] Bump actions/checkout from 4.1.6 to 4.1.7 (#289)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.6 to 4.1.7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/a5ac7e51b41094c92402da3b24376905380afc29...692973e3d937129bcbf40652eb9f2f61becf3332)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/codeql-analysis.yml | 2 +-
.github/workflows/coverage.yml | 2 +-
.github/workflows/maven.yml | 2 +-
.github/workflows/scorecards-analysis.yml | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 984dbd08fe..197d1ccdac 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -45,7 +45,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # 4.1.6
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
with:
persist-credentials: false
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 8cbd776dcd..255016f072 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -29,7 +29,7 @@ jobs:
java: [ 8 ]
steps:
- - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # 4.1.6
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
with:
persist-credentials: false
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index b280a656a6..68b2f3103a 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -34,7 +34,7 @@ jobs:
experimental: true
steps:
- - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # 4.1.6
+ - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
with:
persist-credentials: false
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index 0fa7eebe61..0017b1274f 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -40,7 +40,7 @@ jobs:
steps:
- name: "Checkout code"
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # 4.1.6
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
with:
persist-credentials: false
From dc07e30c36fca9a6db28906721413f4f91c25b6c Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 14 Jun 2024 12:13:01 -0400
Subject: [PATCH 33/70] Bump codecov/codecov-action from 4.4.1 to 4.5.0 (#288)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4.4.1 to 4.5.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/125fc84a9a348dbcf27191600683ec096ec9021c...e28ff129e5465c2c0dcc6f003fc735cb6ae0c673)
---
updated-dependencies:
- dependency-name: codecov/codecov-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/coverage.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index 255016f072..da7f56f544 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -47,6 +47,6 @@ jobs:
run: mvn --show-version --batch-mode --no-transfer-progress test jacoco:report
- name: Upload coverage to Codecov
- uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c # v4.4.1
+ uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
files: ./target/site/jacoco/jacoco.xml
From e9a6cdca5f6c3e17fd9c8a6ff7ed134e2e63d250 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 14 Jun 2024 12:13:12 -0400
Subject: [PATCH 34/70] Bump github/codeql-action from 3.25.8 to 3.25.10 (#287)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.8 to 3.25.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/2e230e8fe0ad3a14a340ad0815ddb96d599d2aff...23acc5c183826b7a8a97bce3cecc52db901f8251)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/codeql-analysis.yml | 6 +++---
.github/workflows/scorecards-analysis.yml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 197d1ccdac..2d64dbe7d6 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -57,7 +57,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # 3.25.8
+ uses: github/codeql-action/init@23acc5c183826b7a8a97bce3cecc52db901f8251 # 3.25.10
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -68,7 +68,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # 3.25.8
+ uses: github/codeql-action/autobuild@23acc5c183826b7a8a97bce3cecc52db901f8251 # 3.25.10
# âšī¸ Command-line programs to run using the OS shell.
# đ https://git.io/JvXDl
@@ -82,4 +82,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # 3.25.8
+ uses: github/codeql-action/analyze@23acc5c183826b7a8a97bce3cecc52db901f8251 # 3.25.10
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index 0017b1274f..1642ee53f4 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -64,6 +64,6 @@ jobs:
retention-days: 5
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # 3.25.8
+ uses: github/codeql-action/upload-sarif@23acc5c183826b7a8a97bce3cecc52db901f8251 # 3.25.10
with:
sarif_file: results.sarif
From ca7dfea764ef17e05635904d1ef8d3512849974c Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Fri, 14 Jun 2024 12:14:54 -0400
Subject: [PATCH 35/70] Bump org.apache.commons:commons-parent from 70 to 71
#286
---
src/changes/changes.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 2cf01bcc65..98e7d80948 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -48,7 +48,7 @@ The type attribute can be add,update,fix,remove.
Md5Crypt now throws IllegalArgumentException on an invalid prefix.
- Bump org.apache.commons:commons-parent from 69 to 70.
+ Bump org.apache.commons:commons-parent from 69 to 71 #286.
From 2352c990837309af9d4aa4fb7600803d9caf133c Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 28 Jun 2024 13:09:17 -0400
Subject: [PATCH 36/70] Bump github/codeql-action from 3.25.10 to 3.25.11
(#291)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.10 to 3.25.11.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/23acc5c183826b7a8a97bce3cecc52db901f8251...b611370bb5703a7efb587f9d136a52ea24c5c38c)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/codeql-analysis.yml | 6 +++---
.github/workflows/scorecards-analysis.yml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 2d64dbe7d6..9037d5100d 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -57,7 +57,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@23acc5c183826b7a8a97bce3cecc52db901f8251 # 3.25.10
+ uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # 3.25.11
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -68,7 +68,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@23acc5c183826b7a8a97bce3cecc52db901f8251 # 3.25.10
+ uses: github/codeql-action/autobuild@b611370bb5703a7efb587f9d136a52ea24c5c38c # 3.25.11
# âšī¸ Command-line programs to run using the OS shell.
# đ https://git.io/JvXDl
@@ -82,4 +82,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@23acc5c183826b7a8a97bce3cecc52db901f8251 # 3.25.10
+ uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # 3.25.11
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index 1642ee53f4..6f601609c7 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -64,6 +64,6 @@ jobs:
retention-days: 5
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@23acc5c183826b7a8a97bce3cecc52db901f8251 # 3.25.10
+ uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # 3.25.11
with:
sarif_file: results.sarif
From b9b28069035c3d012d862b7034c10f09011e118b Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Sat, 29 Jun 2024 08:00:43 -0400
Subject: [PATCH 37/70] Drop CodeQL
It now requires an API key and a login to view reports
---
README.md | 1 -
1 file changed, 1 deletion(-)
diff --git a/README.md b/README.md
index 6ad95c8878..3606012160 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,6 @@ Apache Commons Codec
[](https://app.codecov.io/gh/apache/commons-codec)
[](https://maven-badges.herokuapp.com/maven-central/commons-codec/commons-codec/?gav=true)
[](https://javadoc.io/doc/commons-codec/commons-codec/1.17.0)
-[](https://github.com/apache/commons-codec/actions/workflows/codeql-analysis.yml)
[](https://api.securityscorecards.dev/projects/github.com/apache/commons-codec)
The Apache Commons Codec component contains encoder and decoders for
From c214d8ab3abe70bc834074d3828ed94562755757 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Sat, 29 Jun 2024 08:10:13 -0400
Subject: [PATCH 38/70] Drop CodeQL
- It now requires an API key and a login to view reports
- Instead, use 'mvn clean install site -P jacoco' to view JaCoCo HTML
reports
---
.github/workflows/codeql-analysis.yml | 85 ---------------------------
1 file changed, 85 deletions(-)
delete mode 100644 .github/workflows/codeql-analysis.yml
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
deleted file mode 100644
index 9037d5100d..0000000000
--- a/.github/workflows/codeql-analysis.yml
+++ /dev/null
@@ -1,85 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-name: "CodeQL"
-
-on:
- push:
- branches: [ master ]
- pull_request:
- # The branches below must be a subset of the branches above
- branches: [ master ]
- schedule:
- - cron: '33 9 * * 4'
-
-permissions:
- contents: read
-
-jobs:
- analyze:
- name: Analyze
- runs-on: ubuntu-latest
- permissions:
- actions: read
- contents: read
- security-events: write
-
- strategy:
- fail-fast: false
- matrix:
- language: [ 'java' ]
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
- # Learn more about CodeQL language support at https://git.io/codeql-language-support
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
- with:
- persist-credentials: false
- - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-maven-
-
- # Initializes the CodeQL tools for scanning.
- - name: Initialize CodeQL
- uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # 3.25.11
- with:
- languages: ${{ matrix.language }}
- # If you wish to specify custom queries, you can do so here or in a config file.
- # By default, queries listed here will override any specified in a config file.
- # Prefix the list here with "+" to use these queries and those in the config file.
- # queries: ./path/to/local/query, your-org/your-repo/queries@main
-
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
- # If this step fails, then you should remove it and run the build manually (see below)
- - name: Autobuild
- uses: github/codeql-action/autobuild@b611370bb5703a7efb587f9d136a52ea24c5c38c # 3.25.11
-
- # âšī¸ Command-line programs to run using the OS shell.
- # đ https://git.io/JvXDl
-
- # âī¸ If the Autobuild fails above, remove it and uncomment the following three lines
- # and modify them (or add more) to build your code if your project
- # uses a compiled language
-
- #- run: |
- # make bootstrap
- # make release
-
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # 3.25.11
From 18fc7ca485500bd128f4344d258c8808cce5b1ba Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Sat, 29 Jun 2024 10:46:38 -0400
Subject: [PATCH 39/70] Revert "Drop CodeQL"
This reverts commit c214d8ab3abe70bc834074d3828ed94562755757.
---
.github/workflows/codeql-analysis.yml | 85 +++++++++++++++++++++++++++
1 file changed, 85 insertions(+)
create mode 100644 .github/workflows/codeql-analysis.yml
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
new file mode 100644
index 0000000000..9037d5100d
--- /dev/null
+++ b/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,85 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ master ]
+ schedule:
+ - cron: '33 9 * * 4'
+
+permissions:
+ contents: read
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [ 'java' ]
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
+ # Learn more about CodeQL language support at https://git.io/codeql-language-support
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
+ with:
+ persist-credentials: false
+ - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
+ with:
+ path: ~/.m2/repository
+ key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+ restore-keys: |
+ ${{ runner.os }}-maven-
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # 3.25.11
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a config file.
+ # By default, queries listed here will override any specified in a config file.
+ # Prefix the list here with "+" to use these queries and those in the config file.
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
+
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
+ # If this step fails, then you should remove it and run the build manually (see below)
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@b611370bb5703a7efb587f9d136a52ea24c5c38c # 3.25.11
+
+ # âšī¸ Command-line programs to run using the OS shell.
+ # đ https://git.io/JvXDl
+
+ # âī¸ If the Autobuild fails above, remove it and uncomment the following three lines
+ # and modify them (or add more) to build your code if your project
+ # uses a compiled language
+
+ #- run: |
+ # make bootstrap
+ # make release
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # 3.25.11
From f2e8ca55554982880af77ad7eb1fba56f4fc25f1 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Sat, 29 Jun 2024 10:46:38 -0400
Subject: [PATCH 40/70] Revert "Drop CodeQL"
This reverts commit b9b28069035c3d012d862b7034c10f09011e118b.
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index 3606012160..6ad95c8878 100644
--- a/README.md
+++ b/README.md
@@ -47,6 +47,7 @@ Apache Commons Codec
[](https://app.codecov.io/gh/apache/commons-codec)
[](https://maven-badges.herokuapp.com/maven-central/commons-codec/commons-codec/?gav=true)
[](https://javadoc.io/doc/commons-codec/commons-codec/1.17.0)
+[](https://github.com/apache/commons-codec/actions/workflows/codeql-analysis.yml)
[](https://api.securityscorecards.dev/projects/github.com/apache/commons-codec)
The Apache Commons Codec component contains encoder and decoders for
From dfe6d45ffb3d80977fda17eecd6fb974ba96e0b7 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Sat, 29 Jun 2024 14:23:20 -0400
Subject: [PATCH 41/70] Drop codecov.io
- It now requires an API key and a login to view reports
- Instead, use 'mvn clean install site -P jacoco' to view JaCoCo HTML
reports
---
.github/workflows/coverage.yml | 52 ----------------------------------
README.md | 1 -
2 files changed, 53 deletions(-)
delete mode 100644 .github/workflows/coverage.yml
diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
deleted file mode 100644
index da7f56f544..0000000000
--- a/.github/workflows/coverage.yml
+++ /dev/null
@@ -1,52 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-name: Coverage
-
-on: [push, pull_request]
-
-permissions:
- contents: read
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
- strategy:
- matrix:
- java: [ 8 ]
-
- steps:
- - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
- with:
- persist-credentials: false
- - uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
- with:
- path: ~/.m2/repository
- key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- restore-keys: |
- ${{ runner.os }}-maven-
- - name: Set up JDK ${{ matrix.java }}
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
- with:
- distribution: 'temurin'
- java-version: ${{ matrix.java }}
- - name: Build with Maven
- run: mvn --show-version --batch-mode --no-transfer-progress test jacoco:report
-
- - name: Upload coverage to Codecov
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
- with:
- files: ./target/site/jacoco/jacoco.xml
diff --git a/README.md b/README.md
index 6ad95c8878..21e88e3d2f 100644
--- a/README.md
+++ b/README.md
@@ -44,7 +44,6 @@ Apache Commons Codec
===================
[](https://github.com/apache/commons-codec/actions/workflows/maven.yml)
-[](https://app.codecov.io/gh/apache/commons-codec)
[](https://maven-badges.herokuapp.com/maven-central/commons-codec/commons-codec/?gav=true)
[](https://javadoc.io/doc/commons-codec/commons-codec/1.17.0)
[](https://github.com/apache/commons-codec/actions/workflows/codeql-analysis.yml)
From b9824fc17cbec4bcedd11121c66c1e8d4a6aba95 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 5 Jul 2024 18:02:26 -0400
Subject: [PATCH 42/70] Bump org.codehaus.mojo:animal-sniffer-maven-plugin from
1.23 to 1.24 (#293)
Bumps [org.codehaus.mojo:animal-sniffer-maven-plugin](https://github.com/mojohaus/animal-sniffer) from 1.23 to 1.24.
- [Release notes](https://github.com/mojohaus/animal-sniffer/releases)
- [Commits](https://github.com/mojohaus/animal-sniffer/compare/1.23...animal-sniffer-1.24)
---
updated-dependencies:
- dependency-name: org.codehaus.mojo:animal-sniffer-maven-plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index c6afb11ffb..52c93d3939 100644
--- a/pom.xml
+++ b/pom.xml
@@ -208,7 +208,7 @@ limitations under the License.
org.codehaus.mojo
animal-sniffer-maven-plugin
- 1.23
+ 1.24
From 95534ab5c16823a50ec66bfe610739a0f329ed1b Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Fri, 5 Jul 2024 18:03:04 -0400
Subject: [PATCH 43/70] Bump org.codehaus.mojo:animal-sniffer-maven-plugin from
1.23 to 1.24 #293
---
src/changes/changes.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 98e7d80948..9b5ed88444 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -69,6 +69,7 @@ The type attribute can be add,update,fix,remove.
Bump org.apache.commons:commons-parent from 66 to 69 #250, #261.
Bump commons-io:commons-io from 2.15.1 to 2.16.1 #258, #265.
+ Bump org.codehaus.mojo:animal-sniffer-maven-plugin from 1.23 to 1.24 #293.
From f6303c5b7c796a75b10ddd0264786bb588aaad86 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 5 Jul 2024 18:03:14 -0400
Subject: [PATCH 44/70] Bump org.codehaus.mojo:taglist-maven-plugin from 3.0.0
to 3.1.0 (#292)
Bumps [org.codehaus.mojo:taglist-maven-plugin](https://github.com/mojohaus/taglist-maven-plugin) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/mojohaus/taglist-maven-plugin/releases)
- [Commits](https://github.com/mojohaus/taglist-maven-plugin/compare/taglist-maven-plugin-3.0.0...3.1.0)
---
updated-dependencies:
- dependency-name: org.codehaus.mojo:taglist-maven-plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 52c93d3939..255061b36c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -263,7 +263,7 @@ limitations under the License.
org.codehaus.mojo
taglist-maven-plugin
- 3.0.0
+ 3.1.0
TODO
From 430d1ed2c363f5ff5efea9bbd92aefa659a5896b Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Fri, 5 Jul 2024 18:03:52 -0400
Subject: [PATCH 45/70] Bump org.codehaus.mojo:taglist-maven-plugin from 3.0.0
to 3.1.0 #292
---
src/changes/changes.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 9b5ed88444..cec1232621 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -49,6 +49,8 @@ The type attribute can be add,update,fix,remove.
Bump org.apache.commons:commons-parent from 69 to 71 #286.
+ Bump org.codehaus.mojo:animal-sniffer-maven-plugin from 1.23 to 1.24 #293.
+ Bump org.codehaus.mojo:taglist-maven-plugin from 3.0.0 to 3.1.0 #292.
@@ -69,7 +71,6 @@ The type attribute can be add,update,fix,remove.
Bump org.apache.commons:commons-parent from 66 to 69 #250, #261.
Bump commons-io:commons-io from 2.15.1 to 2.16.1 #258, #265.
- Bump org.codehaus.mojo:animal-sniffer-maven-plugin from 1.23 to 1.24 #293.
From 17e9b6f98161aefae40922d24509625c120a0b78 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:25 -0400
Subject: [PATCH 46/70] Remove redundant keywords
---
src/main/java/org/apache/commons/codec/binary/Hex.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/codec/binary/Hex.java b/src/main/java/org/apache/commons/codec/binary/Hex.java
index dc6d0806b6..7db25d5cde 100644
--- a/src/main/java/org/apache/commons/codec/binary/Hex.java
+++ b/src/main/java/org/apache/commons/codec/binary/Hex.java
@@ -480,7 +480,7 @@ public Object decode(final Object object) throws DecoderException {
*/
@Override
public byte[] encode(final byte[] array) {
- return encodeHexString(array).getBytes(this.getCharset());
+ return encodeHexString(array).getBytes(getCharset());
}
/**
@@ -500,7 +500,7 @@ public byte[] encode(final byte[] array) {
* @since 1.11
*/
public byte[] encode(final ByteBuffer array) {
- return encodeHexString(array).getBytes(this.getCharset());
+ return encodeHexString(array).getBytes(getCharset());
}
/**
@@ -521,7 +521,7 @@ public byte[] encode(final ByteBuffer array) {
public Object encode(final Object object) throws EncoderException {
final byte[] byteArray;
if (object instanceof String) {
- byteArray = ((String) object).getBytes(this.getCharset());
+ byteArray = ((String) object).getBytes(getCharset());
} else if (object instanceof ByteBuffer) {
byteArray = toByteArray((ByteBuffer) object);
} else {
From 2ba905517125a7d4fc3f65b37848b63eb275a943 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:26 -0400
Subject: [PATCH 47/70] Remove redundant keywords
---
.../java/org/apache/commons/codec/language/Caverphone.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/codec/language/Caverphone.java b/src/main/java/org/apache/commons/codec/language/Caverphone.java
index 8a00fd1ef7..3bb0d45d0d 100644
--- a/src/main/java/org/apache/commons/codec/language/Caverphone.java
+++ b/src/main/java/org/apache/commons/codec/language/Caverphone.java
@@ -66,7 +66,7 @@ public Object encode(final Object obj) throws EncoderException {
if (!(obj instanceof String)) {
throw new EncoderException("Parameter supplied to Caverphone encode is not of type java.lang.String");
}
- return this.caverphone((String) obj);
+ return caverphone((String) obj);
}
/**
@@ -78,7 +78,7 @@ public Object encode(final Object obj) throws EncoderException {
*/
@Override
public String encode(final String str) {
- return this.caverphone(str);
+ return caverphone(str);
}
/**
@@ -91,7 +91,7 @@ public String encode(final String str) {
* @return {@code true} if the caverphones of these strings are identical, {@code false} otherwise.
*/
public boolean isCaverphoneEqual(final String str1, final String str2) {
- return this.caverphone(str1).equals(this.caverphone(str2));
+ return caverphone(str1).equals(caverphone(str2));
}
}
From c7df2078afd071102b0337f5d4f4f152aa5c1401 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:27 -0400
Subject: [PATCH 48/70] Remove redundant keywords
---
.../commons/codec/language/Metaphone.java | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/src/main/java/org/apache/commons/codec/language/Metaphone.java b/src/main/java/org/apache/commons/codec/language/Metaphone.java
index 8e0d38dc37..ed63126953 100644
--- a/src/main/java/org/apache/commons/codec/language/Metaphone.java
+++ b/src/main/java/org/apache/commons/codec/language/Metaphone.java
@@ -213,11 +213,10 @@ public String metaphone(final String txt) {
final int wdsz = local.length();
int n = 0;
- while (code.length() < this.getMaxCodeLen() && n < wdsz) { // max code size of 4 works well
+ while (code.length() < getMaxCodeLen() && n < wdsz) { // max code size of 4 works well
final char symb = local.charAt(n);
// remove duplicate letters except C
if (symb != 'C' && isPreviousChar(local, n, symb)) {
- n++;
} else { // not dup
switch (symb) {
case 'A':
@@ -252,14 +251,10 @@ public String metaphone(final String txt) {
code.append('K');
break;
}
- if (isNextChar(local, n, 'H')) { // detect CH
- if (n == 0 && wdsz >= 3 && isVowel(local, 2)) { // CH consonant -> K consonant
- code.append('K');
- } else {
- code.append('X'); // CHvowel -> X
- }
- } else {
+ if (!isNextChar(local, n, 'H') || (n == 0 && wdsz >= 3 && isVowel(local, 2))) { // CH consonant -> K consonant
code.append('K');
+ } else {
+ code.append('X'); // CHvowel -> X
}
break;
case 'D':
@@ -370,10 +365,10 @@ public String metaphone(final String txt) {
// do nothing
break;
} // end switch
- n++;
} // end else from symb != 'C'
- if (code.length() > this.getMaxCodeLen()) {
- code.setLength(this.getMaxCodeLen());
+ n++;
+ if (code.length() > getMaxCodeLen()) {
+ code.setLength(getMaxCodeLen());
}
}
return code.toString();
From c07d6a49d5b62b4a370ec57d89235fc21004c25a Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:27 -0400
Subject: [PATCH 49/70] Remove redundant keywords
---
src/main/java/org/apache/commons/codec/language/Nysiis.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/codec/language/Nysiis.java b/src/main/java/org/apache/commons/codec/language/Nysiis.java
index 10b4a8f08c..f33b7ce156 100644
--- a/src/main/java/org/apache/commons/codec/language/Nysiis.java
+++ b/src/main/java/org/apache/commons/codec/language/Nysiis.java
@@ -214,7 +214,7 @@ public Object encode(final Object obj) throws EncoderException {
if (!(obj instanceof String)) {
throw new EncoderException("Parameter supplied to Nysiis encode is not of type java.lang.String");
}
- return this.nysiis((String) obj);
+ return nysiis((String) obj);
}
/**
@@ -228,7 +228,7 @@ public Object encode(final Object obj) throws EncoderException {
*/
@Override
public String encode(final String str) {
- return this.nysiis(str);
+ return nysiis(str);
}
/**
@@ -316,7 +316,7 @@ public String nysiis(String str) {
}
final String string = key.toString();
- return this.isStrict() ? string.substring(0, Math.min(TRUE_LENGTH, string.length())) : string;
+ return isStrict() ? string.substring(0, Math.min(TRUE_LENGTH, string.length())) : string;
}
}
From e145a0ae6e0ce48cbd0e393c0d4102a92d4b3562 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:28 -0400
Subject: [PATCH 50/70] Remove redundant keywords
---
.../java/org/apache/commons/codec/net/QuotedPrintableCodec.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/commons/codec/net/QuotedPrintableCodec.java b/src/main/java/org/apache/commons/codec/net/QuotedPrintableCodec.java
index 6dd8007723..86d2e89501 100644
--- a/src/main/java/org/apache/commons/codec/net/QuotedPrintableCodec.java
+++ b/src/main/java/org/apache/commons/codec/net/QuotedPrintableCodec.java
@@ -448,7 +448,7 @@ public Object decode(final Object obj) throws DecoderException {
*/
@Override
public String decode(final String sourceStr) throws DecoderException {
- return this.decode(sourceStr, this.getCharset());
+ return this.decode(sourceStr, getCharset());
}
/**
From 982ee0300d1578d76709762b144ee576408bb35d Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:28 -0400
Subject: [PATCH 51/70] Remove redundant keywords
---
src/main/java/org/apache/commons/codec/net/RFC1522Codec.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/codec/net/RFC1522Codec.java b/src/main/java/org/apache/commons/codec/net/RFC1522Codec.java
index 39064c52a6..a77548d983 100644
--- a/src/main/java/org/apache/commons/codec/net/RFC1522Codec.java
+++ b/src/main/java/org/apache/commons/codec/net/RFC1522Codec.java
@@ -155,9 +155,9 @@ protected String encodeText(final String text, final Charset charset) throws Enc
buffer.append(PREFIX);
buffer.append(charset);
buffer.append(SEP);
- buffer.append(this.getEncoding());
+ buffer.append(getEncoding());
buffer.append(SEP);
- buffer.append(StringUtils.newStringUsAscii(this.doEncoding(text.getBytes(charset))));
+ buffer.append(StringUtils.newStringUsAscii(doEncoding(text.getBytes(charset))));
buffer.append(POSTFIX);
return buffer.toString();
}
From 93271116f6636d6a4a216a73f7d0d1475ab6acd8 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:29 -0400
Subject: [PATCH 52/70] Remove redundant keywords
---
.../java/org/apache/commons/codec/binary/Base16Test.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/test/java/org/apache/commons/codec/binary/Base16Test.java b/src/test/java/org/apache/commons/codec/binary/Base16Test.java
index b01046c449..5b1a1a4dc7 100644
--- a/src/test/java/org/apache/commons/codec/binary/Base16Test.java
+++ b/src/test/java/org/apache/commons/codec/binary/Base16Test.java
@@ -224,9 +224,9 @@ public void testEmptyBase16() {
@Test
public void testEncodeDecodeRandom() {
for (int i = 1; i < 5; i++) {
- final int len = this.getRandom().nextInt(10000) + 1;
+ final int len = getRandom().nextInt(10000) + 1;
final byte[] data = new byte[len];
- this.getRandom().nextBytes(data);
+ getRandom().nextBytes(data);
final byte[] enc = new Base16().encode(data);
final byte[] data2 = new Base16().decode(enc);
assertArrayEquals(data, data2);
@@ -238,7 +238,7 @@ public void testEncodeDecodeRandom() {
public void testEncodeDecodeSmall() {
for (int i = 0; i < 12; i++) {
final byte[] data = new byte[i];
- this.getRandom().nextBytes(data);
+ getRandom().nextBytes(data);
final byte[] enc = new Base16().encode(data);
final byte[] data2 = new Base16().decode(enc);
assertArrayEquals(data, data2, toString(data) + " equals " + toString(data2));
From 146b0d82e57e4bf2bf484923103852fc7bed10cd Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:29 -0400
Subject: [PATCH 53/70] Remove redundant keywords
---
.../java/org/apache/commons/codec/binary/Base64Test.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/test/java/org/apache/commons/codec/binary/Base64Test.java b/src/test/java/org/apache/commons/codec/binary/Base64Test.java
index e96e9fa790..11e2946c57 100644
--- a/src/test/java/org/apache/commons/codec/binary/Base64Test.java
+++ b/src/test/java/org/apache/commons/codec/binary/Base64Test.java
@@ -636,8 +636,8 @@ private void testEncodeDecode(final String plainText) {
@Test
public void testEncodeDecodeRandom() {
for (int i = 1; i < 5; i++) {
- final byte[] data = new byte[this.getRandom().nextInt(10000) + 1];
- this.getRandom().nextBytes(data);
+ final byte[] data = new byte[getRandom().nextInt(10000) + 1];
+ getRandom().nextBytes(data);
final byte[] enc = Base64.encodeBase64(data);
assertTrue(Base64.isBase64(enc));
final byte[] data2 = Base64.decodeBase64(enc);
@@ -650,7 +650,7 @@ public void testEncodeDecodeRandom() {
public void testEncodeDecodeSmall() {
for (int i = 0; i < 12; i++) {
final byte[] data = new byte[i];
- this.getRandom().nextBytes(data);
+ getRandom().nextBytes(data);
final byte[] enc = Base64.encodeBase64(data);
assertTrue(Base64.isBase64(enc), "\"" + new String(enc) + "\" is Base64 data.");
final byte[] data2 = Base64.decodeBase64(enc);
From 0dfbc98bd6712f3fa2b30191869ccb2bbe3c3dd6 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:30 -0400
Subject: [PATCH 54/70] Remove redundant keywords
---
.../apache/commons/codec/language/Caverphone1Test.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/test/java/org/apache/commons/codec/language/Caverphone1Test.java b/src/test/java/org/apache/commons/codec/language/Caverphone1Test.java
index 059f7d1c46..d359fd0040 100644
--- a/src/test/java/org/apache/commons/codec/language/Caverphone1Test.java
+++ b/src/test/java/org/apache/commons/codec/language/Caverphone1Test.java
@@ -43,7 +43,7 @@ protected Caverphone1 createStringEncoder() {
*/
@Test
public void testCaverphoneRevisitedCommonCodeAT1111() throws EncoderException {
- this.checkEncodingVariations("AT1111", new String[]{
+ checkEncodingVariations("AT1111", new String[]{
"add",
"aid",
"at",
@@ -64,7 +64,7 @@ public void testCaverphoneRevisitedCommonCodeAT1111() throws EncoderException {
@Test
public void testEndMb() throws EncoderException {
final String[][] data = {{"mb", "M11111"}, {"mbmb", "MPM111"}};
- this.checkEncodings(data);
+ checkEncodings(data);
}
/**
@@ -87,7 +87,7 @@ public void testIsCaverphoneEquals() throws EncoderException {
@Test
public void testSpecificationV1Examples() throws EncoderException {
final String[][] data = {{"David", "TFT111"}, {"Whittle", "WTL111"}};
- this.checkEncodings(data);
+ checkEncodings(data);
}
/**
@@ -98,7 +98,7 @@ public void testSpecificationV1Examples() throws EncoderException {
@Test
public void testWikipediaExamples() throws EncoderException {
final String[][] data = {{"Lee", "L11111"}, {"Thompson", "TMPSN1"}};
- this.checkEncodings(data);
+ checkEncodings(data);
}
}
From d6a6bc7fe25375bb5b22555763f95b1d58999100 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:30 -0400
Subject: [PATCH 55/70] Remove redundant keywords
---
.../codec/language/Caverphone2Test.java | 20 +++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/test/java/org/apache/commons/codec/language/Caverphone2Test.java b/src/test/java/org/apache/commons/codec/language/Caverphone2Test.java
index 067b357a95..12172261f4 100644
--- a/src/test/java/org/apache/commons/codec/language/Caverphone2Test.java
+++ b/src/test/java/org/apache/commons/codec/language/Caverphone2Test.java
@@ -42,7 +42,7 @@ protected Caverphone2 createStringEncoder() {
* @throws EncoderException for some failure scenarios */
@Test
public void testCaverphoneRevisitedCommonCodeAT11111111() throws EncoderException {
- this.checkEncodingVariations("AT11111111", new String[]{
+ checkEncodingVariations("AT11111111", new String[]{
"add",
"aid",
"at",
@@ -67,7 +67,7 @@ public void testCaverphoneRevisitedCommonCodeAT11111111() throws EncoderExceptio
@Test
public void testCaverphoneRevisitedExamples() throws EncoderException {
final String[][] data = {{"Stevenson", "STFNSN1111"}, {"Peter", "PTA1111111"}};
- this.checkEncodings(data);
+ checkEncodings(data);
}
/**
@@ -76,7 +76,7 @@ public void testCaverphoneRevisitedExamples() throws EncoderException {
* @throws EncoderException for some failure scenarios */
@Test
public void testCaverphoneRevisitedRandomNameKLN1111111() throws EncoderException {
- this.checkEncodingVariations("KLN1111111", new String[]{
+ checkEncodingVariations("KLN1111111", new String[]{
"Cailean",
"Calan",
"Calen",
@@ -167,7 +167,7 @@ public void testCaverphoneRevisitedRandomNameKLN1111111() throws EncoderExceptio
* @throws EncoderException for some failure scenarios */
@Test
public void testCaverphoneRevisitedRandomNameTN11111111() throws EncoderException {
- this.checkEncodingVariations("TN11111111", new String[]{
+ checkEncodingVariations("TN11111111", new String[]{
"Dan",
"Dane",
"Dann",
@@ -245,7 +245,7 @@ public void testCaverphoneRevisitedRandomNameTN11111111() throws EncoderExceptio
* @throws EncoderException for some failure scenarios */
@Test
public void testCaverphoneRevisitedRandomNameTTA1111111() throws EncoderException {
- this.checkEncodingVariations("TTA1111111", new String[]{
+ checkEncodingVariations("TTA1111111", new String[]{
"Darda",
"Datha",
"Dedie",
@@ -322,15 +322,15 @@ public void testCaverphoneRevisitedRandomNameTTA1111111() throws EncoderExceptio
* @throws EncoderException for some failure scenarios */
@Test
public void testCaverphoneRevisitedRandomWords() throws EncoderException {
- this.checkEncodingVariations("RTA1111111", new String[]{"rather", "ready", "writer"});
- this.checkEncoding("SSA1111111", "social");
- this.checkEncodingVariations("APA1111111", new String[]{"able", "appear"});
+ checkEncodingVariations("RTA1111111", new String[]{"rather", "ready", "writer"});
+ checkEncoding("SSA1111111", "social");
+ checkEncodingVariations("APA1111111", new String[]{"able", "appear"});
}
@Test
public void testEndMb() throws EncoderException {
final String[][] data = {{"mb", "M111111111"}, {"mbmb", "MPM1111111"}};
- this.checkEncodings(data);
+ checkEncodings(data);
}
// Caverphone Revisited
@@ -351,7 +351,7 @@ public void testSpecificationExamples() throws EncoderException {
{"Tedder", "TTA1111111"},
{"Karleen", "KLN1111111"},
{"Dyun", "TN11111111"}};
- this.checkEncodings(data);
+ checkEncodings(data);
}
}
From 6517ed1e4aa38f98caef917c80bd30214b529a4c Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:31 -0400
Subject: [PATCH 56/70] Remove redundant keywords
---
.../codec/language/ColognePhoneticTest.java | 22 +++++++++----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/src/test/java/org/apache/commons/codec/language/ColognePhoneticTest.java b/src/test/java/org/apache/commons/codec/language/ColognePhoneticTest.java
index 3578a6b7b2..c14ec97d2f 100644
--- a/src/test/java/org/apache/commons/codec/language/ColognePhoneticTest.java
+++ b/src/test/java/org/apache/commons/codec/language/ColognePhoneticTest.java
@@ -114,12 +114,12 @@ protected ColognePhonetic createStringEncoder() {
@Test
public void testAabjoe() throws EncoderException {
- this.checkEncoding("01", "Aabjoe");
+ checkEncoding("01", "Aabjoe");
}
@Test
public void testAaclan() throws EncoderException {
- this.checkEncoding("0856", "Aaclan");
+ checkEncoding("0856", "Aaclan");
}
/**
@@ -129,13 +129,13 @@ public void testAaclan() throws EncoderException {
*/
@Test
public void testAychlmajrForCodec122() throws EncoderException {
- this.checkEncoding("04567", "Aychlmajr");
+ checkEncoding("04567", "Aychlmajr");
}
@Test
// Ensure that override still allows tests to work
public void testCanFail() {
- assertThrows(AssertionFailedError.class, () -> this.checkEncoding("/", "Fehler"));
+ assertThrows(AssertionFailedError.class, () -> checkEncoding("/", "Fehler"));
}
@Test
@@ -175,7 +175,7 @@ public void testEdgeCases() throws EncoderException {
{ "r", "7" }
};
// @formatter:on
- this.checkEncodings(data);
+ checkEncodings(data);
}
@Test
@@ -218,13 +218,13 @@ public void testExamples() throws EncoderException {
{ "heithabu", "021" }
};
// @formatter:on
- this.checkEncodings(data);
+ checkEncodings(data);
}
@Test
public void testHyphen() throws EncoderException {
final String[][] data = { { "bergisch-gladbach", "174845214" }, { "M\u00fcller-L\u00fcdenscheidt", "65752682" } }; // MÃŧller-LÃŧdenscheidt
- this.checkEncodings(data);
+ checkEncodings(data);
}
@Test
@@ -242,7 +242,7 @@ public void testIsEncodeEquals() {
};
//@formatter:on
for (final String[] element : data) {
- final boolean encodeEqual = this.getStringEncoder().isEncodeEqual(element[1], element[0]);
+ final boolean encodeEqual = getStringEncoder().isEncodeEqual(element[1], element[0]);
assertTrue(encodeEqual, element[1] + " != " + element[0]);
}
}
@@ -250,18 +250,18 @@ public void testIsEncodeEquals() {
@Test
public void testSpecialCharsBetweenSameLetters() throws EncoderException {
final String[] data = { "Test test", "Testtest", "Test-test", "TesT#Test", "TesT?test" };
- this.checkEncodingVariations("28282", data);
+ checkEncodingVariations("28282", data);
}
@Test
public void testVariationsMella() throws EncoderException {
final String[] data = { "mella", "milah", "moulla", "mellah", "muehle", "mule" };
- this.checkEncodingVariations("65", data);
+ checkEncodingVariations("65", data);
}
@Test
public void testVariationsMeyer() throws EncoderException {
final String[] data = { "Meier", "Maier", "Mair", "Meyer", "Meyr", "Mejer", "Major" };
- this.checkEncodingVariations("67", data);
+ checkEncodingVariations("67", data);
}
}
From a54c0e63a39da406fdc5a904fbae4979b1978c81 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:32 -0400
Subject: [PATCH 57/70] Remove redundant keywords
---
.../commons/codec/language/DaitchMokotoffSoundexTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/test/java/org/apache/commons/codec/language/DaitchMokotoffSoundexTest.java b/src/test/java/org/apache/commons/codec/language/DaitchMokotoffSoundexTest.java
index a52cc80011..7d749abbbc 100644
--- a/src/test/java/org/apache/commons/codec/language/DaitchMokotoffSoundexTest.java
+++ b/src/test/java/org/apache/commons/codec/language/DaitchMokotoffSoundexTest.java
@@ -81,7 +81,7 @@ public void testEncodeBasic() {
@Test
public void testEncodeIgnoreApostrophes() throws EncoderException {
- this.checkEncodingVariations("079600", new String[] { "OBrien", "'OBrien", "O'Brien", "OB'rien", "OBr'ien",
+ checkEncodingVariations("079600", new String[] { "OBrien", "'OBrien", "O'Brien", "OB'rien", "OBr'ien",
"OBri'en", "OBrie'n", "OBrien'" });
}
@@ -91,7 +91,7 @@ public void testEncodeIgnoreApostrophes() throws EncoderException {
* @throws EncoderException for some failure scenarios */
@Test
public void testEncodeIgnoreHyphens() throws EncoderException {
- this.checkEncodingVariations("565463", new String[] { "KINGSMITH", "-KINGSMITH", "K-INGSMITH", "KI-NGSMITH",
+ checkEncodingVariations("565463", new String[] { "KINGSMITH", "-KINGSMITH", "K-INGSMITH", "KI-NGSMITH",
"KIN-GSMITH", "KING-SMITH", "KINGS-MITH", "KINGSM-ITH", "KINGSMI-TH", "KINGSMIT-H", "KINGSMITH-" });
}
From 9f1d2c4a73f6d3b7c5357121ba8349b04fdc4e20 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:32 -0400
Subject: [PATCH 58/70] Remove redundant keywords
---
.../apache/commons/codec/language/DoubleMetaphone2Test.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/test/java/org/apache/commons/codec/language/DoubleMetaphone2Test.java b/src/test/java/org/apache/commons/codec/language/DoubleMetaphone2Test.java
index b64fdbe9bc..29bcf7ed59 100644
--- a/src/test/java/org/apache/commons/codec/language/DoubleMetaphone2Test.java
+++ b/src/test/java/org/apache/commons/codec/language/DoubleMetaphone2Test.java
@@ -1263,7 +1263,7 @@ public class DoubleMetaphone2Test extends AbstractStringEncoderTest< TEST_DATA.length; i++) {
final String value = TEST_DATA[i][0];
- assertEquals(TEST_DATA[i][typeIndex], this.getStringEncoder().doubleMetaphone(value, alternate), "Test [" + i + "]=" + value);
+ assertEquals(TEST_DATA[i][typeIndex], getStringEncoder().doubleMetaphone(value, alternate), "Test [" + i + "]=" + value);
}
}
@@ -1277,7 +1277,7 @@ protected DoubleMetaphone createStringEncoder() {
*/
@Test
public void testDoubleMetaphoneAlternate() {
- this.checkDoubleMetaphone(ALTERNATE_INDEX, true);
+ checkDoubleMetaphone(ALTERNATE_INDEX, true);
}
/**
@@ -1285,6 +1285,6 @@ public void testDoubleMetaphoneAlternate() {
*/
@Test
public void testDoubleMetaphonePrimary() {
- this.checkDoubleMetaphone(PRIMARY_INDEX, false);
+ checkDoubleMetaphone(PRIMARY_INDEX, false);
}
}
From 9bcb651b24698fd8af6ec9eba3a2e5897e8c8dd0 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:33 -0400
Subject: [PATCH 59/70] Remove redundant keywords
---
.../codec/language/DoubleMetaphoneTest.java | 52 +++++++++----------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/src/test/java/org/apache/commons/codec/language/DoubleMetaphoneTest.java b/src/test/java/org/apache/commons/codec/language/DoubleMetaphoneTest.java
index 0efcfb85b8..603980f440 100644
--- a/src/test/java/org/apache/commons/codec/language/DoubleMetaphoneTest.java
+++ b/src/test/java/org/apache/commons/codec/language/DoubleMetaphoneTest.java
@@ -1008,21 +1008,21 @@ public class DoubleMetaphoneTest extends AbstractStringEncoderTest< FIXTURE.length; i++) {
final String name0 = FIXTURE[i][0];
final String name1 = FIXTURE[i][1];
- final boolean match1 = this.getStringEncoder().isDoubleMetaphoneEqual(name0, name1, false);
- final boolean match2 = this.getStringEncoder().isDoubleMetaphoneEqual(name0, name1, true);
+ final boolean match1 = getStringEncoder().isDoubleMetaphoneEqual(name0, name1, false);
+ final boolean match2 = getStringEncoder().isDoubleMetaphoneEqual(name0, name1, true);
if (!match1 && !match2) {
final String failMsg = "[" + i + "] " + name0 + " and " + name1 + cr;
failures.append(failMsg);
@@ -1199,12 +1199,12 @@ public void testIsDoubleMetaphoneEqualExtended3() {
@Test
public void testIsDoubleMetaphoneEqualWithMATCHES() {
- this.validateFixture(MATCHES);
+ validateFixture(MATCHES);
for (int i = 0; i < MATCHES.length; i++) {
final String name0 = MATCHES[i][0];
final String name1 = MATCHES[i][1];
- final boolean match1 = this.getStringEncoder().isDoubleMetaphoneEqual(name0, name1, false);
- final boolean match2 = this.getStringEncoder().isDoubleMetaphoneEqual(name0, name1, true);
+ final boolean match1 = getStringEncoder().isDoubleMetaphoneEqual(name0, name1, false);
+ final boolean match2 = getStringEncoder().isDoubleMetaphoneEqual(name0, name1, true);
if (!match1 && !match2) {
fail("Expected match [" + i + "] " + name0 + " and " + name1);
}
@@ -1219,7 +1219,7 @@ public void testIsDoubleMetaphoneNotEqual() {
@Test
public void testNTilde() {
- assertTrue(this.getStringEncoder().isDoubleMetaphoneEqual("\u00f1", "N")); // n-tilde
+ assertTrue(getStringEncoder().isDoubleMetaphoneEqual("\u00f1", "N")); // n-tilde
}
/**
From 9b825364d420fc63438ed14e323163d5d2339960 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:34 -0400
Subject: [PATCH 60/70] Remove redundant keywords
---
.../MatchRatingApproachEncoderTest.java | 186 +++++++++---------
1 file changed, 93 insertions(+), 93 deletions(-)
diff --git a/src/test/java/org/apache/commons/codec/language/MatchRatingApproachEncoderTest.java b/src/test/java/org/apache/commons/codec/language/MatchRatingApproachEncoderTest.java
index cf8c6e2441..dd61a1f804 100644
--- a/src/test/java/org/apache/commons/codec/language/MatchRatingApproachEncoderTest.java
+++ b/src/test/java/org/apache/commons/codec/language/MatchRatingApproachEncoderTest.java
@@ -42,252 +42,252 @@ protected MatchRatingApproachEncoder createStringEncoder() {
@Test
public final void testAccentRemoval_AllLower_SuccessfullyRemoved() {
- assertEquals("aeiou", this.getStringEncoder().removeAccents("ÃĄÃŠÃÃŗÃē"));
+ assertEquals("aeiou", getStringEncoder().removeAccents("ÃĄÃŠÃÃŗÃē"));
}
@Test
public final void testAccentRemoval_ComprehensiveAccentMix_AllSuccessfullyRemoved() {
- assertEquals("E,E,E,E,U,U,I,I,A,A,O,e,e,e,e,u,u,i,i,a,a,o,c", this.getStringEncoder().removeAccents("Ã,Ã,Ã,Ã,Ã,Ã,Ã,Ã,Ã,Ã,Ã,è,Ê,ÃĒ,ÃĢ,Ãģ,Ú,ï,ÃŽ,à ,Ãĸ,ô,ç"));
+ assertEquals("E,E,E,E,U,U,I,I,A,A,O,e,e,e,e,u,u,i,i,a,a,o,c", getStringEncoder().removeAccents("Ã,Ã,Ã,Ã,Ã,Ã,Ã,Ã,Ã,Ã,Ã,è,Ê,ÃĒ,ÃĢ,Ãģ,Ú,ï,ÃŽ,à ,Ãĸ,ô,ç"));
}
@Test
public final void testAccentRemoval_GerSpanFrenMix_SuccessfullyRemoved() {
- assertEquals("aeouÃAEOUnNa", this.getStringEncoder().removeAccents("äÃĢÃļÃŧÃÃÃÃÃÃąÃà "));
+ assertEquals("aeouÃAEOUnNa", getStringEncoder().removeAccents("äÃĢÃļÃŧÃÃÃÃÃÃąÃà "));
}
@Test
public final void testAccentRemoval_MixedWithUnusualChars_SuccessfullyRemovedAndUnusualCharactersInvariant() {
- assertEquals("A-e'i.,o&u", this.getStringEncoder().removeAccents("Ã-e'Ã.,Ãŗ&Ãē"));
+ assertEquals("A-e'i.,o&u", getStringEncoder().removeAccents("Ã-e'Ã.,Ãŗ&Ãē"));
}
@Test
public final void testAccentRemoval_NINO_NoChange() {
- assertEquals("", this.getStringEncoder().removeAccents(""));
+ assertEquals("", getStringEncoder().removeAccents(""));
}
@Test
public final void testAccentRemoval_NullValue_ReturnNullSuccessfully() {
- assertNull(this.getStringEncoder().removeAccents(null));
+ assertNull(getStringEncoder().removeAccents(null));
}
@Test
public final void testAccentRemoval_UpperAndLower_SuccessfullyRemovedAndCaseInvariant() {
- assertEquals("AeiOuu", this.getStringEncoder().removeAccents("ÃeÃÃuu"));
+ assertEquals("AeiOuu", getStringEncoder().removeAccents("ÃeÃÃuu"));
}
@Test
public final void testAccentRemoval_WithSpaces_SuccessfullyRemovedAndSpacesInvariant() {
- assertEquals("ae io u", this.getStringEncoder().removeAccents("ÃĄÃŠ ÃÃŗ Ãē"));
+ assertEquals("ae io u", getStringEncoder().removeAccents("ÃĄÃŠ ÃÃŗ Ãē"));
}
@Test
public final void testAccentRemovalNormalString_NoChange() {
- assertEquals("Colorless green ideas sleep furiously", this.getStringEncoder().removeAccents("Colorless green ideas sleep furiously"));
+ assertEquals("Colorless green ideas sleep furiously", getStringEncoder().removeAccents("Colorless green ideas sleep furiously"));
}
@Test
public final void testCleanName_SuccessfullyClean() {
- assertEquals("THISISATEST", this.getStringEncoder().cleanName("This-Ãs a t.,es &t"));
+ assertEquals("THISISATEST", getStringEncoder().cleanName("This-Ãs a t.,es &t"));
}
@Test
public final void testCompare_BRIAN_BRYAN_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Brian", "Bryan"));
+ assertTrue(getStringEncoder().isEncodeEquals("Brian", "Bryan"));
}
@Test
public final void testCompare_BURNS_BOURNE_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Burns", "Bourne"));
+ assertTrue(getStringEncoder().isEncodeEquals("Burns", "Bourne"));
}
@Test
public final void testCompare_CATHERINE_KATHRYN_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Catherine", "Kathryn"));
+ assertTrue(getStringEncoder().isEncodeEquals("Catherine", "Kathryn"));
}
@Test
public final void testCompare_COLM_COLIN_WithAccentsAndSymbolsAndSpaces_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("CÃŗlm. ", "C-olÃn"));
+ assertTrue(getStringEncoder().isEncodeEquals("CÃŗlm. ", "C-olÃn"));
}
@Test
public final void testCompare_Forenames_SEAN_JOHN_MatchExpected() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Sean", "John"));
+ assertTrue(getStringEncoder().isEncodeEquals("Sean", "John"));
}
@Test
public final void testCompare_Forenames_SEAN_PETE_NoMatchExpected() {
- assertFalse(this.getStringEncoder().isEncodeEquals("Sean", "Pete"));
+ assertFalse(getStringEncoder().isEncodeEquals("Sean", "Pete"));
}
@Test
public final void testCompare_Forenames_UNA_OONAGH_ShouldSuccessfullyMatchButDoesNot() {
- assertFalse(this.getStringEncoder().isEncodeEquals("Ãna", "Oonagh")); // Disappointing
+ assertFalse(getStringEncoder().isEncodeEquals("Ãna", "Oonagh")); // Disappointing
}
@Test
public final void testCompare_FRANCISZEK_FRANCES_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Franciszek", "Frances"));
+ assertTrue(getStringEncoder().isEncodeEquals("Franciszek", "Frances"));
}
@Test
public final void testCompare_KARL_ALESSANDRO_DoesNotMatch() {
- assertFalse(this.getStringEncoder().isEncodeEquals("Karl", "Alessandro"));
+ assertFalse(getStringEncoder().isEncodeEquals("Karl", "Alessandro"));
}
@Test
public final void testCompare_LongSurnames_MORIARTY_OMUIRCHEARTAIGH_DoesNotSuccessfulMatch() {
- assertFalse(this.getStringEncoder().isEncodeEquals("Moriarty", "OMuircheartaigh"));
+ assertFalse(getStringEncoder().isEncodeEquals("Moriarty", "OMuircheartaigh"));
}
@Test
public final void testCompare_LongSurnames_OMUIRCHEARTAIGH_OMIREADHAIGH_SuccessfulMatch() {
- assertTrue(this.getStringEncoder().isEncodeEquals("o'muireadhaigh", "Ã 'Muircheartaigh "));
+ assertTrue(getStringEncoder().isEncodeEquals("o'muireadhaigh", "Ã 'Muircheartaigh "));
}
@Test
public final void testCompare_MCGOWAN_MCGEOGHEGAN_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("McGowan", "Mc Geoghegan"));
+ assertTrue(getStringEncoder().isEncodeEquals("McGowan", "Mc Geoghegan"));
}
@Test
public final void testCompare_MICKY_MICHAEL_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Micky", "Michael"));
+ assertTrue(getStringEncoder().isEncodeEquals("Micky", "Michael"));
}
@Test
public final void testCompare_OONA_OONAGH_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Oona", "Oonagh"));
+ assertTrue(getStringEncoder().isEncodeEquals("Oona", "Oonagh"));
}
@Test
public final void testCompare_PETERSON_PETERS_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Peterson", "Peters"));
+ assertTrue(getStringEncoder().isEncodeEquals("Peterson", "Peters"));
}
@Test
public final void testCompare_SAM_SAMUEL_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Sam", "Samuel"));
+ assertTrue(getStringEncoder().isEncodeEquals("Sam", "Samuel"));
}
@Test
public final void testCompare_SEAN_SHAUN_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("SÊan", "Shaun"));
+ assertTrue(getStringEncoder().isEncodeEquals("SÊan", "Shaun"));
}
@Test
public final void testCompare_ShortNames_AL_ED_WorksButNoMatch() {
- assertFalse(this.getStringEncoder().isEncodeEquals("Al", "Ed"));
+ assertFalse(getStringEncoder().isEncodeEquals("Al", "Ed"));
}
@Test
public final void testCompare_SmallInput_CARK_Kl_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Kl", "Karl"));
+ assertTrue(getStringEncoder().isEncodeEquals("Kl", "Karl"));
}
@Test
public final void testCompare_SMITH_SMYTH_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("smith", "smyth"));
+ assertTrue(getStringEncoder().isEncodeEquals("smith", "smyth"));
}
@Test
public final void testCompare_SOPHIE_SOFIA_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Sophie", "Sofia"));
+ assertTrue(getStringEncoder().isEncodeEquals("Sophie", "Sofia"));
}
@Test
public final void testCompare_STEPHEN_STEFAN_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Stephen", "Stefan"));
+ assertTrue(getStringEncoder().isEncodeEquals("Stephen", "Stefan"));
}
@Test
public final void testCompare_STEPHEN_STEVEN_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Stephen", "Steven"));
+ assertTrue(getStringEncoder().isEncodeEquals("Stephen", "Steven"));
}
@Test
public final void testCompare_STEVEN_STEFAN_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Steven", "Stefan"));
+ assertTrue(getStringEncoder().isEncodeEquals("Steven", "Stefan"));
}
@Test
public final void testCompare_Surname_AUERBACH_UHRBACH_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Auerbach", "Uhrbach"));
+ assertTrue(getStringEncoder().isEncodeEquals("Auerbach", "Uhrbach"));
}
@Test
public final void testCompare_Surname_COOPERFLYNN_SUPERLYN_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Cooper-Flynn", "Super-Lyn"));
+ assertTrue(getStringEncoder().isEncodeEquals("Cooper-Flynn", "Super-Lyn"));
}
@Test
public final void testCompare_Surname_HAILEY_HALLEY_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Hailey", "Halley"));
+ assertTrue(getStringEncoder().isEncodeEquals("Hailey", "Halley"));
}
@Test
public final void testCompare_Surname_LEWINSKY_LEVINSKI_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("LEWINSKY", "LEVINSKI"));
+ assertTrue(getStringEncoder().isEncodeEquals("LEWINSKY", "LEVINSKI"));
}
@Test
public final void testCompare_Surname_LIPSHITZ_LIPPSZYC_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("LIPSHITZ", "LIPPSZYC"));
+ assertTrue(getStringEncoder().isEncodeEquals("LIPSHITZ", "LIPPSZYC"));
}
@Test
public final void testCompare_Surname_MOSKOWITZ_MOSKOVITZ_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Moskowitz", "Moskovitz"));
+ assertTrue(getStringEncoder().isEncodeEquals("Moskowitz", "Moskovitz"));
}
@Test
public final void testCompare_Surname_OSULLIVAN_OSUILLEABHAIN_SuccessfulMatch() {
- assertTrue(this.getStringEncoder().isEncodeEquals("O'Sullivan", "Ã ' SÃēilleabhÃĄin"));
+ assertTrue(getStringEncoder().isEncodeEquals("O'Sullivan", "Ã ' SÃēilleabhÃĄin"));
}
@Test
public final void testCompare_Surname_PRZEMYSL_PSHEMESHIL_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals(" P rz e m y s l", " P sh e m e sh i l"));
+ assertTrue(getStringEncoder().isEncodeEquals(" P rz e m y s l", " P sh e m e sh i l"));
}
@Test
public final void testCompare_Surname_ROSOCHOWACIEC_ROSOKHOVATSETS_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("R o s o ch o w a c ie c", " R o s o k ho v a ts e ts"));
+ assertTrue(getStringEncoder().isEncodeEquals("R o s o ch o w a c ie c", " R o s o k ho v a ts e ts"));
}
@Test
public final void testCompare_Surname_SZLAMAWICZ_SHLAMOVITZ_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("SZLAMAWICZ", "SHLAMOVITZ"));
+ assertTrue(getStringEncoder().isEncodeEquals("SZLAMAWICZ", "SHLAMOVITZ"));
}
@Test
public final void testCompare_SurnameCornerCase_Nulls_NoMatch() {
- assertFalse(this.getStringEncoder().isEncodeEquals(null, null));
+ assertFalse(getStringEncoder().isEncodeEquals(null, null));
}
@Test
public final void testCompare_Surnames_MURPHY_LYNCH_NoMatchExpected() {
- assertFalse(this.getStringEncoder().isEncodeEquals("Murphy", "Lynch"));
+ assertFalse(getStringEncoder().isEncodeEquals("Murphy", "Lynch"));
}
@Test
public final void testCompare_SurnamesCornerCase_MURPHY_NoSpace_NoMatch() {
- assertFalse(this.getStringEncoder().isEncodeEquals("Murphy", ""));
+ assertFalse(getStringEncoder().isEncodeEquals("Murphy", ""));
}
@Test
public final void testCompare_SurnamesCornerCase_MURPHY_Space_NoMatch() {
- assertFalse(this.getStringEncoder().isEncodeEquals("Murphy", " "));
+ assertFalse(getStringEncoder().isEncodeEquals("Murphy", " "));
}
@Test
public final void testCompare_TOMASZ_TOM_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Tomasz", "tom"));
+ assertTrue(getStringEncoder().isEncodeEquals("Tomasz", "tom"));
}
@Test
public final void testCompare_ZACH_ZAKARIA_SuccessfullyMatched() {
- assertTrue(this.getStringEncoder().isEncodeEquals("Zach", "Zacharia"));
+ assertTrue(getStringEncoder().isEncodeEquals("Zach", "Zacharia"));
}
@Test
@@ -302,220 +302,220 @@ public final void testCompareNameSameNames_ReturnsFalseSuccessfully() {
@Test
public final void testCompareNameToSingleLetter_KARL_C_DoesNotMatch() {
- assertFalse(this.getStringEncoder().isEncodeEquals("Karl", "C"));
+ assertFalse(getStringEncoder().isEncodeEquals("Karl", "C"));
}
@Test
public final void testGetEncoding_HARPER_HRPR() {
- assertEquals("HRPR", this.getStringEncoder().encode("HARPER"));
+ assertEquals("HRPR", getStringEncoder().encode("HARPER"));
}
@Test
public final void testGetEncoding_NoSpace_to_Nothing() {
- assertEquals("", this.getStringEncoder().encode(""));
+ assertEquals("", getStringEncoder().encode(""));
}
@Test
public final void testGetEncoding_Null_to_Nothing() {
- assertEquals("", this.getStringEncoder().encode(null));
+ assertEquals("", getStringEncoder().encode(null));
}
@Test
public final void testGetEncoding_One_Letter_to_Nothing() {
- assertEquals("", this.getStringEncoder().encode("E"));
+ assertEquals("", getStringEncoder().encode("E"));
}
@Test
public final void testGetEncoding_SMITH_to_SMTH() {
- assertEquals("SMTH", this.getStringEncoder().encode("Smith"));
+ assertEquals("SMTH", getStringEncoder().encode("Smith"));
}
@Test
public final void testGetEncoding_SMYTH_to_SMYTH() {
- assertEquals("SMYTH", this.getStringEncoder().encode("Smyth"));
+ assertEquals("SMYTH", getStringEncoder().encode("Smyth"));
}
@Test
public final void testGetEncoding_Space_to_Nothing() {
- assertEquals("", this.getStringEncoder().encode(" "));
+ assertEquals("", getStringEncoder().encode(" "));
}
@Test
public final void testGetFirstLast3__ALEXANDER_Returns_Aleder() {
- assertEquals("Aleder", this.getStringEncoder().getFirst3Last3("Alexzander"));
+ assertEquals("Aleder", getStringEncoder().getFirst3Last3("Alexzander"));
}
@Test
public final void testGetFirstLast3_PETE_Returns_PETE() {
- assertEquals("PETE", this.getStringEncoder().getFirst3Last3("PETE"));
+ assertEquals("PETE", getStringEncoder().getFirst3Last3("PETE"));
}
@Test
public final void testGetMinRating_1_Returns5_Successfully() {
- assertEquals(5, this.getStringEncoder().getMinRating(1));
+ assertEquals(5, getStringEncoder().getMinRating(1));
}
@Test
public final void testgetMinRating_10_Returns3_Successfully() {
- assertEquals(3, this.getStringEncoder().getMinRating(10));
+ assertEquals(3, getStringEncoder().getMinRating(10));
}
@Test
public final void testgetMinRating_11_Returns_3_Successfully() {
- assertEquals(3, this.getStringEncoder().getMinRating(11));
+ assertEquals(3, getStringEncoder().getMinRating(11));
}
@Test
public final void testGetMinRating_13_Returns_1_Successfully() {
- assertEquals(1, this.getStringEncoder().getMinRating(13));
+ assertEquals(1, getStringEncoder().getMinRating(13));
}
@Test
public final void testGetMinRating_2_Returns5_Successfully() {
- assertEquals(5, this.getStringEncoder().getMinRating(2));
+ assertEquals(5, getStringEncoder().getMinRating(2));
}
@Test
public final void testgetMinRating_5_Returns4_Successfully() {
- assertEquals(4, this.getStringEncoder().getMinRating(5));
+ assertEquals(4, getStringEncoder().getMinRating(5));
}
@Test
public final void testgetMinRating_5_Returns4_Successfully2() {
- assertEquals(4, this.getStringEncoder().getMinRating(5));
+ assertEquals(4, getStringEncoder().getMinRating(5));
}
@Test
public final void testgetMinRating_6_Returns4_Successfully() {
- assertEquals(4, this.getStringEncoder().getMinRating(6));
+ assertEquals(4, getStringEncoder().getMinRating(6));
}
@Test
public final void testGetMinRating_7_Return4_Successfully() {
- assertEquals(4, this.getStringEncoder().getMinRating(7));
+ assertEquals(4, getStringEncoder().getMinRating(7));
}
// ***** Begin Region - Test Get Encoding - Surnames
@Test
public final void testgetMinRating_7_Returns4_Successfully() {
- assertEquals(4, this.getStringEncoder().getMinRating(7));
+ assertEquals(4, getStringEncoder().getMinRating(7));
}
@Test
public final void testgetMinRating_8_Returns3_Successfully() {
- assertEquals(3, this.getStringEncoder().getMinRating(8));
+ assertEquals(3, getStringEncoder().getMinRating(8));
}
@Test
public final void testIsEncodeEquals_CornerCase_FirstNameJust1Letter_ReturnsFalse() {
- assertFalse(this.getStringEncoder().isEncodeEquals("t", "test"));
+ assertFalse(getStringEncoder().isEncodeEquals("t", "test"));
}
@Test
public final void testIsEncodeEquals_CornerCase_FirstNameJustSpace_ReturnsFalse() {
- assertFalse(this.getStringEncoder().isEncodeEquals(" ", "test"));
+ assertFalse(getStringEncoder().isEncodeEquals(" ", "test"));
}
@Test
public final void testIsEncodeEquals_CornerCase_FirstNameNothing_ReturnsFalse() {
- assertFalse(this.getStringEncoder().isEncodeEquals("", "test"));
+ assertFalse(getStringEncoder().isEncodeEquals("", "test"));
}
@Test
public final void testIsEncodeEquals_CornerCase_FirstNameNull_ReturnsFalse() {
- assertFalse(this.getStringEncoder().isEncodeEquals(null, "test"));
+ assertFalse(getStringEncoder().isEncodeEquals(null, "test"));
}
@Test
public final void testIsEncodeEquals_CornerCase_SecondNameJustSpace_ReturnsFalse() {
- assertFalse(this.getStringEncoder().isEncodeEquals("test", " "));
+ assertFalse(getStringEncoder().isEncodeEquals("test", " "));
}
@Test
public final void testIsEncodeEquals_CornerCase_SecondNameNothing_ReturnsFalse() {
- assertFalse(this.getStringEncoder().isEncodeEquals("test", ""));
+ assertFalse(getStringEncoder().isEncodeEquals("test", ""));
}
@Test
public final void testIsEncodeEquals_CornerCase_SecondNameNull_ReturnsFalse() {
- assertFalse(this.getStringEncoder().isEncodeEquals("test", null));
+ assertFalse(getStringEncoder().isEncodeEquals("test", null));
}
@Test
public final void testIsEncodeEqualsSecondNameJust1Letter_ReturnsFalse() {
- assertFalse(this.getStringEncoder().isEncodeEquals("test", "t"));
+ assertFalse(getStringEncoder().isEncodeEquals("test", "t"));
}
@Test
public final void testIsVowel_CapitalA_ReturnsTrue() {
- assertTrue(this.getStringEncoder().isVowel("A"));
+ assertTrue(getStringEncoder().isVowel("A"));
}
@Test
public final void testIsVowel_SingleVowel_ReturnsTrue() {
- assertTrue(this.getStringEncoder().isVowel("I"));
+ assertTrue(getStringEncoder().isVowel("I"));
}
@Test
public final void testIsVowel_SmallD_ReturnsFalse() {
- assertFalse(this.getStringEncoder().isVowel("d"));
+ assertFalse(getStringEncoder().isVowel("d"));
}
@Test
public final void testLeftToRightThenRightToLeft_ALEXANDER_ALEXANDRA_Returns4() {
- assertEquals(4, this.getStringEncoder().leftToRightThenRightToLeftProcessing("ALEXANDER", "ALEXANDRA"));
+ assertEquals(4, getStringEncoder().leftToRightThenRightToLeftProcessing("ALEXANDER", "ALEXANDRA"));
}
@Test
public final void testLeftToRightThenRightToLeft_EINSTEIN_MICHAELA_Returns0() {
- assertEquals(0, this.getStringEncoder().leftToRightThenRightToLeftProcessing("EINSTEIN", "MICHAELA"));
+ assertEquals(0, getStringEncoder().leftToRightThenRightToLeftProcessing("EINSTEIN", "MICHAELA"));
}
@Test
public final void testPunctuationOnly() {
- assertEquals(this.getStringEncoder().encode(".,-"), "");
+ assertEquals(getStringEncoder().encode(".,-"), "");
}
@Test
public final void testRemoveDoubleConsonants_MISSISSIPPI_RemovedSuccessfully() {
- assertEquals("MISISIPI", this.getStringEncoder().removeDoubleConsonants("MISSISSIPPI"));
+ assertEquals("MISISIPI", getStringEncoder().removeDoubleConsonants("MISSISSIPPI"));
}
@Test
public final void testRemoveDoubleDoubleVowel_BEETLE_NotRemoved() {
- assertEquals("BEETLE", this.getStringEncoder().removeDoubleConsonants("BEETLE"));
+ assertEquals("BEETLE", getStringEncoder().removeDoubleConsonants("BEETLE"));
}
@Test
public final void testRemoveSingleDoubleConsonants_BUBLE_RemovedSuccessfully() {
- assertEquals("BUBLE", this.getStringEncoder().removeDoubleConsonants("BUBBLE"));
+ assertEquals("BUBLE", getStringEncoder().removeDoubleConsonants("BUBBLE"));
}
@Test
public final void testRemoveVowel__AIDAN_Returns_ADN() {
- assertEquals("ADN", this.getStringEncoder().removeVowels("AIDAN"));
+ assertEquals("ADN", getStringEncoder().removeVowels("AIDAN"));
}
@Test
public final void testRemoveVowel__DECLAN_Returns_DCLN() {
- assertEquals("DCLN", this.getStringEncoder().removeVowels("DECLAN"));
+ assertEquals("DCLN", getStringEncoder().removeVowels("DECLAN"));
}
// ***** END REGION - TEST GET MRA COMPARISONS
@Test
public final void testRemoveVowel_ALESSANDRA_Returns_ALSSNDR() {
- assertEquals("ALSSNDR", this.getStringEncoder().removeVowels("ALESSANDRA"));
+ assertEquals("ALSSNDR", getStringEncoder().removeVowels("ALESSANDRA"));
}
@Test
public final void testVowelAndPunctuationOnly() {
- assertEquals(this.getStringEncoder().encode("uoiea.,-AEIOU"), "U");
+ assertEquals(getStringEncoder().encode("uoiea.,-AEIOU"), "U");
}
@Test
public final void testVowelOnly() {
- assertEquals(this.getStringEncoder().encode("aeiouAEIOU"), "A");
+ assertEquals(getStringEncoder().encode("aeiouAEIOU"), "A");
}
}
From dbe8f00fb12ba4830e5d8033bb5b3336a7ee67da Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:34 -0400
Subject: [PATCH 61/70] Remove redundant keywords
---
.../commons/codec/language/MetaphoneTest.java | 122 +++++++++---------
1 file changed, 61 insertions(+), 61 deletions(-)
diff --git a/src/test/java/org/apache/commons/codec/language/MetaphoneTest.java b/src/test/java/org/apache/commons/codec/language/MetaphoneTest.java
index 0bc3e68a45..98699f511d 100644
--- a/src/test/java/org/apache/commons/codec/language/MetaphoneTest.java
+++ b/src/test/java/org/apache/commons/codec/language/MetaphoneTest.java
@@ -31,24 +31,24 @@ public class MetaphoneTest extends AbstractStringEncoderTest {
public void assertIsMetaphoneEqual(final String source, final String[] matches) {
// match source to all matches
for (final String matche : matches) {
- assertTrue(this.getStringEncoder().isMetaphoneEqual(source, matche), "Source: " + source + ", should have same Metaphone as: " + matche);
+ assertTrue(getStringEncoder().isMetaphoneEqual(source, matche), "Source: " + source + ", should have same Metaphone as: " + matche);
}
// match to each other
for (final String matche : matches) {
for (final String matche2 : matches) {
- assertTrue(this.getStringEncoder().isMetaphoneEqual(matche, matche2));
+ assertTrue(getStringEncoder().isMetaphoneEqual(matche, matche2));
}
}
}
public void assertMetaphoneEqual(final String[][] pairs) {
- this.validateFixture(pairs);
+ validateFixture(pairs);
for (final String[] pair : pairs) {
final String name0 = pair[0];
final String name1 = pair[1];
final String failMsg = "Expected match between " + name0 + " and " + name1;
- assertTrue(this.getStringEncoder().isMetaphoneEqual(name0, name1), failMsg);
- assertTrue(this.getStringEncoder().isMetaphoneEqual(name1, name0), failMsg);
+ assertTrue(getStringEncoder().isMetaphoneEqual(name0, name1), failMsg);
+ assertTrue(getStringEncoder().isMetaphoneEqual(name1, name0), failMsg);
}
}
@@ -59,35 +59,35 @@ protected Metaphone createStringEncoder() {
@Test
public void testDiscardOfSCEOrSCIOrSCY() {
- assertEquals("SNS", this.getStringEncoder().metaphone("SCIENCE"));
- assertEquals("SN", this.getStringEncoder().metaphone("SCENE"));
- assertEquals("S", this.getStringEncoder().metaphone("SCY"));
+ assertEquals("SNS", getStringEncoder().metaphone("SCIENCE"));
+ assertEquals("SN", getStringEncoder().metaphone("SCENE"));
+ assertEquals("S", getStringEncoder().metaphone("SCY"));
}
@Test
public void testDiscardOfSilentGN() {
// NOTE: This does not test for silent GN, but for starting with GN
- assertEquals("N", this.getStringEncoder().metaphone("GNU"));
+ assertEquals("N", getStringEncoder().metaphone("GNU"));
// NOTE: Trying to test for GNED, but expected code does not appear to execute
- assertEquals("SNT", this.getStringEncoder().metaphone("SIGNED"));
+ assertEquals("SNT", getStringEncoder().metaphone("SIGNED"));
}
@Test
public void testDiscardOfSilentHAfterG() {
- assertEquals("KNT", this.getStringEncoder().metaphone("GHENT"));
- assertEquals("B", this.getStringEncoder().metaphone("BAUGH"));
+ assertEquals("KNT", getStringEncoder().metaphone("GHENT"));
+ assertEquals("B", getStringEncoder().metaphone("BAUGH"));
}
@Test
public void testExceedLength() {
// should be AKSKS, but is truncated by Max Code Length
- assertEquals("AKSK", this.getStringEncoder().metaphone("AXEAXE"));
+ assertEquals("AKSK", getStringEncoder().metaphone("AXEAXE"));
}
@Test
public void testIsMetaphoneEqual1() {
- this.assertMetaphoneEqual(new String[][] { { "Case", "case" }, { "CASE", "Case" }, { "caSe", "cAsE" }, { "quick", "cookie" } });
+ assertMetaphoneEqual(new String[][] { { "Case", "case" }, { "CASE", "Case" }, { "caSe", "cAsE" }, { "quick", "cookie" } });
}
/**
@@ -95,7 +95,7 @@ public void testIsMetaphoneEqual1() {
*/
@Test
public void testIsMetaphoneEqual2() {
- this.assertMetaphoneEqual(new String[][] { { "Lawrence", "Lorenza" }, { "Gary", "Cahra" }, });
+ assertMetaphoneEqual(new String[][] { { "Lawrence", "Lorenza" }, { "Gary", "Cahra" }, });
}
/**
@@ -105,7 +105,7 @@ public void testIsMetaphoneEqual2() {
*/
@Test
public void testIsMetaphoneEqualAero() {
- this.assertIsMetaphoneEqual("Aero", new String[] { "Eure" });
+ assertIsMetaphoneEqual("Aero", new String[] { "Eure" });
}
/**
@@ -115,7 +115,7 @@ public void testIsMetaphoneEqualAero() {
*/
@Test
public void testIsMetaphoneEqualAlbert() {
- this.assertIsMetaphoneEqual("Albert", new String[] { "Ailbert", "Alberik", "Albert", "Alberto", "Albrecht" });
+ assertIsMetaphoneEqual("Albert", new String[] { "Ailbert", "Alberik", "Albert", "Alberto", "Albrecht" });
}
/**
@@ -123,7 +123,7 @@ public void testIsMetaphoneEqualAlbert() {
*/
@Test
public void testIsMetaphoneEqualGary() {
- this.assertIsMetaphoneEqual("Gary",
+ assertIsMetaphoneEqual("Gary",
new String[] { "Cahra", "Cara", "Carey", "Cari", "Caria", "Carie", "Caro", "Carree", "Carri", "Carrie", "Carry", "Cary", "Cora", "Corey",
"Cori", "Corie", "Correy", "Corri", "Corrie", "Corry", "Cory", "Gray", "Kara", "Kare", "Karee", "Kari", "Karia", "Karie", "Karrah",
"Karrie", "Karry", "Kary", "Keri", "Kerri", "Kerrie", "Kerry", "Kira", "Kiri", "Kora", "Kore", "Kori", "Korie", "Korrie", "Korry" });
@@ -134,7 +134,7 @@ public void testIsMetaphoneEqualGary() {
*/
@Test
public void testIsMetaphoneEqualJohn() {
- this.assertIsMetaphoneEqual("John",
+ assertIsMetaphoneEqual("John",
new String[] { "Gena", "Gene", "Genia", "Genna", "Genni", "Gennie", "Genny", "Giana", "Gianna", "Gina", "Ginni", "Ginnie", "Ginny", "Jaine",
"Jan", "Jana", "Jane", "Janey", "Jania", "Janie", "Janna", "Jany", "Jayne", "Jean", "Jeana", "Jeane", "Jeanie", "Jeanna", "Jeanne",
"Jeannie", "Jen", "Jena", "Jeni", "Jenn", "Jenna", "Jennee", "Jenni", "Jennie", "Jenny", "Jinny", "Jo Ann", "Jo-Ann", "Jo-Anne", "Joan",
@@ -149,7 +149,7 @@ public void testIsMetaphoneEqualJohn() {
*/
@Test
public void testIsMetaphoneEqualKnight() {
- this.assertIsMetaphoneEqual("Knight", new String[] { "Hynda", "Nada", "Nadia", "Nady", "Nat", "Nata", "Natty", "Neda", "Nedda", "Nedi", "Netta",
+ assertIsMetaphoneEqual("Knight", new String[] { "Hynda", "Nada", "Nadia", "Nady", "Nat", "Nata", "Natty", "Neda", "Nedda", "Nedi", "Netta",
"Netti", "Nettie", "Netty", "Nita", "Nydia" });
}
@@ -158,7 +158,7 @@ public void testIsMetaphoneEqualKnight() {
*/
@Test
public void testIsMetaphoneEqualMary() {
- this.assertIsMetaphoneEqual("Mary", new String[] { "Mair", "Maire", "Mara", "Mareah", "Mari", "Maria", "Marie", "Mary", "Maura", "Maure", "Meara",
+ assertIsMetaphoneEqual("Mary", new String[] { "Mair", "Maire", "Mara", "Mareah", "Mari", "Maria", "Marie", "Mary", "Maura", "Maure", "Meara",
"Merrie", "Merry", "Mira", "Moira", "Mora", "Moria", "Moyra", "Muire", "Myra", "Myrah" });
}
@@ -167,7 +167,7 @@ public void testIsMetaphoneEqualMary() {
*/
@Test
public void testIsMetaphoneEqualParis() {
- this.assertIsMetaphoneEqual("Paris", new String[] { "Pearcy", "Perris", "Piercy", "Pierz", "Pryse" });
+ assertIsMetaphoneEqual("Paris", new String[] { "Pearcy", "Perris", "Piercy", "Pierz", "Pryse" });
}
/**
@@ -175,7 +175,7 @@ public void testIsMetaphoneEqualParis() {
*/
@Test
public void testIsMetaphoneEqualPeter() {
- this.assertIsMetaphoneEqual("Peter", new String[] { "Peadar", "Peder", "Pedro", "Peter", "Petr", "Peyter", "Pieter", "Pietro", "Piotr" });
+ assertIsMetaphoneEqual("Peter", new String[] { "Peadar", "Peder", "Pedro", "Peter", "Petr", "Peyter", "Pieter", "Pietro", "Piotr" });
}
/**
@@ -183,7 +183,7 @@ public void testIsMetaphoneEqualPeter() {
*/
@Test
public void testIsMetaphoneEqualRay() {
- this.assertIsMetaphoneEqual("Ray", new String[] { "Ray", "Rey", "Roi", "Roy", "Ruy" });
+ assertIsMetaphoneEqual("Ray", new String[] { "Ray", "Rey", "Roi", "Roy", "Ruy" });
}
/**
@@ -191,7 +191,7 @@ public void testIsMetaphoneEqualRay() {
*/
@Test
public void testIsMetaphoneEqualSusan() {
- this.assertIsMetaphoneEqual("Susan",
+ assertIsMetaphoneEqual("Susan",
new String[] { "Siusan", "Sosanna", "Susan", "Susana", "Susann", "Susanna", "Susannah", "Susanne", "Suzann", "Suzanna", "Suzanne", "Zuzana" });
}
@@ -202,7 +202,7 @@ public void testIsMetaphoneEqualSusan() {
*/
@Test
public void testIsMetaphoneEqualWhite() {
- this.assertIsMetaphoneEqual("White",
+ assertIsMetaphoneEqual("White",
new String[] { "Wade", "Wait", "Waite", "Wat", "Whit", "Wiatt", "Wit", "Wittie", "Witty", "Wood", "Woodie", "Woody" });
}
@@ -213,7 +213,7 @@ public void testIsMetaphoneEqualWhite() {
*/
@Test
public void testIsMetaphoneEqualWright() {
- this.assertIsMetaphoneEqual("Wright", new String[] { "Rota", "Rudd", "Ryde" });
+ assertIsMetaphoneEqual("Wright", new String[] { "Rota", "Rudd", "Ryde" });
}
/**
@@ -221,69 +221,69 @@ public void testIsMetaphoneEqualWright() {
*/
@Test
public void testIsMetaphoneEqualXalan() {
- this.assertIsMetaphoneEqual("Xalan", new String[] { "Celene", "Celina", "Celine", "Selena", "Selene", "Selina", "Seline", "Suellen", "Xylina" });
+ assertIsMetaphoneEqual("Xalan", new String[] { "Celene", "Celina", "Celine", "Selena", "Selene", "Selina", "Seline", "Suellen", "Xylina" });
}
@Test
public void testMetaphone() {
- assertEquals("HL", this.getStringEncoder().metaphone("howl"));
- assertEquals("TSTN", this.getStringEncoder().metaphone("testing"));
- assertEquals("0", this.getStringEncoder().metaphone("The"));
- assertEquals("KK", this.getStringEncoder().metaphone("quick"));
- assertEquals("BRN", this.getStringEncoder().metaphone("brown"));
- assertEquals("FKS", this.getStringEncoder().metaphone("fox"));
- assertEquals("JMPT", this.getStringEncoder().metaphone("jumped"));
- assertEquals("OFR", this.getStringEncoder().metaphone("over"));
- assertEquals("0", this.getStringEncoder().metaphone("the"));
- assertEquals("LS", this.getStringEncoder().metaphone("lazy"));
- assertEquals("TKS", this.getStringEncoder().metaphone("dogs"));
+ assertEquals("HL", getStringEncoder().metaphone("howl"));
+ assertEquals("TSTN", getStringEncoder().metaphone("testing"));
+ assertEquals("0", getStringEncoder().metaphone("The"));
+ assertEquals("KK", getStringEncoder().metaphone("quick"));
+ assertEquals("BRN", getStringEncoder().metaphone("brown"));
+ assertEquals("FKS", getStringEncoder().metaphone("fox"));
+ assertEquals("JMPT", getStringEncoder().metaphone("jumped"));
+ assertEquals("OFR", getStringEncoder().metaphone("over"));
+ assertEquals("0", getStringEncoder().metaphone("the"));
+ assertEquals("LS", getStringEncoder().metaphone("lazy"));
+ assertEquals("TKS", getStringEncoder().metaphone("dogs"));
}
@Test
public void testPHTOF() {
- assertEquals("FX", this.getStringEncoder().metaphone("PHISH"));
+ assertEquals("FX", getStringEncoder().metaphone("PHISH"));
}
@Test
public void testSetMaxLengthWithTruncation() {
// should be AKSKS, but istruncated by Max Code Length
- this.getStringEncoder().setMaxCodeLen(6);
- assertEquals("AKSKSK", this.getStringEncoder().metaphone("AXEAXEAXE"));
+ getStringEncoder().setMaxCodeLen(6);
+ assertEquals("AKSKSK", getStringEncoder().metaphone("AXEAXEAXE"));
}
@Test
public void testSHAndSIOAndSIAToX() {
- assertEquals("XT", this.getStringEncoder().metaphone("SHOT"));
- assertEquals("OTXN", this.getStringEncoder().metaphone("ODSIAN"));
- assertEquals("PLXN", this.getStringEncoder().metaphone("PULSION"));
+ assertEquals("XT", getStringEncoder().metaphone("SHOT"));
+ assertEquals("OTXN", getStringEncoder().metaphone("ODSIAN"));
+ assertEquals("PLXN", getStringEncoder().metaphone("PULSION"));
}
@Test
public void testTCH() {
- assertEquals("RX", this.getStringEncoder().metaphone("RETCH"));
- assertEquals("WX", this.getStringEncoder().metaphone("WATCH"));
+ assertEquals("RX", getStringEncoder().metaphone("RETCH"));
+ assertEquals("WX", getStringEncoder().metaphone("WATCH"));
}
@Test
public void testTIOAndTIAToX() {
- assertEquals("OX", this.getStringEncoder().metaphone("OTIA"));
- assertEquals("PRXN", this.getStringEncoder().metaphone("PORTION"));
+ assertEquals("OX", getStringEncoder().metaphone("OTIA"));
+ assertEquals("PRXN", getStringEncoder().metaphone("PORTION"));
}
@Test
public void testTranslateOfSCHAndCH() {
- assertEquals("SKTL", this.getStringEncoder().metaphone("SCHEDULE"));
- assertEquals("SKMT", this.getStringEncoder().metaphone("SCHEMATIC"));
+ assertEquals("SKTL", getStringEncoder().metaphone("SCHEDULE"));
+ assertEquals("SKMT", getStringEncoder().metaphone("SCHEMATIC"));
- assertEquals("KRKT", this.getStringEncoder().metaphone("CHARACTER"));
- assertEquals("TX", this.getStringEncoder().metaphone("TEACH"));
+ assertEquals("KRKT", getStringEncoder().metaphone("CHARACTER"));
+ assertEquals("TX", getStringEncoder().metaphone("TEACH"));
}
@Test
public void testTranslateToJOfDGEOrDGIOrDGY() {
- assertEquals("TJ", this.getStringEncoder().metaphone("DODGY"));
- assertEquals("TJ", this.getStringEncoder().metaphone("DODGE"));
- assertEquals("AJMT", this.getStringEncoder().metaphone("ADGIEMTI"));
+ assertEquals("TJ", getStringEncoder().metaphone("DODGY"));
+ assertEquals("TJ", getStringEncoder().metaphone("DODGE"));
+ assertEquals("AJMT", getStringEncoder().metaphone("ADGIEMTI"));
}
/**
@@ -292,19 +292,19 @@ public void testTranslateToJOfDGEOrDGIOrDGY() {
@Test
public void testWhy() {
// PHP returns "H". The original metaphone returns an empty string.
- assertEquals("", this.getStringEncoder().metaphone("WHY"));
+ assertEquals("", getStringEncoder().metaphone("WHY"));
}
@Test
public void testWordEndingInMB() {
- assertEquals("KM", this.getStringEncoder().metaphone("COMB"));
- assertEquals("TM", this.getStringEncoder().metaphone("TOMB"));
- assertEquals("WM", this.getStringEncoder().metaphone("WOMB"));
+ assertEquals("KM", getStringEncoder().metaphone("COMB"));
+ assertEquals("TM", getStringEncoder().metaphone("TOMB"));
+ assertEquals("WM", getStringEncoder().metaphone("WOMB"));
}
@Test
public void testWordsWithCIA() {
- assertEquals("XP", this.getStringEncoder().metaphone("CIAPO"));
+ assertEquals("XP", getStringEncoder().metaphone("CIAPO"));
}
public void validateFixture(final String[][] pairs) {
From a7ffcabf619f590c9f33105d41e7cc8a91ae1912 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:35 -0400
Subject: [PATCH 62/70] Remove redundant keywords
---
.../commons/codec/language/NysiisTest.java | 46 +++++++++----------
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/src/test/java/org/apache/commons/codec/language/NysiisTest.java b/src/test/java/org/apache/commons/codec/language/NysiisTest.java
index f50051e6f2..10f1d968c3 100644
--- a/src/test/java/org/apache/commons/codec/language/NysiisTest.java
+++ b/src/test/java/org/apache/commons/codec/language/NysiisTest.java
@@ -62,19 +62,19 @@ public void testBran() {
@Test
public void testCap() {
- this.encodeAll(new String[] { "Capp", "Cope", "Copp", "Kipp" }, "CAP");
+ encodeAll(new String[] { "Capp", "Cope", "Copp", "Kipp" }, "CAP");
}
@Test
public void testDad() {
// Data Quality and Record Linkage Techniques P.121 claims this is DAN,
// but it should be DAD, verified also with dropby.com
- this.encodeAll(new String[] { "Dent" }, "DAD");
+ encodeAll(new String[] { "Dent" }, "DAD");
}
@Test
public void testDan() {
- this.encodeAll(new String[] { "Dane", "Dean", "Dionne" }, "DAN");
+ encodeAll(new String[] { "Dane", "Dean", "Dionne" }, "DAN");
}
/**
@@ -87,7 +87,7 @@ public void testDropBy() {
// prepended to the test string. The referenced rules refer to the outlined steps the
// class description for Nysiis.
- this.assertEncodings(
+ assertEncodings(
// 1. Transcode first characters of name
new String[] { "MACINTOSH", "MCANT" },
// violates 4j: the second N should not be added, as the first
@@ -141,14 +141,14 @@ public void testDropBy() {
@Test
public void testFal() {
- this.encodeAll(new String[] { "Phil" }, "FAL");
+ encodeAll(new String[] { "Phil" }, "FAL");
}
/**
* Tests data gathered from around the internets.*/
@Test
public void testOthers() {
- this.assertEncodings(
+ assertEncodings(
new String[] { "O'Daniel", "ODANAL" },
new String[] { "O'Donnel", "ODANAL" },
new String[] { "Cory", "CARY" },
@@ -162,7 +162,7 @@ public void testOthers() {
* Tests rule 1: Translate first characters of name: MAC â MCC, KN â N, K â C, PH, PF â FF, SCH â SSS*/
@Test
public void testRule1() {
- this.assertEncodings(
+ assertEncodings(
new String[] { "MACX", "MCX" },
new String[] { "KNX", "NX" },
new String[] { "KX", "CX" },
@@ -175,7 +175,7 @@ public void testRule1() {
* Tests rule 2: Translate last characters of name: EE â Y, IE â Y, DT, RT, RD, NT, ND â D*/
@Test
public void testRule2() {
- this.assertEncodings(
+ assertEncodings(
new String[] { "XEE", "XY" },
new String[] { "XIE", "XY" },
new String[] { "XDT", "XD" },
@@ -189,7 +189,7 @@ public void testRule2() {
* Tests rule 4.1: EV â AF else A, E, I, O, U â A*/
@Test
public void testRule4Dot1() {
- this.assertEncodings(
+ assertEncodings(
new String[] { "XEV", "XAF" },
new String[] { "XAX", "XAX" },
new String[] { "XEX", "XAX" },
@@ -202,7 +202,7 @@ public void testRule4Dot1() {
* Tests rule 4.2: Q â G, Z â S, M â N*/
@Test
public void testRule4Dot2() {
- this.assertEncodings(
+ assertEncodings(
new String[] { "XQ", "XG" },
new String[] { "XZ", "X" },
new String[] { "XM", "XN" });
@@ -212,7 +212,7 @@ public void testRule4Dot2() {
* Tests rule 5: If last character is S, remove it.*/
@Test
public void testRule5() {
- this.assertEncodings(
+ assertEncodings(
new String[] { "XS", "X" },
new String[] { "XSS", "X" });
}
@@ -221,7 +221,7 @@ public void testRule5() {
* Tests rule 6: If last characters are AY, replace with Y.*/
@Test
public void testRule6() {
- this.assertEncodings(
+ assertEncodings(
new String[] { "XAY", "XY" },
new String[] { "XAYS", "XY" }); // Rules 5, 6
}
@@ -230,7 +230,7 @@ public void testRule6() {
* Tests rule 7: If last character is A, remove it.*/
@Test
public void testRule7() {
- this.assertEncodings(
+ assertEncodings(
new String[] { "XA", "X" },
new String[] { "XAS", "X" }); // Rules 5, 7
}
@@ -238,28 +238,28 @@ public void testRule7() {
public void testSnad() {
// Data Quality and Record Linkage Techniques P.121 claims this is SNAT,
// but it should be SNAD
- this.encodeAll(new String[] { "Schmidt" }, "SNAD");
+ encodeAll(new String[] { "Schmidt" }, "SNAD");
}
@Test
public void testSnat() {
- this.encodeAll(new String[] { "Smith", "Schmit" }, "SNAT");
+ encodeAll(new String[] { "Smith", "Schmit" }, "SNAT");
}
@Test
public void testSpecialBranches() {
- this.encodeAll(new String[] { "Kobwick" }, "CABWAC");
- this.encodeAll(new String[] { "Kocher" }, "CACAR");
- this.encodeAll(new String[] { "Fesca" }, "FASC");
- this.encodeAll(new String[] { "Shom" }, "SAN");
- this.encodeAll(new String[] { "Ohlo" }, "OL");
- this.encodeAll(new String[] { "Uhu" }, "UH");
- this.encodeAll(new String[] { "Um" }, "UN");
+ encodeAll(new String[] { "Kobwick" }, "CABWAC");
+ encodeAll(new String[] { "Kocher" }, "CACAR");
+ encodeAll(new String[] { "Fesca" }, "FASC");
+ encodeAll(new String[] { "Shom" }, "SAN");
+ encodeAll(new String[] { "Ohlo" }, "OL");
+ encodeAll(new String[] { "Uhu" }, "UH");
+ encodeAll(new String[] { "Um" }, "UN");
}
@Test
public void testTranan() {
- this.encodeAll(new String[] { "Trueman", "Truman" }, "TRANAN");
+ encodeAll(new String[] { "Trueman", "Truman" }, "TRANAN");
}
@Test
From 8dcf9d1f745c88beedf54e63c7a5d683725ebdea Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:35 -0400
Subject: [PATCH 63/70] Remove redundant keywords
---
.../codec/language/RefinedSoundexTest.java | 48 +++++++++----------
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/src/test/java/org/apache/commons/codec/language/RefinedSoundexTest.java b/src/test/java/org/apache/commons/codec/language/RefinedSoundexTest.java
index 5e5bbd73d8..20aa3dd157 100644
--- a/src/test/java/org/apache/commons/codec/language/RefinedSoundexTest.java
+++ b/src/test/java/org/apache/commons/codec/language/RefinedSoundexTest.java
@@ -36,38 +36,38 @@ protected RefinedSoundex createStringEncoder() {
@Test
public void testDifference() throws EncoderException {
// Edge cases
- assertEquals(0, this.getStringEncoder().difference(null, null));
- assertEquals(0, this.getStringEncoder().difference("", ""));
- assertEquals(0, this.getStringEncoder().difference(" ", " "));
+ assertEquals(0, getStringEncoder().difference(null, null));
+ assertEquals(0, getStringEncoder().difference("", ""));
+ assertEquals(0, getStringEncoder().difference(" ", " "));
// Normal cases
- assertEquals(6, this.getStringEncoder().difference("Smith", "Smythe"));
- assertEquals(3, this.getStringEncoder().difference("Ann", "Andrew"));
- assertEquals(1, this.getStringEncoder().difference("Margaret", "Andrew"));
- assertEquals(1, this.getStringEncoder().difference("Janet", "Margaret"));
+ assertEquals(6, getStringEncoder().difference("Smith", "Smythe"));
+ assertEquals(3, getStringEncoder().difference("Ann", "Andrew"));
+ assertEquals(1, getStringEncoder().difference("Margaret", "Andrew"));
+ assertEquals(1, getStringEncoder().difference("Janet", "Margaret"));
// Examples from
// https://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_de-dz_8co5.asp
- assertEquals(5, this.getStringEncoder().difference("Green", "Greene"));
- assertEquals(1, this.getStringEncoder().difference("Blotchet-Halls", "Greene"));
+ assertEquals(5, getStringEncoder().difference("Green", "Greene"));
+ assertEquals(1, getStringEncoder().difference("Blotchet-Halls", "Greene"));
// Examples from
// https://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_setu-sus_3o6w.asp
- assertEquals(6, this.getStringEncoder().difference("Smith", "Smythe"));
- assertEquals(8, this.getStringEncoder().difference("Smithers", "Smythers"));
- assertEquals(5, this.getStringEncoder().difference("Anothers", "Brothers"));
+ assertEquals(6, getStringEncoder().difference("Smith", "Smythe"));
+ assertEquals(8, getStringEncoder().difference("Smithers", "Smythers"));
+ assertEquals(5, getStringEncoder().difference("Anothers", "Brothers"));
}
@Test
public void testEncode() {
- assertEquals("T6036084", this.getStringEncoder().encode("testing"));
- assertEquals("T6036084", this.getStringEncoder().encode("TESTING"));
- assertEquals("T60", this.getStringEncoder().encode("The"));
- assertEquals("Q503", this.getStringEncoder().encode("quick"));
- assertEquals("B1908", this.getStringEncoder().encode("brown"));
- assertEquals("F205", this.getStringEncoder().encode("fox"));
- assertEquals("J408106", this.getStringEncoder().encode("jumped"));
- assertEquals("O0209", this.getStringEncoder().encode("over"));
- assertEquals("T60", this.getStringEncoder().encode("the"));
- assertEquals("L7050", this.getStringEncoder().encode("lazy"));
- assertEquals("D6043", this.getStringEncoder().encode("dogs"));
+ assertEquals("T6036084", getStringEncoder().encode("testing"));
+ assertEquals("T6036084", getStringEncoder().encode("TESTING"));
+ assertEquals("T60", getStringEncoder().encode("The"));
+ assertEquals("Q503", getStringEncoder().encode("quick"));
+ assertEquals("B1908", getStringEncoder().encode("brown"));
+ assertEquals("F205", getStringEncoder().encode("fox"));
+ assertEquals("J408106", getStringEncoder().encode("jumped"));
+ assertEquals("O0209", getStringEncoder().encode("over"));
+ assertEquals("T60", getStringEncoder().encode("the"));
+ assertEquals("L7050", getStringEncoder().encode("lazy"));
+ assertEquals("D6043", getStringEncoder().encode("dogs"));
// Testing CODEC-56
assertEquals("D6043", RefinedSoundex.US_ENGLISH.encode("dogs"));
@@ -75,7 +75,7 @@ public void testEncode() {
@Test
public void testGetMappingCodeNonLetter() {
- final char code = this.getStringEncoder().getMappingCode('#');
+ final char code = getStringEncoder().getMappingCode('#');
assertEquals(0, code, "Code does not equals zero");
}
From 1e6544e4f1d269c0edf8b702f60d6dc866b3affa Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:36 -0400
Subject: [PATCH 64/70] Remove redundant keywords
---
.../commons/codec/language/SoundexTest.java | 178 +++++++++---------
1 file changed, 89 insertions(+), 89 deletions(-)
diff --git a/src/test/java/org/apache/commons/codec/language/SoundexTest.java b/src/test/java/org/apache/commons/codec/language/SoundexTest.java
index 3bb2f02c9a..1fd1297fca 100644
--- a/src/test/java/org/apache/commons/codec/language/SoundexTest.java
+++ b/src/test/java/org/apache/commons/codec/language/SoundexTest.java
@@ -41,7 +41,7 @@ protected Soundex createStringEncoder() {
@Test
public void testB650() throws EncoderException {
- this.checkEncodingVariations("B650", new String[]{
+ checkEncodingVariations("B650", new String[]{
"BARHAM",
"BARONE",
"BARRON",
@@ -86,42 +86,42 @@ public void testB650() throws EncoderException {
@Test
public void testBadCharacters() {
- assertEquals("H452", this.getStringEncoder().encode("HOL>MES"));
+ assertEquals("H452", getStringEncoder().encode("HOL>MES"));
}
@Test
public void testDifference() throws EncoderException {
// Edge cases
- assertEquals(0, this.getStringEncoder().difference(null, null));
- assertEquals(0, this.getStringEncoder().difference("", ""));
- assertEquals(0, this.getStringEncoder().difference(" ", " "));
+ assertEquals(0, getStringEncoder().difference(null, null));
+ assertEquals(0, getStringEncoder().difference("", ""));
+ assertEquals(0, getStringEncoder().difference(" ", " "));
// Normal cases
- assertEquals(4, this.getStringEncoder().difference("Smith", "Smythe"));
- assertEquals(2, this.getStringEncoder().difference("Ann", "Andrew"));
- assertEquals(1, this.getStringEncoder().difference("Margaret", "Andrew"));
- assertEquals(0, this.getStringEncoder().difference("Janet", "Margaret"));
+ assertEquals(4, getStringEncoder().difference("Smith", "Smythe"));
+ assertEquals(2, getStringEncoder().difference("Ann", "Andrew"));
+ assertEquals(1, getStringEncoder().difference("Margaret", "Andrew"));
+ assertEquals(0, getStringEncoder().difference("Janet", "Margaret"));
// Examples from https://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_de-dz_8co5.asp
- assertEquals(4, this.getStringEncoder().difference("Green", "Greene"));
- assertEquals(0, this.getStringEncoder().difference("Blotchet-Halls", "Greene"));
+ assertEquals(4, getStringEncoder().difference("Green", "Greene"));
+ assertEquals(0, getStringEncoder().difference("Blotchet-Halls", "Greene"));
// Examples from https://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_setu-sus_3o6w.asp
- assertEquals(4, this.getStringEncoder().difference("Smith", "Smythe"));
- assertEquals(4, this.getStringEncoder().difference("Smithers", "Smythers"));
- assertEquals(2, this.getStringEncoder().difference("Anothers", "Brothers"));
+ assertEquals(4, getStringEncoder().difference("Smith", "Smythe"));
+ assertEquals(4, getStringEncoder().difference("Smithers", "Smythers"));
+ assertEquals(2, getStringEncoder().difference("Anothers", "Brothers"));
}
@Test
public void testEncodeBasic() {
- assertEquals("T235", this.getStringEncoder().encode("testing"));
- assertEquals("T000", this.getStringEncoder().encode("The"));
- assertEquals("Q200", this.getStringEncoder().encode("quick"));
- assertEquals("B650", this.getStringEncoder().encode("brown"));
- assertEquals("F200", this.getStringEncoder().encode("fox"));
- assertEquals("J513", this.getStringEncoder().encode("jumped"));
- assertEquals("O160", this.getStringEncoder().encode("over"));
- assertEquals("T000", this.getStringEncoder().encode("the"));
- assertEquals("L200", this.getStringEncoder().encode("lazy"));
- assertEquals("D200", this.getStringEncoder().encode("dogs"));
+ assertEquals("T235", getStringEncoder().encode("testing"));
+ assertEquals("T000", getStringEncoder().encode("The"));
+ assertEquals("Q200", getStringEncoder().encode("quick"));
+ assertEquals("B650", getStringEncoder().encode("brown"));
+ assertEquals("F200", getStringEncoder().encode("fox"));
+ assertEquals("J513", getStringEncoder().encode("jumped"));
+ assertEquals("O160", getStringEncoder().encode("over"));
+ assertEquals("T000", getStringEncoder().encode("the"));
+ assertEquals("L200", getStringEncoder().encode("lazy"));
+ assertEquals("D200", getStringEncoder().encode("dogs"));
}
/**
@@ -129,22 +129,22 @@ public void testEncodeBasic() {
*/
@Test
public void testEncodeBatch2() {
- assertEquals("A462", this.getStringEncoder().encode("Allricht"));
- assertEquals("E166", this.getStringEncoder().encode("Eberhard"));
- assertEquals("E521", this.getStringEncoder().encode("Engebrethson"));
- assertEquals("H512", this.getStringEncoder().encode("Heimbach"));
- assertEquals("H524", this.getStringEncoder().encode("Hanselmann"));
- assertEquals("H431", this.getStringEncoder().encode("Hildebrand"));
- assertEquals("K152", this.getStringEncoder().encode("Kavanagh"));
- assertEquals("L530", this.getStringEncoder().encode("Lind"));
- assertEquals("L222", this.getStringEncoder().encode("Lukaschowsky"));
- assertEquals("M235", this.getStringEncoder().encode("McDonnell"));
- assertEquals("M200", this.getStringEncoder().encode("McGee"));
- assertEquals("O155", this.getStringEncoder().encode("Opnian"));
- assertEquals("O155", this.getStringEncoder().encode("Oppenheimer"));
- assertEquals("R355", this.getStringEncoder().encode("Riedemanas"));
- assertEquals("Z300", this.getStringEncoder().encode("Zita"));
- assertEquals("Z325", this.getStringEncoder().encode("Zitzmeinn"));
+ assertEquals("A462", getStringEncoder().encode("Allricht"));
+ assertEquals("E166", getStringEncoder().encode("Eberhard"));
+ assertEquals("E521", getStringEncoder().encode("Engebrethson"));
+ assertEquals("H512", getStringEncoder().encode("Heimbach"));
+ assertEquals("H524", getStringEncoder().encode("Hanselmann"));
+ assertEquals("H431", getStringEncoder().encode("Hildebrand"));
+ assertEquals("K152", getStringEncoder().encode("Kavanagh"));
+ assertEquals("L530", getStringEncoder().encode("Lind"));
+ assertEquals("L222", getStringEncoder().encode("Lukaschowsky"));
+ assertEquals("M235", getStringEncoder().encode("McDonnell"));
+ assertEquals("M200", getStringEncoder().encode("McGee"));
+ assertEquals("O155", getStringEncoder().encode("Opnian"));
+ assertEquals("O155", getStringEncoder().encode("Oppenheimer"));
+ assertEquals("R355", getStringEncoder().encode("Riedemanas"));
+ assertEquals("Z300", getStringEncoder().encode("Zita"));
+ assertEquals("Z325", getStringEncoder().encode("Zitzmeinn"));
}
/**
@@ -152,15 +152,15 @@ public void testEncodeBatch2() {
*/
@Test
public void testEncodeBatch3() {
- assertEquals("W252", this.getStringEncoder().encode("Washington"));
- assertEquals("L000", this.getStringEncoder().encode("Lee"));
- assertEquals("G362", this.getStringEncoder().encode("Gutierrez"));
- assertEquals("P236", this.getStringEncoder().encode("Pfister"));
- assertEquals("J250", this.getStringEncoder().encode("Jackson"));
- assertEquals("T522", this.getStringEncoder().encode("Tymczak"));
+ assertEquals("W252", getStringEncoder().encode("Washington"));
+ assertEquals("L000", getStringEncoder().encode("Lee"));
+ assertEquals("G362", getStringEncoder().encode("Gutierrez"));
+ assertEquals("P236", getStringEncoder().encode("Pfister"));
+ assertEquals("J250", getStringEncoder().encode("Jackson"));
+ assertEquals("T522", getStringEncoder().encode("Tymczak"));
// For VanDeusen: D-250 (D, 2 for the S, 5 for the N, 0 added) is also
// possible.
- assertEquals("V532", this.getStringEncoder().encode("VanDeusen"));
+ assertEquals("V532", getStringEncoder().encode("VanDeusen"));
}
/**
@@ -168,20 +168,20 @@ public void testEncodeBatch3() {
*/
@Test
public void testEncodeBatch4() {
- assertEquals("H452", this.getStringEncoder().encode("HOLMES"));
- assertEquals("A355", this.getStringEncoder().encode("ADOMOMI"));
- assertEquals("V536", this.getStringEncoder().encode("VONDERLEHR"));
- assertEquals("B400", this.getStringEncoder().encode("BALL"));
- assertEquals("S000", this.getStringEncoder().encode("SHAW"));
- assertEquals("J250", this.getStringEncoder().encode("JACKSON"));
- assertEquals("S545", this.getStringEncoder().encode("SCANLON"));
- assertEquals("S532", this.getStringEncoder().encode("SAINTJOHN"));
+ assertEquals("H452", getStringEncoder().encode("HOLMES"));
+ assertEquals("A355", getStringEncoder().encode("ADOMOMI"));
+ assertEquals("V536", getStringEncoder().encode("VONDERLEHR"));
+ assertEquals("B400", getStringEncoder().encode("BALL"));
+ assertEquals("S000", getStringEncoder().encode("SHAW"));
+ assertEquals("J250", getStringEncoder().encode("JACKSON"));
+ assertEquals("S545", getStringEncoder().encode("SCANLON"));
+ assertEquals("S532", getStringEncoder().encode("SAINTJOHN"));
}
@Test
public void testEncodeIgnoreApostrophes() throws EncoderException {
- this.checkEncodingVariations("O165", new String[]{
+ checkEncodingVariations("O165", new String[]{
"OBrien",
"'OBrien",
"O'Brien",
@@ -198,7 +198,7 @@ public void testEncodeIgnoreApostrophes() throws EncoderException {
* @throws EncoderException for some failure scenarios */
@Test
public void testEncodeIgnoreHyphens() throws EncoderException {
- this.checkEncodingVariations("K525", new String[]{
+ checkEncodingVariations("K525", new String[]{
"KINGSMITH",
"-KINGSMITH",
"K-INGSMITH",
@@ -214,7 +214,7 @@ public void testEncodeIgnoreHyphens() throws EncoderException {
@Test
public void testEncodeIgnoreTrimmable() {
- assertEquals("W252", this.getStringEncoder().encode(" \t\n\r Washington \t\n\r "));
+ assertEquals("W252", getStringEncoder().encode(" \t\n\r Washington \t\n\r "));
}
@Test
@@ -240,10 +240,10 @@ public void testHWRuleEx1() {
// http://www.archives.gov/research_room/genealogy/census/soundex.html:
// Ashcraft is coded A-261 (A, 2 for the S, C ignored, 6 for the R, 1
// for the F). It is not coded A-226.
- assertEquals("A261", this.getStringEncoder().encode("Ashcraft"));
- assertEquals("A261", this.getStringEncoder().encode("Ashcroft"));
- assertEquals("Y330", this.getStringEncoder().encode("yehudit"));
- assertEquals("Y330", this.getStringEncoder().encode("yhwdyt"));
+ assertEquals("A261", getStringEncoder().encode("Ashcraft"));
+ assertEquals("A261", getStringEncoder().encode("Ashcroft"));
+ assertEquals("Y330", getStringEncoder().encode("yehudit"));
+ assertEquals("Y330", getStringEncoder().encode("yhwdyt"));
}
/**
@@ -253,8 +253,8 @@ public void testHWRuleEx1() {
*/
@Test
public void testHWRuleEx2() {
- assertEquals("B312", this.getStringEncoder().encode("BOOTHDAVIS"));
- assertEquals("B312", this.getStringEncoder().encode("BOOTH-DAVIS"));
+ assertEquals("B312", getStringEncoder().encode("BOOTHDAVIS"));
+ assertEquals("B312", getStringEncoder().encode("BOOTH-DAVIS"));
}
/**
@@ -263,10 +263,10 @@ public void testHWRuleEx2() {
* @throws EncoderException for some failure scenarios */
@Test
public void testHWRuleEx3() throws EncoderException {
- assertEquals("S460", this.getStringEncoder().encode("Sgler"));
- assertEquals("S460", this.getStringEncoder().encode("Swhgler"));
+ assertEquals("S460", getStringEncoder().encode("Sgler"));
+ assertEquals("S460", getStringEncoder().encode("Swhgler"));
// Also S460:
- this.checkEncodingVariations("S460", new String[]{
+ checkEncodingVariations("S460", new String[]{
"SAILOR",
"SALYER",
"SAYLOR",
@@ -291,8 +291,8 @@ public void testHWRuleEx3() throws EncoderException {
*/
@Test
public void testMsSqlServer1() {
- assertEquals("S530", this.getStringEncoder().encode("Smith"));
- assertEquals("S530", this.getStringEncoder().encode("Smythe"));
+ assertEquals("S530", getStringEncoder().encode("Smith"));
+ assertEquals("S530", getStringEncoder().encode("Smythe"));
}
/**
@@ -303,7 +303,7 @@ public void testMsSqlServer1() {
* @throws EncoderException for some failure scenarios */
@Test
public void testMsSqlServer2() throws EncoderException {
- this.checkEncodingVariations("E625", new String[]{"Erickson", "Erickson", "Erikson", "Ericson", "Ericksen", "Ericsen"});
+ checkEncodingVariations("E625", new String[]{"Erickson", "Erickson", "Erikson", "Ericson", "Ericksen", "Ericsen"});
}
/**
@@ -311,15 +311,15 @@ public void testMsSqlServer2() throws EncoderException {
*/
@Test
public void testMsSqlServer3() {
- assertEquals("A500", this.getStringEncoder().encode("Ann"));
- assertEquals("A536", this.getStringEncoder().encode("Andrew"));
- assertEquals("J530", this.getStringEncoder().encode("Janet"));
- assertEquals("M626", this.getStringEncoder().encode("Margaret"));
- assertEquals("S315", this.getStringEncoder().encode("Steven"));
- assertEquals("M240", this.getStringEncoder().encode("Michael"));
- assertEquals("R163", this.getStringEncoder().encode("Robert"));
- assertEquals("L600", this.getStringEncoder().encode("Laura"));
- assertEquals("A500", this.getStringEncoder().encode("Anne"));
+ assertEquals("A500", getStringEncoder().encode("Ann"));
+ assertEquals("A536", getStringEncoder().encode("Andrew"));
+ assertEquals("J530", getStringEncoder().encode("Janet"));
+ assertEquals("M626", getStringEncoder().encode("Margaret"));
+ assertEquals("S315", getStringEncoder().encode("Steven"));
+ assertEquals("M240", getStringEncoder().encode("Michael"));
+ assertEquals("R163", getStringEncoder().encode("Robert"));
+ assertEquals("L600", getStringEncoder().encode("Laura"));
+ assertEquals("A500", getStringEncoder().encode("Anne"));
}
/**
@@ -383,12 +383,12 @@ public void testUsEnglishStatic() {
*/
@Test
public void testUsMappingEWithAcute() {
- assertEquals("E000", this.getStringEncoder().encode("e"));
+ assertEquals("E000", getStringEncoder().encode("e"));
if (Character.isLetter('\u00e9')) { // e-acute
// uppercase E-acute
assertThrows(IllegalArgumentException.class, () -> getStringEncoder().encode("\u00e9"));
} else {
- assertEquals("", this.getStringEncoder().encode("\u00e9"));
+ assertEquals("", getStringEncoder().encode("\u00e9"));
}
}
@@ -399,12 +399,12 @@ public void testUsMappingEWithAcute() {
*/
@Test
public void testUsMappingOWithDiaeresis() {
- assertEquals("O000", this.getStringEncoder().encode("o"));
+ assertEquals("O000", getStringEncoder().encode("o"));
if (Character.isLetter('\u00f6')) { // o-umlaut
// uppercase O-umlaut
assertThrows(IllegalArgumentException.class, () -> getStringEncoder().encode("\u00f6"));
} else {
- assertEquals("", this.getStringEncoder().encode("\u00f6"));
+ assertEquals("", getStringEncoder().encode("\u00f6"));
}
}
@@ -413,11 +413,11 @@ public void testUsMappingOWithDiaeresis() {
*/
@Test
public void testWikipediaAmericanSoundex() {
- assertEquals("R163", this.getStringEncoder().encode("Robert"));
- assertEquals("R163", this.getStringEncoder().encode("Rupert"));
- assertEquals("A261", this.getStringEncoder().encode("Ashcraft"));
- assertEquals("A261", this.getStringEncoder().encode("Ashcroft"));
- assertEquals("T522", this.getStringEncoder().encode("Tymczak"));
- assertEquals("P236", this.getStringEncoder().encode("Pfister"));
+ assertEquals("R163", getStringEncoder().encode("Robert"));
+ assertEquals("R163", getStringEncoder().encode("Rupert"));
+ assertEquals("A261", getStringEncoder().encode("Ashcraft"));
+ assertEquals("A261", getStringEncoder().encode("Ashcroft"));
+ assertEquals("T522", getStringEncoder().encode("Tymczak"));
+ assertEquals("P236", getStringEncoder().encode("Pfister"));
}
}
From 0c82238e5b9a914fdd862df3f6ab0085f533b5e8 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:36 -0400
Subject: [PATCH 65/70] Remove redundant keywords
---
.../commons/codec/language/bm/BeiderMorseEncoderTest.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/test/java/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java b/src/test/java/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java
index 3e4be391aa..6558cb08b1 100644
--- a/src/test/java/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java
+++ b/src/test/java/org/apache/commons/codec/language/bm/BeiderMorseEncoderTest.java
@@ -189,7 +189,7 @@ public void testSetRuleTypeToRulesIllegalArgumentException() {
*/
@Test /* timeout = 20000L */
public void testSpeedCheck() throws EncoderException {
- final BeiderMorseEncoder bmpm = this.createGenericApproxEncoder();
+ final BeiderMorseEncoder bmpm = createGenericApproxEncoder();
final StringBuilder stringBuffer = new StringBuilder();
stringBuffer.append(TEST_CHARS[0]);
for (int i = 0, j = 1; i < 40; i++, j++) {
@@ -203,7 +203,7 @@ public void testSpeedCheck() throws EncoderException {
@Test
public void testSpeedCheck2() throws EncoderException {
- final BeiderMorseEncoder bmpm = this.createGenericApproxEncoder();
+ final BeiderMorseEncoder bmpm = createGenericApproxEncoder();
final String phrase = "ItstheendoftheworldasweknowitandIfeelfine";
for (int i = 1; i <= phrase.length(); i++) {
@@ -213,7 +213,7 @@ public void testSpeedCheck2() throws EncoderException {
@Test
public void testSpeedCheck3() throws EncoderException {
- final BeiderMorseEncoder bmpm = this.createGenericApproxEncoder();
+ final BeiderMorseEncoder bmpm = createGenericApproxEncoder();
final String phrase = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
for (int i = 1; i <= phrase.length(); i++) {
From 974cf873936633d7bb7e060b1caf119e60b60e98 Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Tue, 9 Jul 2024 08:57:37 -0400
Subject: [PATCH 66/70] Remove redundant keywords
---
.../commons/codec/net/URLCodecTest.java | 28 +++++++++----------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/test/java/org/apache/commons/codec/net/URLCodecTest.java b/src/test/java/org/apache/commons/codec/net/URLCodecTest.java
index 2f6dcc39bc..c6d5b50e07 100644
--- a/src/test/java/org/apache/commons/codec/net/URLCodecTest.java
+++ b/src/test/java/org/apache/commons/codec/net/URLCodecTest.java
@@ -54,7 +54,7 @@ public void testBasicEncodeDecode() throws Exception {
final String encoded = urlCodec.encode(plain);
assertEquals("Hello+there%21", encoded, "Basic URL encoding test");
assertEquals(plain, urlCodec.decode(encoded), "Basic URL decoding test");
- this.validateState(urlCodec);
+ validateState(urlCodec);
}
@Test
@@ -66,7 +66,7 @@ public void testDecodeInvalid() throws Exception {
assertThrows(DecoderException.class, () -> urlCodec.decode("%WW"));
// Bad 2nd char after %
assertThrows(DecoderException.class, () -> urlCodec.decode("%0W"));
- this.validateState(urlCodec);
+ validateState(urlCodec);
}
@Test
@@ -79,7 +79,7 @@ public void testDecodeInvalidContent() throws DecoderException {
for (int i = 0; i < input.length; i++) {
assertEquals(input[i], output[i]);
}
- this.validateState(urlCodec);
+ validateState(urlCodec);
}
@Test
@@ -97,7 +97,7 @@ public void testDecodeObjects() throws Exception {
assertNull(result, "Decoding a null Object should return null");
assertThrows(DecoderException.class, () -> urlCodec.decode(Double.valueOf(3.0d)), "Trying to url encode a Double object should cause an exception.");
- this.validateState(urlCodec);
+ validateState(urlCodec);
}
@Test
@@ -123,7 +123,7 @@ public void testDefaultEncoding() throws Exception {
final String encoded1 = urlCodec.encode(plain, "UnicodeBig");
final String encoded2 = urlCodec.encode(plain);
assertEquals(encoded1, encoded2);
- this.validateState(urlCodec);
+ validateState(urlCodec);
}
@Test
@@ -131,7 +131,7 @@ public void testEncodeDecodeNull() throws Exception {
final URLCodec urlCodec = new URLCodec();
assertNull(urlCodec.encode((String) null), "Null string URL encoding test");
assertNull(urlCodec.decode((String) null), "Null string URL decoding test");
- this.validateState(urlCodec);
+ validateState(urlCodec);
}
@Test
@@ -140,7 +140,7 @@ public void testEncodeNull() throws Exception {
final byte[] plain = null;
final byte[] encoded = urlCodec.encode(plain);
assertNull(encoded, "Encoding a null string should return null");
- this.validateState(urlCodec);
+ validateState(urlCodec);
}
@Test
@@ -159,7 +159,7 @@ public void testEncodeObjects() throws Exception {
assertNull(result, "Encoding a null Object should return null");
assertThrows(EncoderException.class, () -> urlCodec.encode(Double.valueOf(3.0d)), "Trying to url encode a Double object should cause an exception.");
- this.validateState(urlCodec);
+ validateState(urlCodec);
}
@Test
@@ -177,7 +177,7 @@ public void testEncodeUrlWithNullBitSet() throws Exception {
final String encoded = new String(URLCodec.encodeUrl(null, plain.getBytes(StandardCharsets.UTF_8)));
assertEquals("Hello+there%21", encoded, "Basic URL encoding test");
assertEquals(plain, urlCodec.decode(encoded), "Basic URL decoding test");
- this.validateState(urlCodec);
+ validateState(urlCodec);
}
@Test
@@ -186,7 +186,7 @@ public void testInvalidEncoding() {
final String plain = "Hello there!";
assertThrows(EncoderException.class, () -> urlCodec.encode(plain), "We set the encoding to a bogus NONSENSE value");
assertThrows(DecoderException.class, () -> urlCodec.decode(plain), "We set the encoding to a bogus NONSENSE value");
- this.validateState(urlCodec);
+ validateState(urlCodec);
}
@Test
@@ -196,7 +196,7 @@ public void testSafeCharEncodeDecode() throws Exception {
final String encoded = urlCodec.encode(plain);
assertEquals(plain, encoded, "Safe chars URL encoding test");
assertEquals(plain, urlCodec.decode(encoded), "Safe chars URL decoding test");
- this.validateState(urlCodec);
+ validateState(urlCodec);
}
@Test
@@ -206,7 +206,7 @@ public void testUnsafeEncodeDecode() throws Exception {
final String encoded = urlCodec.encode(plain);
assertEquals("%7E%21%40%23%24%25%5E%26%28%29%2B%7B%7D%22%5C%3B%3A%60%2C%2F%5B%5D", encoded, "Unsafe chars URL encoding test");
assertEquals(plain, urlCodec.decode(encoded), "Unsafe chars URL decoding test");
- this.validateState(urlCodec);
+ validateState(urlCodec);
}
@Test
@@ -216,14 +216,14 @@ public void testUTF8RoundTrip() throws Exception {
final String ch_msg = constructString(SWISS_GERMAN_STUFF_UNICODE);
final URLCodec urlCodec = new URLCodec();
- this.validateState(urlCodec);
+ validateState(urlCodec);
assertEquals("%D0%92%D1%81%D0%B5%D0%BC_%D0%BF%D1%80%D0%B8%D0%B2%D0%B5%D1%82", urlCodec.encode(ru_msg, CharEncoding.UTF_8));
assertEquals("Gr%C3%BCezi_z%C3%A4m%C3%A4", urlCodec.encode(ch_msg, CharEncoding.UTF_8));
assertEquals(ru_msg, urlCodec.decode(urlCodec.encode(ru_msg, CharEncoding.UTF_8), CharEncoding.UTF_8));
assertEquals(ch_msg, urlCodec.decode(urlCodec.encode(ch_msg, CharEncoding.UTF_8), CharEncoding.UTF_8));
- this.validateState(urlCodec);
+ validateState(urlCodec);
}
private void validateState(final URLCodec urlCodec) {
From 09ef422871b8d202d4dca1ff67d91f32723d3862 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 12 Jul 2024 12:04:02 -0400
Subject: [PATCH 67/70] Bump github/codeql-action from 3.25.11 to 3.25.12
(#294)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.25.11 to 3.25.12.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/b611370bb5703a7efb587f9d136a52ea24c5c38c...4fa2a7953630fd2f3fb380f21be14ede0169dd4f)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/codeql-analysis.yml | 6 +++---
.github/workflows/scorecards-analysis.yml | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 9037d5100d..cc793b616d 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -57,7 +57,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
- uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # 3.25.11
+ uses: github/codeql-action/init@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # 3.25.12
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -68,7 +68,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
- uses: github/codeql-action/autobuild@b611370bb5703a7efb587f9d136a52ea24c5c38c # 3.25.11
+ uses: github/codeql-action/autobuild@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # 3.25.12
# âšī¸ Command-line programs to run using the OS shell.
# đ https://git.io/JvXDl
@@ -82,4 +82,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # 3.25.11
+ uses: github/codeql-action/analyze@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # 3.25.12
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index 6f601609c7..ce3700925e 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -64,6 +64,6 @@ jobs:
retention-days: 5
- name: "Upload to code-scanning"
- uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # 3.25.11
+ uses: github/codeql-action/upload-sarif@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # 3.25.12
with:
sarif_file: results.sarif
From be06260d90edd8ad43879eb2862dac765e807cc0 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 12 Jul 2024 12:04:13 -0400
Subject: [PATCH 68/70] Bump actions/upload-artifact from 4.3.3 to 4.3.4 (#295)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.3.3 to 4.3.4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/65462800fd760344b1a7b4382951275a0abb4808...0b2256b8c012f0828dc542b3febcab082c67f72b)
---
updated-dependencies:
- dependency-name: actions/upload-artifact
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/scorecards-analysis.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/scorecards-analysis.yml b/.github/workflows/scorecards-analysis.yml
index ce3700925e..d5269bf664 100644
--- a/.github/workflows/scorecards-analysis.yml
+++ b/.github/workflows/scorecards-analysis.yml
@@ -57,7 +57,7 @@ jobs:
publish_results: true
- name: "Upload artifact"
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
+ uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: SARIF file
path: results.sarif
From 0c63e18b8a5e5b9b0195a632d136c85c1452b34f Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Fri, 12 Jul 2024 16:13:10 +0000
Subject: [PATCH 69/70] Prepare for the next release candidate
---
CONTRIBUTING.md | 9 ++++-----
README.md | 10 ++++++----
RELEASE-NOTES.txt | 34 ++++++++++++++++++++++++++++++++
src/changes/changes.xml | 2 +-
src/site/xdoc/download_codec.xml | 26 ++++++++++++------------
5 files changed, 58 insertions(+), 23 deletions(-)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 62e99f8d28..d4e74f7481 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -41,9 +41,8 @@
Contributing to Apache Commons Codec
======================
-You have found a bug or you have an idea for a cool new feature? Contributing code is a great way to give something back to
-the open source community. Before you dig right into the code there are a few guidelines that we need contributors to
-follow so that we can have a chance of keeping on top of things.
+Have you found a bug or have an idea for a cool new feature? Contributing code is a great way to give something back to the open-source community.
+Before you dig right into the code, we need contributors to follow a few guidelines to have a chance of keeping on top of things.
Getting Started
---------------
@@ -62,7 +61,7 @@ Making Changes
+ Create a _topic branch_ for your isolated work.
* Usually you should base your branch on the `master` branch.
- * A good topic branch name can be the JIRA bug id plus a keyword, e.g. `CODEC-123-InputStream`.
+ * A good topic branch name can be the JIRA bug ID plus a keyword, e.g. `CODEC-123-InputStream`.
* If you have submitted multiple JIRA issues, try to maintain separate branches and pull requests.
+ Make commits of logical units.
* Make sure your commit messages are meaningful and in the proper format. Your commit message should contain the key of the JIRA issue.
@@ -72,7 +71,7 @@ Making Changes
+ Create minimal diffs - disable _On Save_ actions like _Reformat Source Code_ or _Organize Imports_. If you feel the source code should be reformatted create a separate PR for this change first.
+ Check for unnecessary whitespace with `git diff` -- check before committing.
+ Make sure you have added the necessary tests for your changes, typically in `src/test/java`.
-+ Run all the tests with `mvn clean verify` to assure nothing else was accidentally broken.
++ Run all the tests with `mvn clean verify` to ensure nothing else was accidentally broken.
Making Trivial Changes
----------------------
diff --git a/README.md b/README.md
index 21e88e3d2f..d5750ab84e 100644
--- a/README.md
+++ b/README.md
@@ -45,11 +45,11 @@ Apache Commons Codec
[](https://github.com/apache/commons-codec/actions/workflows/maven.yml)
[](https://maven-badges.herokuapp.com/maven-central/commons-codec/commons-codec/?gav=true)
-[](https://javadoc.io/doc/commons-codec/commons-codec/1.17.0)
+[](https://javadoc.io/doc/commons-codec/commons-codec/1.17.1)
[](https://github.com/apache/commons-codec/actions/workflows/codeql-analysis.yml)
[](https://api.securityscorecards.dev/projects/github.com/apache/commons-codec)
-The Apache Commons Codec component contains encoder and decoders for
+The Apache Commons Codec component contains encoders and decoders for
various formats such as Base16, Base32, Base64, digest, and Hexadecimal. In addition to these
widely used encoders and decoders, the codec package also maintains a
collection of phonetic encoding utilities.
@@ -71,7 +71,7 @@ Alternatively, you can pull it from the central Maven repositories:
commons-codec
commons-codec
- 1.17.0
+ 1.17.1
```
@@ -91,7 +91,9 @@ There are some guidelines which will make applying PRs easier for us:
+ No tabs! Please use spaces for indentation.
+ Respect the existing code style for each file.
+ Create minimal diffs - disable on save actions like reformat source code or organize imports. If you feel the source code should be reformatted create a separate PR for this change.
-+ Provide JUnit tests for your changes and make sure your changes don't break any existing tests by running ```mvn```.
++ Provide JUnit tests for your changes and make sure your changes don't break any existing tests by running `mvn`.
++ Before you pushing a PR, run `mvn` (by itself), this runs the default goal, which contains all build checks.
++ To see the code coverage report, regardless of coverage failures, run `mvn clean site -Dcommons.jacoco.haltOnFailure=false`
If you plan to contribute on a regular basis, please consider filing a [contributor license agreement](https://www.apache.org/licenses/#clas).
You can learn more about contributing via GitHub in our [contribution guidelines](CONTRIBUTING.md).
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 920aa6171a..57ee97eb43 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -1,3 +1,37 @@
+Apache Commons Codec 1.17.1 RELEASE NOTES
+-----------------------------------------
+
+The Apache Commons Codec component contains encoders and decoders for
+various formats such as Base16, Base32, Base64, digest, and Hexadecimal. In addition to these
+widely used encoders and decoders, the codec package also maintains a
+collection of phonetic encoding utilities.
+
+Feature and fix release. Requires a minimum of Java 8.
+
+
+
+Fixed Bugs
+----------
+
+* Md5Crypt now throws IllegalArgumentException on an invalid prefix. Thanks to Gary Gregory.
+
+Changes
+-------
+
+* Bump org.apache.commons:commons-parent from 69 to 71 #286. Thanks to Gary Gregory.
+* Bump org.codehaus.mojo:animal-sniffer-maven-plugin from 1.23 to 1.24 #293. Thanks to Dependabot.
+* Bump org.codehaus.mojo:taglist-maven-plugin from 3.0.0 to 3.1.0 #292. Thanks to Dependabot.
+
+
+For complete information on Apache Commons Codec, including instructions on how to submit bug reports,
+patches, or suggestions for improvement, see the Apache Commons Codec website:
+
+https://commons.apache.org/proper/commons-codec/
+
+Download page: https://commons.apache.org/proper/commons-codec/download_codec.cgi
+
+---------------------------------------------------------------------------------
+
Apache Commons Codec 1.17.0 RELEASE NOTES
-----------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index cec1232621..8c2a9ed10a 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -43,7 +43,7 @@ The type attribute can be add,update,fix,remove.
Apache Commons Developers
-
+
Md5Crypt now throws IllegalArgumentException on an invalid prefix.
diff --git a/src/site/xdoc/download_codec.xml b/src/site/xdoc/download_codec.xml
index 21317e594b..ad48414247 100644
--- a/src/site/xdoc/download_codec.xml
+++ b/src/site/xdoc/download_codec.xml
@@ -113,32 +113,32 @@ limitations under the License.
-
+
From 965109705c5236b05011e1c45f47d991abfa521e Mon Sep 17 00:00:00 2001
From: Gary Gregory
Date: Fri, 12 Jul 2024 16:18:11 +0000
Subject: [PATCH 70/70] Prepare for the next release candidate
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 255061b36c..b6185a1d82 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@ limitations under the License.
commons-codec
commons-codec
- 1.17.1-SNAPSHOT
+ 1.17.1
Apache Commons Codec
2002
@@ -105,7 +105,7 @@ limitations under the License.
RC1
true
scm:svn:https://dist.apache.org/repos/dist/dev/commons/${commons.componentid}
- 2024-04-27T12:57:44Z
+ 2024-07-12T16:14:24Z
0.8.12
false