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

Backout doc change introduced by JDK-8235786

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 24, 25
    • core-libs
    • None
    • minimal
    • Net effect is no change in 24. Issue will be reconsidered in 25.
    • Java API
    • JDK

      Summary

      8235786 introduced a small apidoc change which has already been integrated in 24. We would like to back out this change and address the underlying issue in a different way in 25.

      Problem

      We need to revert an API change approved in JDK 24 to the state prior to 24. So, the net effect is no API change in this release (to this API)

      Solution

      Back out the API change from 8235786

      Specification

      Below is the anti-delta to remove the spec change in 8235786

      diff a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java
      --- a/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java
      +++ b/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java
      @@ -1,7 +1,7 @@
       /*
      - * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved.
      + * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
        * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
        *
        * This code is free software; you can redistribute it and/or modify it
        * under the terms of the GNU General Public License version 2 only, as
        * published by the Free Software Foundation.  Oracle designates this
      @@ -231,33 +231,26 @@
            * @return the protocol string from the request
            */
           public abstract String getProtocol();
      
           /**
      -     * Returns the attribute's value from this exchange's
      -     * {@linkplain HttpContext#getAttributes() context attributes}.
      -     *
      -     * @apiNote {@link Filter} modules may store arbitrary objects as attributes through
      -     * {@code HttpExchange} instances as an out-of-band communication mechanism. Other filters
      +     * {@link Filter} modules may store arbitrary objects with {@code HttpExchange}
      +     * instances as an out-of-band communication mechanism. Other filters
            * or the exchange handler may then access these objects.
            *
            * <p> Each {@code Filter} class will document the attributes which they make
            * available.
            *
            * @param name the name of the attribute to retrieve
      -     * @return the attribute's value or {@code null} if either the attribute isn't set
      -     *         or the attribute value is {@code null}
      +     * @return the attribute object, or {@code null} if it does not exist
            * @throws NullPointerException if name is {@code null}
            */
           public abstract Object getAttribute(String name);
      
           /**
      -     * Sets an attribute with the given {@code name} and {@code value} in this exchange's
      -     * {@linkplain HttpContext#getAttributes() context attributes}.
      -     *
      -     * @apiNote {@link Filter} modules may store arbitrary objects as attributes through
      -     * {@code HttpExchange} instances as an out-of-band communication mechanism. Other filters
      +     * {@link Filter} modules may store arbitrary objects with {@code HttpExchange}
      +     * instances as an out-of-band communication mechanism. Other filters
            * or the exchange handler may then access these objects.
            *
            * <p> Each {@code Filter} class will document the attributes which they make
            * available.
            *
      

            michaelm Michael McMahon
            michaelm Michael McMahon
            Daniel Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: