You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2021/10/14 17:12:28 UTC
[maven-linkcheck-plugin] branch stabilize updated: Rewrite
getExcludedPages()
This is an automated email from the ASF dual-hosted git repository.
rfscholte pushed a commit to branch stabilize
in repository https://gitbox.apache.org/repos/asf/maven-linkcheck-plugin.git
The following commit(s) were added to refs/heads/stabilize by this push:
new 8a2510c Rewrite getExcludedPages()
8a2510c is described below
commit 8a2510cffe1ce9566bd7282fc9d42407c9d073fa
Author: rfscholte <rf...@apache.org>
AuthorDate: Thu Oct 14 19:12:14 2021 +0200
Rewrite getExcludedPages()
---
.../org/apache/maven/plugins/linkcheck/LinkcheckReport.java | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java b/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
index 3b2b6ff..54f4eb0 100644
--- a/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
+++ b/src/main/java/org/apache/maven/plugins/linkcheck/LinkcheckReport.java
@@ -40,8 +40,6 @@ import org.codehaus.plexus.util.StringUtils;
import java.io.File;
import java.io.IOException;
import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.Properties;
@@ -432,13 +430,10 @@ public class LinkcheckReport
*/
private String[] getExcludedPages()
{
- List<String> pagesToExclude =
- ( excludedPages != null ? new ArrayList( Arrays.<String>asList( excludedPages ) ) : new ArrayList<String>() );
-
- // Exclude this report
- pagesToExclude.add( getOutputName() + ".html" );
-
- return (String[]) pagesToExclude.toArray( new String[pagesToExclude.size()] );
+ String[] pagesToExclude = new String[excludedPages.length + 1];
+ System.arraycopy( excludedPages, 0, pagesToExclude, 0, excludedPages.length );
+ pagesToExclude[excludedPages.length] = getOutputName() + ".html";
+ return pagesToExclude;
}
// ----------------------------------------------------------------------