author | chegar |
Mon, 16 Apr 2018 16:44:12 +0100 | |
branch | http-client-branch |
changeset 56437 | f8b3f053cfbb |
parent 56282 | 10cebcd18d47 |
child 56451 | 9585061fdb04 |
permissions | -rw-r--r-- |
42460
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
1 |
/* |
56079
d23b02f37fce
http-client-branch: more remaining impl types to internal
chegar
parents:
56062
diff
changeset
|
2 |
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. |
42460
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
4 |
* |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. Oracle designates this |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
8 |
* particular file as subject to the "Classpath" exception as provided |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
10 |
* |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
15 |
* accompanied this code). |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
16 |
* |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License version |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
20 |
* |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
22 |
* or visit www.oracle.com if you need additional information or have any |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
23 |
* questions. |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
24 |
*/ |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
25 |
|
56092
fd85b2bf2b0d
http-client-branch: move implementation to jdk.internal.net.http
chegar
parents:
56089
diff
changeset
|
26 |
package jdk.internal.net.http; |
42460
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
27 |
|
48083 | 28 |
import java.security.AccessControlContext; |
56010 | 29 |
import java.util.Objects; |
42460
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
30 |
import java.util.concurrent.CompletableFuture; |
56089
42208b2f224e
http-client-branch: move to standard package and module name
chegar
parents:
56079
diff
changeset
|
31 |
import java.net.http.HttpRequest; |
42208b2f224e
http-client-branch: move to standard package and module name
chegar
parents:
56079
diff
changeset
|
32 |
import java.net.http.HttpResponse; |
42208b2f224e
http-client-branch: move to standard package and module name
chegar
parents:
56079
diff
changeset
|
33 |
import java.net.http.HttpResponse.BodyHandler; |
42208b2f224e
http-client-branch: move to standard package and module name
chegar
parents:
56079
diff
changeset
|
34 |
import java.net.http.HttpResponse.PushPromiseHandler; |
56268
481d8c9acc7f
http-client-branch: Add a test that throws unexpected exception in PushPromiseHandler
dfuchs
parents:
56138
diff
changeset
|
35 |
import java.util.concurrent.Executor; |
481d8c9acc7f
http-client-branch: Add a test that throws unexpected exception in PushPromiseHandler
dfuchs
parents:
56138
diff
changeset
|
36 |
|
56092
fd85b2bf2b0d
http-client-branch: move implementation to jdk.internal.net.http
chegar
parents:
56089
diff
changeset
|
37 |
import jdk.internal.net.http.common.MinimalFuture; |
fd85b2bf2b0d
http-client-branch: move implementation to jdk.internal.net.http
chegar
parents:
56089
diff
changeset
|
38 |
import jdk.internal.net.http.common.Log; |
42460
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
39 |
|
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
40 |
/** |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
41 |
* One PushGroup object is associated with the parent Stream of the pushed |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
42 |
* Streams. This keeps track of all common state associated with the pushes. |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
43 |
*/ |
56010 | 44 |
class PushGroup<T> { |
45 |
private final HttpRequest initiatingRequest; |
|
46 |
||
42460
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
47 |
final CompletableFuture<Void> noMorePushesCF; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
48 |
|
48083 | 49 |
volatile Throwable error; // any exception that occurred during pushes |
42460
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
50 |
|
48083 | 51 |
// user's subscriber object |
56010 | 52 |
final PushPromiseHandler<T> pushPromiseHandler; |
42460
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
53 |
|
56282
10cebcd18d47
http-client-branch: verify that dependent actions registered by the user in the CF we return are always executed either in the user thread that joins or asynchronously in the executor.
dfuchs
parents:
56268
diff
changeset
|
54 |
private final Executor executor; |
48083 | 55 |
|
42460
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
56 |
int numberOfPushes; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
57 |
int remainingPushes; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
58 |
boolean noMorePushes = false; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
59 |
|
56010 | 60 |
PushGroup(PushPromiseHandler<T> pushPromiseHandler, |
61 |
HttpRequestImpl initiatingRequest, |
|
56282
10cebcd18d47
http-client-branch: verify that dependent actions registered by the user in the CF we return are always executed either in the user thread that joins or asynchronously in the executor.
dfuchs
parents:
56268
diff
changeset
|
62 |
Executor executor) { |
10cebcd18d47
http-client-branch: verify that dependent actions registered by the user in the CF we return are always executed either in the user thread that joins or asynchronously in the executor.
dfuchs
parents:
56268
diff
changeset
|
63 |
this(pushPromiseHandler, initiatingRequest, new MinimalFuture<>(), executor); |
42460
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
64 |
} |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
65 |
|
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
66 |
// Check mainBodyHandler before calling nested constructor. |
56010 | 67 |
private PushGroup(HttpResponse.PushPromiseHandler<T> pushPromiseHandler, |
68 |
HttpRequestImpl initiatingRequest, |
|
48083 | 69 |
CompletableFuture<HttpResponse<T>> mainResponse, |
56282
10cebcd18d47
http-client-branch: verify that dependent actions registered by the user in the CF we return are always executed either in the user thread that joins or asynchronously in the executor.
dfuchs
parents:
56268
diff
changeset
|
70 |
Executor executor) { |
42460
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
71 |
this.noMorePushesCF = new MinimalFuture<>(); |
56010 | 72 |
this.pushPromiseHandler = pushPromiseHandler; |
73 |
this.initiatingRequest = initiatingRequest; |
|
56282
10cebcd18d47
http-client-branch: verify that dependent actions registered by the user in the CF we return are always executed either in the user thread that joins or asynchronously in the executor.
dfuchs
parents:
56268
diff
changeset
|
74 |
this.executor = executor; |
42460
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
75 |
} |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
76 |
|
56020 | 77 |
interface Acceptor<T> { |
78 |
BodyHandler<T> bodyHandler(); |
|
79 |
CompletableFuture<HttpResponse<T>> cf(); |
|
80 |
boolean accepted(); |
|
81 |
} |
|
56010 | 82 |
|
56020 | 83 |
private static class AcceptorImpl<T> implements Acceptor<T> { |
56282
10cebcd18d47
http-client-branch: verify that dependent actions registered by the user in the CF we return are always executed either in the user thread that joins or asynchronously in the executor.
dfuchs
parents:
56268
diff
changeset
|
84 |
private final Executor executor; |
56020 | 85 |
private volatile HttpResponse.BodyHandler<T> bodyHandler; |
86 |
private volatile CompletableFuture<HttpResponse<T>> cf; |
|
42460
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
87 |
|
56282
10cebcd18d47
http-client-branch: verify that dependent actions registered by the user in the CF we return are always executed either in the user thread that joins or asynchronously in the executor.
dfuchs
parents:
56268
diff
changeset
|
88 |
AcceptorImpl(Executor executor) { |
10cebcd18d47
http-client-branch: verify that dependent actions registered by the user in the CF we return are always executed either in the user thread that joins or asynchronously in the executor.
dfuchs
parents:
56268
diff
changeset
|
89 |
this.executor = executor; |
10cebcd18d47
http-client-branch: verify that dependent actions registered by the user in the CF we return are always executed either in the user thread that joins or asynchronously in the executor.
dfuchs
parents:
56268
diff
changeset
|
90 |
} |
10cebcd18d47
http-client-branch: verify that dependent actions registered by the user in the CF we return are always executed either in the user thread that joins or asynchronously in the executor.
dfuchs
parents:
56268
diff
changeset
|
91 |
|
56020 | 92 |
CompletableFuture<HttpResponse<T>> accept(BodyHandler<T> bodyHandler) { |
56010 | 93 |
Objects.requireNonNull(bodyHandler); |
56020 | 94 |
if (this.bodyHandler != null) |
95 |
throw new IllegalStateException("non-null bodyHandler"); |
|
96 |
this.bodyHandler = bodyHandler; |
|
56010 | 97 |
cf = new MinimalFuture<>(); |
56282
10cebcd18d47
http-client-branch: verify that dependent actions registered by the user in the CF we return are always executed either in the user thread that joins or asynchronously in the executor.
dfuchs
parents:
56268
diff
changeset
|
98 |
return cf.whenCompleteAsync((r,t) -> {}, executor); |
56010 | 99 |
} |
100 |
||
56020 | 101 |
@Override public BodyHandler<T> bodyHandler() { return bodyHandler; } |
56010 | 102 |
|
56020 | 103 |
@Override public CompletableFuture<HttpResponse<T>> cf() { return cf; } |
56010 | 104 |
|
56020 | 105 |
@Override public boolean accepted() { return cf != null; } |
48083 | 106 |
} |
107 |
||
56282
10cebcd18d47
http-client-branch: verify that dependent actions registered by the user in the CF we return are always executed either in the user thread that joins or asynchronously in the executor.
dfuchs
parents:
56268
diff
changeset
|
108 |
Acceptor<T> acceptPushRequest(HttpRequest pushRequest) { |
10cebcd18d47
http-client-branch: verify that dependent actions registered by the user in the CF we return are always executed either in the user thread that joins or asynchronously in the executor.
dfuchs
parents:
56268
diff
changeset
|
109 |
AcceptorImpl<T> acceptor = new AcceptorImpl<>(executor); |
56268
481d8c9acc7f
http-client-branch: Add a test that throws unexpected exception in PushPromiseHandler
dfuchs
parents:
56138
diff
changeset
|
110 |
try { |
481d8c9acc7f
http-client-branch: Add a test that throws unexpected exception in PushPromiseHandler
dfuchs
parents:
56138
diff
changeset
|
111 |
pushPromiseHandler.applyPushPromise(initiatingRequest, pushRequest, acceptor::accept); |
481d8c9acc7f
http-client-branch: Add a test that throws unexpected exception in PushPromiseHandler
dfuchs
parents:
56138
diff
changeset
|
112 |
} catch (Throwable t) { |
481d8c9acc7f
http-client-branch: Add a test that throws unexpected exception in PushPromiseHandler
dfuchs
parents:
56138
diff
changeset
|
113 |
if (acceptor.accepted()) { |
481d8c9acc7f
http-client-branch: Add a test that throws unexpected exception in PushPromiseHandler
dfuchs
parents:
56138
diff
changeset
|
114 |
CompletableFuture<?> cf = acceptor.cf(); |
56282
10cebcd18d47
http-client-branch: verify that dependent actions registered by the user in the CF we return are always executed either in the user thread that joins or asynchronously in the executor.
dfuchs
parents:
56268
diff
changeset
|
115 |
cf.completeExceptionally(t); |
56268
481d8c9acc7f
http-client-branch: Add a test that throws unexpected exception in PushPromiseHandler
dfuchs
parents:
56138
diff
changeset
|
116 |
} |
481d8c9acc7f
http-client-branch: Add a test that throws unexpected exception in PushPromiseHandler
dfuchs
parents:
56138
diff
changeset
|
117 |
throw t; |
481d8c9acc7f
http-client-branch: Add a test that throws unexpected exception in PushPromiseHandler
dfuchs
parents:
56138
diff
changeset
|
118 |
} |
42460
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
119 |
|
56062
48afabd2de78
http-client-branch: inconsistent synchronization of PushGroup
chegar
parents:
56020
diff
changeset
|
120 |
synchronized (this) { |
48afabd2de78
http-client-branch: inconsistent synchronization of PushGroup
chegar
parents:
56020
diff
changeset
|
121 |
if (acceptor.accepted()) { |
48afabd2de78
http-client-branch: inconsistent synchronization of PushGroup
chegar
parents:
56020
diff
changeset
|
122 |
numberOfPushes++; |
48afabd2de78
http-client-branch: inconsistent synchronization of PushGroup
chegar
parents:
56020
diff
changeset
|
123 |
remainingPushes++; |
56020 | 124 |
} |
56062
48afabd2de78
http-client-branch: inconsistent synchronization of PushGroup
chegar
parents:
56020
diff
changeset
|
125 |
return acceptor; |
56010 | 126 |
} |
42460
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
127 |
} |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
128 |
|
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
129 |
// This is called when the main body response completes because it means |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
130 |
// no more PUSH_PROMISEs are possible |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
131 |
|
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
132 |
synchronized void noMorePushes(boolean noMore) { |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
133 |
noMorePushes = noMore; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
134 |
checkIfCompleted(); |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
135 |
noMorePushesCF.complete(null); |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
136 |
} |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
137 |
|
56062
48afabd2de78
http-client-branch: inconsistent synchronization of PushGroup
chegar
parents:
56020
diff
changeset
|
138 |
synchronized CompletableFuture<Void> pushesCF() { |
42460
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
139 |
return noMorePushesCF; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
140 |
} |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
141 |
|
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
142 |
synchronized boolean noMorePushes() { |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
143 |
return noMorePushes; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
144 |
} |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
145 |
|
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
146 |
synchronized void pushCompleted() { |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
147 |
remainingPushes--; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
148 |
checkIfCompleted(); |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
149 |
} |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
150 |
|
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
151 |
synchronized void checkIfCompleted() { |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
152 |
if (Log.trace()) { |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
153 |
Log.logTrace("PushGroup remainingPushes={0} error={1} noMorePushes={2}", |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
154 |
remainingPushes, |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
155 |
(error==null)?error:error.getClass().getSimpleName(), |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
156 |
noMorePushes); |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
157 |
} |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
158 |
if (remainingPushes == 0 && error == null && noMorePushes) { |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
159 |
if (Log.trace()) { |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
160 |
Log.logTrace("push completed"); |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
161 |
} |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
162 |
} |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
163 |
} |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
164 |
|
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
165 |
synchronized void pushError(Throwable t) { |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
166 |
if (t == null) { |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
167 |
return; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
168 |
} |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
169 |
this.error = t; |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
170 |
} |
7133f144981a
8170648: Move java.net.http package out of Java SE to incubator namespace
michaelm
parents:
diff
changeset
|
171 |
} |