From 9087d6a95714348888ada4fcc52716075c615458 Mon Sep 17 00:00:00 2001 From: Jeremy Landis Date: Tue, 26 Dec 2023 03:20:32 -0500 Subject: [PATCH] Use only commons lang 3 within code (#1129) * [lang] Make sure only commons lang3 used commons-lang2 on path due to other legacy library, fixing issue. * [pom] Bump commons lang3 to 3.14.0 --- pom.xml | 2 +- src/main/java/net/masterthought/cucumber/Configuration.java | 2 +- src/main/java/net/masterthought/cucumber/ReportParser.java | 2 +- src/main/java/net/masterthought/cucumber/ReportResult.java | 2 +- src/main/java/net/masterthought/cucumber/Trends.java | 2 +- .../net/masterthought/cucumber/generators/OverviewReport.java | 2 +- src/main/java/net/masterthought/cucumber/json/Element.java | 2 +- src/main/java/net/masterthought/cucumber/json/Feature.java | 2 +- src/main/java/net/masterthought/cucumber/json/Hook.java | 2 +- .../net/masterthought/cucumber/json/support/StepObject.java | 2 +- .../net/masterthought/cucumber/json/support/TagObject.java | 4 ++-- .../masterthought/cucumber/reducers/ElementComparator.java | 2 +- .../masterthought/cucumber/generators/OverviewReportTest.java | 2 +- .../integrations/FeatureReportPageIntegrationTest.java | 2 +- .../cucumber/generators/integrations/PageTest.java | 2 +- .../generators/integrations/helpers/HeadAssertion.java | 2 +- .../generators/integrations/helpers/TableRowAssertion.java | 2 +- .../masterthought/cucumber/json/support/TagObjectTest.java | 2 +- 18 files changed, 19 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index 672096a9f..5541ec603 100644 --- a/pom.xml +++ b/pom.xml @@ -240,7 +240,7 @@ org.apache.commons commons-lang3 - 3.13.0 + 3.14.0 commons-io diff --git a/src/main/java/net/masterthought/cucumber/Configuration.java b/src/main/java/net/masterthought/cucumber/Configuration.java index 083858443..50b000049 100755 --- a/src/main/java/net/masterthought/cucumber/Configuration.java +++ b/src/main/java/net/masterthought/cucumber/Configuration.java @@ -16,7 +16,7 @@ import net.masterthought.cucumber.presentation.PresentationMode; import net.masterthought.cucumber.reducers.ReducingMethod; import net.masterthought.cucumber.sorting.SortingMethod; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.checkerframework.checker.nullness.qual.NonNull; public class Configuration { diff --git a/src/main/java/net/masterthought/cucumber/ReportParser.java b/src/main/java/net/masterthought/cucumber/ReportParser.java index 7f0ed6c7c..f5418078e 100755 --- a/src/main/java/net/masterthought/cucumber/ReportParser.java +++ b/src/main/java/net/masterthought/cucumber/ReportParser.java @@ -22,7 +22,7 @@ import net.masterthought.cucumber.reducers.ReducingMethod; import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.PropertiesConfiguration; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.ArrayUtils; /** diff --git a/src/main/java/net/masterthought/cucumber/ReportResult.java b/src/main/java/net/masterthought/cucumber/ReportResult.java index d10e5399e..2feb7421c 100755 --- a/src/main/java/net/masterthought/cucumber/ReportResult.java +++ b/src/main/java/net/masterthought/cucumber/ReportResult.java @@ -20,7 +20,7 @@ import net.masterthought.cucumber.json.support.TagObject; import net.masterthought.cucumber.reducers.ReportFeatureMergerFactory; import net.masterthought.cucumber.sorting.SortingFactory; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.ArrayUtils; public class ReportResult { diff --git a/src/main/java/net/masterthought/cucumber/Trends.java b/src/main/java/net/masterthought/cucumber/Trends.java index 9eaa95cd3..cefd1ceac 100644 --- a/src/main/java/net/masterthought/cucumber/Trends.java +++ b/src/main/java/net/masterthought/cucumber/Trends.java @@ -2,7 +2,7 @@ import java.util.Arrays; -import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang3.ArrayUtils; /** * Contains historical information about all and failed features, scenarios and steps. diff --git a/src/main/java/net/masterthought/cucumber/generators/OverviewReport.java b/src/main/java/net/masterthought/cucumber/generators/OverviewReport.java index a508b6022..b95c370e7 100644 --- a/src/main/java/net/masterthought/cucumber/generators/OverviewReport.java +++ b/src/main/java/net/masterthought/cucumber/generators/OverviewReport.java @@ -1,6 +1,6 @@ package net.masterthought.cucumber.generators; -import org.apache.commons.lang.NotImplementedException; +import org.apache.commons.lang3.NotImplementedException; import net.masterthought.cucumber.Reportable; import net.masterthought.cucumber.json.support.Status; diff --git a/src/main/java/net/masterthought/cucumber/json/Element.java b/src/main/java/net/masterthought/cucumber/json/Element.java index 79853df0e..6468b3e58 100644 --- a/src/main/java/net/masterthought/cucumber/json/Element.java +++ b/src/main/java/net/masterthought/cucumber/json/Element.java @@ -10,7 +10,7 @@ import net.masterthought.cucumber.json.support.Status; import net.masterthought.cucumber.json.support.StatusCounter; import net.masterthought.cucumber.util.Util; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; public class Element implements Durationable { diff --git a/src/main/java/net/masterthought/cucumber/json/Feature.java b/src/main/java/net/masterthought/cucumber/json/Feature.java index b59281ebd..7bd9707f3 100755 --- a/src/main/java/net/masterthought/cucumber/json/Feature.java +++ b/src/main/java/net/masterthought/cucumber/json/Feature.java @@ -13,7 +13,7 @@ import net.masterthought.cucumber.json.support.Status; import net.masterthought.cucumber.json.support.StatusCounter; import net.masterthought.cucumber.util.Util; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; public class Feature implements Reportable, Durationable { diff --git a/src/main/java/net/masterthought/cucumber/json/Hook.java b/src/main/java/net/masterthought/cucumber/json/Hook.java index ff9b7908a..7b6ced4ce 100644 --- a/src/main/java/net/masterthought/cucumber/json/Hook.java +++ b/src/main/java/net/masterthought/cucumber/json/Hook.java @@ -2,7 +2,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import net.masterthought.cucumber.json.deserializers.OutputsDeserializer; import net.masterthought.cucumber.json.support.Resultsable; diff --git a/src/main/java/net/masterthought/cucumber/json/support/StepObject.java b/src/main/java/net/masterthought/cucumber/json/support/StepObject.java index 22615b167..223d1a532 100644 --- a/src/main/java/net/masterthought/cucumber/json/support/StepObject.java +++ b/src/main/java/net/masterthought/cucumber/json/support/StepObject.java @@ -1,6 +1,6 @@ package net.masterthought.cucumber.json.support; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import net.masterthought.cucumber.ValidationException; import net.masterthought.cucumber.util.Util; diff --git a/src/main/java/net/masterthought/cucumber/json/support/TagObject.java b/src/main/java/net/masterthought/cucumber/json/support/TagObject.java index ba5527179..fcf149dc5 100755 --- a/src/main/java/net/masterthought/cucumber/json/support/TagObject.java +++ b/src/main/java/net/masterthought/cucumber/json/support/TagObject.java @@ -3,8 +3,8 @@ import java.util.ArrayList; import java.util.List; -import org.apache.commons.lang.NotImplementedException; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.NotImplementedException; +import org.apache.commons.lang3.StringUtils; import net.masterthought.cucumber.Reportable; import net.masterthought.cucumber.ValidationException; diff --git a/src/main/java/net/masterthought/cucumber/reducers/ElementComparator.java b/src/main/java/net/masterthought/cucumber/reducers/ElementComparator.java index 4d6f7fd7f..fc99740b2 100644 --- a/src/main/java/net/masterthought/cucumber/reducers/ElementComparator.java +++ b/src/main/java/net/masterthought/cucumber/reducers/ElementComparator.java @@ -1,7 +1,7 @@ package net.masterthought.cucumber.reducers; import net.masterthought.cucumber.json.Element; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import java.util.Comparator; diff --git a/src/test/java/net/masterthought/cucumber/generators/OverviewReportTest.java b/src/test/java/net/masterthought/cucumber/generators/OverviewReportTest.java index 7ffe57c64..8e1907faa 100644 --- a/src/test/java/net/masterthought/cucumber/generators/OverviewReportTest.java +++ b/src/test/java/net/masterthought/cucumber/generators/OverviewReportTest.java @@ -4,7 +4,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; import net.masterthought.cucumber.json.support.Status; -import org.apache.commons.lang.NotImplementedException; +import org.apache.commons.lang3.NotImplementedException; import org.junit.Test; /** diff --git a/src/test/java/net/masterthought/cucumber/generators/integrations/FeatureReportPageIntegrationTest.java b/src/test/java/net/masterthought/cucumber/generators/integrations/FeatureReportPageIntegrationTest.java index e3fba70f9..105f0ded3 100644 --- a/src/test/java/net/masterthought/cucumber/generators/integrations/FeatureReportPageIntegrationTest.java +++ b/src/test/java/net/masterthought/cucumber/generators/integrations/FeatureReportPageIntegrationTest.java @@ -27,7 +27,7 @@ import net.masterthought.cucumber.json.Row; import net.masterthought.cucumber.json.Step; import net.masterthought.cucumber.presentation.PresentationMode; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.junit.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/src/test/java/net/masterthought/cucumber/generators/integrations/PageTest.java b/src/test/java/net/masterthought/cucumber/generators/integrations/PageTest.java index 44750dbb5..c22bbb7b9 100644 --- a/src/test/java/net/masterthought/cucumber/generators/integrations/PageTest.java +++ b/src/test/java/net/masterthought/cucumber/generators/integrations/PageTest.java @@ -13,7 +13,7 @@ import net.masterthought.cucumber.generators.AbstractPage; import net.masterthought.cucumber.generators.integrations.helpers.DocumentAssertion; import net.masterthought.cucumber.json.Output; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.jsoup.Jsoup; /** diff --git a/src/test/java/net/masterthought/cucumber/generators/integrations/helpers/HeadAssertion.java b/src/test/java/net/masterthought/cucumber/generators/integrations/helpers/HeadAssertion.java index a3bba1585..f1696c1b2 100644 --- a/src/test/java/net/masterthought/cucumber/generators/integrations/helpers/HeadAssertion.java +++ b/src/test/java/net/masterthought/cucumber/generators/integrations/helpers/HeadAssertion.java @@ -1,6 +1,6 @@ package net.masterthought.cucumber.generators.integrations.helpers; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.assertj.core.api.filter.NotInFilter; import java.util.Arrays; diff --git a/src/test/java/net/masterthought/cucumber/generators/integrations/helpers/TableRowAssertion.java b/src/test/java/net/masterthought/cucumber/generators/integrations/helpers/TableRowAssertion.java index 68edc9394..effc31edc 100644 --- a/src/test/java/net/masterthought/cucumber/generators/integrations/helpers/TableRowAssertion.java +++ b/src/test/java/net/masterthought/cucumber/generators/integrations/helpers/TableRowAssertion.java @@ -2,7 +2,7 @@ import static org.assertj.core.api.Assertions.assertThat; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; /** * @author Damian Szczepanik (damianszczepanik@github) diff --git a/src/test/java/net/masterthought/cucumber/json/support/TagObjectTest.java b/src/test/java/net/masterthought/cucumber/json/support/TagObjectTest.java index c4d47386f..21387f62a 100644 --- a/src/test/java/net/masterthought/cucumber/json/support/TagObjectTest.java +++ b/src/test/java/net/masterthought/cucumber/json/support/TagObjectTest.java @@ -8,7 +8,7 @@ import net.masterthought.cucumber.ValidationException; import net.masterthought.cucumber.generators.integrations.PageTest; import net.masterthought.cucumber.json.Element; -import org.apache.commons.lang.NotImplementedException; +import org.apache.commons.lang3.NotImplementedException; import org.junit.Before; import org.junit.Test;