Skip to content

Commit

Permalink
[MNG-6829] Replace StringUtils#isEmpty(String) & #isNotEmpty(String) (#…
Browse files Browse the repository at this point in the history
…641)

Last batch of is(Not)Empty for https://issues.apache.org/jira/browse/MNG-6829
These are the smallest change sets, hence why I opened more at the same time.
After this we can target the next most often used method from the StringUtils classes.


Use this link to re-run the recipe: https://public.moderne.io/recipes/org.openrewrite.java.migrate.apache.commons.lang.IsNotEmptyToJdk?organizationId=QXBhY2hlIE1hdmVu

Co-authored-by: Moderne <team@moderne.io>
  • Loading branch information
timtebeek and TeamModerne committed May 23, 2023
1 parent e27ff14 commit 2d739c2
Showing 1 changed file with 1 addition and 2 deletions.
Expand Up @@ -49,7 +49,6 @@

import static java.util.Collections.addAll;
import static org.apache.maven.plugins.surefire.report.SurefireReportParser.hasReportFiles;
import static org.apache.maven.shared.utils.StringUtils.isEmpty;

/**
* Abstract base class for reporting test results using Surefire.
Expand Down Expand Up @@ -272,7 +271,7 @@ private String determineXrefLocation() {

if (linkXRef) {
String relativePath = PathTool.getRelativePath(getOutputDirectory(), xrefLocation.getAbsolutePath());
if (isEmpty(relativePath)) {
if (relativePath == null || relativePath.isEmpty()) {
relativePath = ".";
}
relativePath = relativePath + "/" + xrefLocation.getName();
Expand Down

0 comments on commit 2d739c2

Please sign in to comment.