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-project-info-reports-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new d06e47b  `PlexusStringUtils` Refaster recipes (#600)
d06e47b is described below

commit d06e47b96738cefebff70736c2183dbf32f6d328
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Tue Nov 4 02:45:59 2025 +0100

    `PlexusStringUtils` Refaster recipes (#600)
    
    
    
    Co-authored-by: Moderne <[email protected]>
---
 src/main/java/org/apache/maven/report/projectinfo/LicensesReport.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/src/main/java/org/apache/maven/report/projectinfo/LicensesReport.java 
b/src/main/java/org/apache/maven/report/projectinfo/LicensesReport.java
index 7f72700..4dbbbf3 100644
--- a/src/main/java/org/apache/maven/report/projectinfo/LicensesReport.java
+++ b/src/main/java/org/apache/maven/report/projectinfo/LicensesReport.java
@@ -26,6 +26,7 @@ import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.List;
 import java.util.Locale;
+import java.util.Objects;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -41,7 +42,6 @@ import org.apache.maven.reporting.MavenReportException;
 import org.apache.maven.repository.RepositorySystem;
 import org.apache.maven.settings.Settings;
 import org.codehaus.plexus.i18n.I18N;
-import org.codehaus.plexus.util.StringUtils;
 
 /**
  * Generates the Project Licenses report.
@@ -161,7 +161,7 @@ public class LicensesReport extends 
AbstractProjectInfoReport {
         // URLs do not contain a valid authority (no hostname).
         // As a workaround accept license URLs that start with the
         // file scheme.
-        if (urlValidator.isValid(url) || 
StringUtils.defaultString(url).startsWith("file://")) {
+        if (urlValidator.isValid(url) || Objects.toString(url, 
"").startsWith("file://")) {
             try {
                 licenseUrl = new URL(url);
             } catch (MalformedURLException e) {

Reply via email to