RFR: 8133686: HttpURLConnection.getHeaderFields and URLConnection.getRequestProperties methods return field values in reverse order [v2]

Chris Hegarty chegar at openjdk.java.net
Mon Feb 8 10:41:47 UTC 2021


On Fri, 29 Jan 2021 10:59:20 GMT, Evan Whelan <ewhelan at openjdk.org> wrote:

>> src/java.base/share/classes/java/net/URLConnection.java line 596:
>> 
>>> 594:      * corresponding values, they must be returned in the order they were added,
>>> 595:      * preserving the insertion-order.
>>> 596:      *
>> 
>> Here the `@implSpec` is right because it describes how subclasses should implement the method.
>> Maybe there should be an additional `@implNote` as well to describe what the default implementation does.
>> 
>>       * @implNote The default implementation of this method returns an empty map always.
>> 
>> The `@implNote` is useful for subclasses to decide whether they should override the default implementation.
>
> Added, thanks Daniel

I believe that "The default implementation ... " here should be part of the implSpec. In many other cases in the Java SE specification implSpec is used to describe the default implementation of a non-abstract member of an interface or abstract class. The implSpec is normative and as such "requires" that the actual implementation behave as such. The implNote is not normative.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2294


More information about the net-dev mailing list