java.net.http.HttpHeaders1 is an implementation class but was made public by mistake. Also, the current implementation approach is not thread safe.
A better approach might be to define a new class
class HttpHeadersUnmodifiable implements HttpHeaders {
HttpHeadersUnmodifiable(HttpHeadersImpl ) {}
}
The class should use final fields and the constructor above should populate these fields guaranteeing thread safety.
A better approach might be to define a new class
class HttpHeadersUnmodifiable implements HttpHeaders {
HttpHeadersUnmodifiable(HttpHeadersImpl ) {}
}
The class should use final fields and the constructor above should populate these fields guaranteeing thread safety.
- duplicates
-
JDK-8087124 HTTP/2 implementation (main part)
-
- Resolved
-