From b5cce76e528a281f4afae4e6881a21b3f932888f Mon Sep 17 00:00:00 2001 From: Vitalii Bragin Date: Fri, 2 Feb 2024 17:42:20 +0300 Subject: [PATCH] fix string utils class (#339) --- pom.xml | 2 +- src/main/java/io/qameta/allure/bamboo/AllureBuildResult.java | 2 +- .../java/io/qameta/allure/bamboo/AllureReportServlet.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 54f89fd..5477b5b 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ 4.0.0 io.qameta.allure allure-bamboo - 1.17.0-SNAPSHOT + 1.18.0-SNAPSHOT Allure for Bamboo Allure reports right in deployment plans in Bamboo atlassian-plugin diff --git a/src/main/java/io/qameta/allure/bamboo/AllureBuildResult.java b/src/main/java/io/qameta/allure/bamboo/AllureBuildResult.java index 1365e31..b197234 100644 --- a/src/main/java/io/qameta/allure/bamboo/AllureBuildResult.java +++ b/src/main/java/io/qameta/allure/bamboo/AllureBuildResult.java @@ -22,7 +22,7 @@ import static io.qameta.allure.bamboo.AllureConstants.ALLURE_BUILD_REPORT_FAILURE_DETAILS; import static io.qameta.allure.bamboo.AllureConstants.ALLURE_BUILD_REPORT_SUCCESS; import static java.lang.Boolean.parseBoolean; -import static org.sonatype.aether.util.StringUtils.isEmpty; +import static org.apache.commons.lang3.StringUtils.isEmpty; class AllureBuildResult implements Serializable { private final boolean success; diff --git a/src/main/java/io/qameta/allure/bamboo/AllureReportServlet.java b/src/main/java/io/qameta/allure/bamboo/AllureReportServlet.java index cfa0a2b..7506013 100644 --- a/src/main/java/io/qameta/allure/bamboo/AllureReportServlet.java +++ b/src/main/java/io/qameta/allure/bamboo/AllureReportServlet.java @@ -19,6 +19,7 @@ import com.atlassian.bamboo.resultsummary.ResultsSummary; import com.atlassian.bamboo.resultsummary.ResultsSummaryManager; import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -41,7 +42,6 @@ import static com.atlassian.bamboo.plan.PlanKeys.getPlanResultKey; import static io.qameta.allure.bamboo.AllureBuildResult.fromCustomData; import static java.lang.Integer.parseInt; -import static org.sonatype.aether.util.StringUtils.isEmpty; public class AllureReportServlet extends HttpServlet { @@ -149,7 +149,7 @@ private boolean wasUploadSuccess(final HttpServletResponse response, private void uploadResultWasNotSuccess(final HttpServletResponse response, final AllureBuildResult uploadResult) { - final String errorMessage = isEmpty(uploadResult.getFailureDetails()) + final String errorMessage = StringUtils.isEmpty(uploadResult.getFailureDetails()) ? "Unknown error has occurred during Allure Build. Please refer the server logs for details." : "Something went wrong with Allure Report generation. Here are some details: \n" + uploadResult.getFailureDetails();