hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r755398 - /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestDefaultHeaders.java
Date Tue, 17 Mar 2009 21:05:22 GMT
Author: olegk
Date: Tue Mar 17 21:05:22 2009
New Revision: 755398

URL: http://svn.apache.org/viewvc?rev=755398&view=rev
Log:
Minor generics tweak

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestDefaultHeaders.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestDefaultHeaders.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestDefaultHeaders.java?rev=755398&r1=755397&r2=755398&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestDefaultHeaders.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/client/protocol/RequestDefaultHeaders.java
Tue Mar 17 21:05:22 2009
@@ -67,11 +67,13 @@
         }
         
         // Add default headers
-        Collection<?> defHeaders = (Collection<?>) request.getParams().getParameter(
+        @SuppressWarnings("unchecked")
+        Collection<Header> defHeaders = (Collection<Header>) request.getParams().getParameter(
                 ClientPNames.DEFAULT_HEADERS);
+
         if (defHeaders != null) {
-            for (Object defHeader : defHeaders) {
-                request.addHeader((Header) defHeader);
+            for (Header defHeader : defHeaders) {
+                request.addHeader(defHeader);
             }
         }
     }



Mime
View raw message