You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ma...@apache.org on 2021/05/14 08:34:55 UTC
[maven-docck-plugin] 01/01: Made use of Java 8 code for creating a
singletonList
This is an automated email from the ASF dual-hosted git repository.
martinkanters pushed a commit to branch httpclient5-java-8-fix
in repository https://gitbox.apache.org/repos/asf/maven-docck-plugin.git
commit ab5588ce05b89d434980ff07c3e1bcd66468d967
Author: Martin Kanters <ma...@apache.org>
AuthorDate: Fri May 14 10:34:11 2021 +0200
Made use of Java 8 code for creating a singletonList
---
.../org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java b/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java
index 81d02f5..a6fa77b 100644
--- a/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java
+++ b/src/main/java/org/apache/maven/plugin/docck/AbstractCheckDocumentationMojo.java
@@ -61,6 +61,8 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+import static java.util.Collections.singletonList;
+
/**
* Performs the heavy lifting for documentation checks. This is designed to be
* reused for other types of projects, too.
@@ -129,7 +131,7 @@ public abstract class AbstractCheckDocumentationMojo
.setResponseTimeout( Timeout.ofSeconds( 5 ) )
.setCookieSpec( StandardCookieSpec.STRICT )
.build() )
- .setDefaultHeaders( List.of( new BasicHeader( HttpHeaders.USER_AGENT, httpUserAgent ) ) );
+ .setDefaultHeaders( singletonList( new BasicHeader( HttpHeaders.USER_AGENT, httpUserAgent ) ) );
setupProxy( httpClientBuilder );