You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2019/05/19 10:14:05 UTC

[httpcomponents-core] 03/04: Fixed possible heap pollution from parameterized vararg type warnings

This is an automated email from the ASF dual-hosted git repository.

olegk pushed a commit to branch bug-fixes
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git

commit be4471f4fa69e4ac7566133eca09950ab4bed828
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Sun May 19 12:08:33 2019 +0200

    Fixed possible heap pollution from parameterized vararg type warnings
---
 .../main/java/org/apache/hc/core5/http/protocol/ChainBuilder.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ChainBuilder.java b/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ChainBuilder.java
index 9eaa282..d9d0e81 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ChainBuilder.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/http/protocol/ChainBuilder.java
@@ -86,7 +86,8 @@ final class ChainBuilder<E> {
         return this;
     }
 
-    public ChainBuilder<E> addAllFirst(final E... c) {
+    @SafeVarargs
+    public final ChainBuilder<E> addAllFirst(final E... c) {
         if (c == null) {
             return this;
         }
@@ -106,7 +107,8 @@ final class ChainBuilder<E> {
         return this;
     }
 
-    public ChainBuilder<E> addAllLast(final E... c) {
+    @SafeVarargs
+    public final ChainBuilder<E> addAllLast(final E... c) {
         if (c == null) {
             return this;
         }