Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8151296

Remove HttpHeaders1 and make HttpHeaders thread safe

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • None
    • core-libs

      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.

            vaibhav Vaibhav Choudhary (Inactive)
            michaelm Michael McMahon
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: