http-client-branch: type paramater review of generic methods ( missing from first push ) http-client-branch
authorchegar
Tue, 20 Feb 2018 15:23:54 +0000
branchhttp-client-branch
changeset 56160 f1b75e394b68
parent 56159 039ab5a71a5c
child 56163 9efadce38a17
http-client-branch: type paramater review of generic methods ( missing from first push )
src/java.net.http/share/classes/java/net/http/HttpResponse.java
--- a/src/java.net.http/share/classes/java/net/http/HttpResponse.java	Tue Feb 20 14:52:06 2018 +0000
+++ b/src/java.net.http/share/classes/java/net/http/HttpResponse.java	Tue Feb 20 15:23:54 2018 +0000
@@ -241,7 +241,6 @@
          */
         public BodySubscriber<T> apply(int statusCode, HttpHeaders responseHeaders);
 
-
         /**
          * Returns a response body handler that returns a {@link BodySubscriber
          * BodySubscriber}{@code <Void>} obtained from {@link
@@ -300,7 +299,7 @@
          * @return a response body handler
          */
         public static <S extends Subscriber<? super List<ByteBuffer>>,T> BodyHandler<T>
-        fromSubscriber(S subscriber, Function<S,? extends T> finisher) {
+        fromSubscriber(S subscriber, Function<? super S,? extends T> finisher) {
             Objects.requireNonNull(subscriber);
             Objects.requireNonNull(finisher);
             return (status, headers) -> BodySubscriber.fromSubscriber(subscriber,