This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-jxr.git
commit 4572d7f8697fb706849bba55db54faea3f2c30ba Author: Sylwester Lachiewicz <[email protected]> AuthorDate: Tue Nov 17 07:04:43 2026 +0000 Replace plexus-utils StringUtils and FileUtils calls with the JDK --- .../apache/maven/plugin/jxr/AbstractJxrReport.java | 23 ++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AbstractJxrReport.java b/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AbstractJxrReport.java index 8171747..ec6496e 100644 --- a/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AbstractJxrReport.java +++ b/maven-jxr-plugin/src/main/java/org/apache/maven/plugin/jxr/AbstractJxrReport.java @@ -246,20 +246,29 @@ public abstract class AbstractJxrReport extends AbstractMavenReport { String inceptionYear = project.getInceptionYear(); - String theBottom = StringUtils.replace(this.bottom, "{currentYear}", year); + String theBottom = this.bottom == null || this.bottom.isEmpty() || year == null + ? this.bottom + : this.bottom.replace("{currentYear}", year); if (inceptionYear != null) { if (inceptionYear.equals(year)) { - theBottom = StringUtils.replace(theBottom, "{inceptionYear}\u2013", ""); + theBottom = theBottom == null || theBottom.isEmpty() + ? theBottom + : theBottom.replace("{inceptionYear}\u2013", ""); } else { - theBottom = StringUtils.replace(theBottom, "{inceptionYear}", inceptionYear); + theBottom = theBottom == null || theBottom.isEmpty() || inceptionYear == null + ? theBottom + : theBottom.replace("{inceptionYear}", inceptionYear); } } else { - theBottom = StringUtils.replace(theBottom, "{inceptionYear}\u2013", ""); + theBottom = theBottom == null || theBottom.isEmpty() + ? theBottom + : theBottom.replace("{inceptionYear}\u2013", ""); } if (project.getOrganization() == null) { - theBottom = StringUtils.replace(theBottom, " {organizationName}", ""); + theBottom = + theBottom == null || theBottom.isEmpty() ? theBottom : theBottom.replace(" {organizationName}", ""); } else { if (StringUtils.isNotEmpty(project.getOrganization().getName())) { if (StringUtils.isNotEmpty(project.getOrganization().getUrl())) { @@ -277,7 +286,9 @@ public abstract class AbstractJxrReport extends AbstractMavenReport { project.getOrganization().getName()); } } else { - theBottom = StringUtils.replace(theBottom, " {organizationName}", ""); + theBottom = theBottom == null || theBottom.isEmpty() + ? theBottom + : theBottom.replace(" {organizationName}", ""); } }
