diff --git a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java index 8a191aef3..192af3f53 100644 --- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java +++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java @@ -2663,12 +2663,15 @@ private void populateCompileArtifactMap(Map compileArtifactMap } /** - * Method that sets the bottom text that will be displayed on the bottom of the - * javadocs. + * Method that sets the text that will be displayed on the bottom of the javadocs. * * @return a String that contains the text that will be displayed at the bottom of the javadoc */ private String getBottomText() { + if (this.bottom == null) { + return null; + } + final String inceptionYear = project.getInceptionYear(); // get Reproducible Builds outputTimestamp date value or the current local date. @@ -2678,32 +2681,29 @@ private String getBottomText() { final String currentYear = Integer.toString(localDate.getYear()); - String theBottom = StringUtils.replace(this.bottom, "{currentYear}", currentYear); + String theBottom = this.bottom.replace("{currentYear}", currentYear); if ((inceptionYear == null) || inceptionYear.equals(currentYear)) { - theBottom = StringUtils.replace(theBottom, "{inceptionYear}–", ""); + theBottom = theBottom.replace("{inceptionYear}–", ""); } else { - theBottom = StringUtils.replace(theBottom, "{inceptionYear}", inceptionYear); + theBottom = theBottom.replace("{inceptionYear}", inceptionYear); } if (project.getOrganization() == null) { - theBottom = StringUtils.replace(theBottom, " {organizationName}", ""); + theBottom = theBottom.replace(" {organizationName}", ""); } else { if (StringUtils.isNotEmpty(project.getOrganization().getName())) { if (StringUtils.isNotEmpty(project.getOrganization().getUrl())) { - theBottom = StringUtils.replace( - theBottom, + theBottom = theBottom.replace( "{organizationName}", "" + project.getOrganization().getName() + ""); } else { - theBottom = StringUtils.replace( - theBottom, - "{organizationName}", - project.getOrganization().getName()); + theBottom = theBottom.replace( + "{organizationName}", project.getOrganization().getName()); } } else { - theBottom = StringUtils.replace(theBottom, " {organizationName}", ""); + theBottom = theBottom.replace(" {organizationName}", ""); } } @@ -4813,7 +4813,7 @@ private void addGroups(List arguments) throws MavenReportException { getLog().warn("A group option is empty. Ignore this option."); } } else { - String groupTitle = StringUtils.replace(group.getTitle(), ",", ","); + String groupTitle = group.getTitle().replace(",", ","); addArgIfNotEmpty( arguments, "-group",