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

Javadoc for com/sun/net/httpserver/HttpExchange.java#setAttribute is unclear

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 24
    • 8, 14
    • core-libs
    • b27
    • x86
    • os_x
    • Verified

      A DESCRIPTION OF THE PROBLEM :
      Javadoc for com/sun/net/httpserver/HttpExchange.java#setAttribute and com/sun/net/httpserver/HttpExchange.java#getAttribute should make it clear that attributes are not per-exchange but are shared for exchanges on the same HttpContext. The current description can be misunderstood:

      https://hg.openjdk.java.net/jdk/jdk/file/a4fb32538898/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java#l219
      "Filter modules may store arbitrary objects with HttpExchange instances as an out-of-band communication mechanism."

      See also https://mail.openjdk.java.net/pipermail/net-dev/2019-December/013420.html
      See also https://stackoverflow.com/questions/59178977/are-com-sun-net-httpserver-httpexchange-attributes-broken


      FREQUENCY : always


            jpai Jaikiran Pai
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: