[cp-patches] FYI: Use generics internally to some HTTP code.

David Daney ddaney at avtrex.com
Fri Dec 15 07:35:56 UTC 2006

In the spirit of using the new generic type capability of Classpath, and 
because I already did it while looking at the bug in Collecions, I offer 
up this nice patch.

In two of the HTTP support classes I converted a couple of things to use 

2006-12-14  David Daney  <ddaney at avtrex.com>

    * gnu/java/net/protocol/http/HTTPURLConnection.java: Clean
    (getHeaderFields): Change return type to Map<String,List<String>>
    * gnu/java/net/protocol/http/Headers.java: Clean imports.
    (headers) Change type to ArrayList<HeaderElement>.
    (iterator) Change return type to Iterator<HeaderElement>.
    (getValue) Remove casts.
    (put) Same.
    (putAll) Same.
    (remove) Same.
    (getAsMap) Change return type to Map<String,List<String>> and use
    generics internally.
    (getHeaderName) Remove casts.
    (getHeaderValue) Same.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: http-generic.diff
Type: text/x-patch
Size: 5317 bytes
Desc: not available
Url : http://developer.classpath.org/pipermail/classpath-patches/attachments/20061214/c5133742/http-generic.bin

More information about the Classpath-patches mailing list