RFR: 8253473: Javadoc clean up in HttpHandler, HttpPrincipal, HttpContext, and HttpsConfigurator

Daniel Fuchs dfuchs at openjdk.java.net
Wed Oct 28 14:35:49 UTC 2020


On Thu, 22 Oct 2020 14:33:11 GMT, Patrick Concannon <pconcannon at openjdk.org> wrote:

> Hi,
> 
> Could someone please review my doc-only fix for JDK-8253473: 'Javadoc clean up in HttpHandler, HttpPrincipal, HttpContext, and HttpsConfigurator ' ?
> 
> This fix is set of formatting changes intended to clean up the javadoc of the following classes :
> 
> `com.sun.net.httpserver.HttpHandler`
> `com.sun.net.httpserver.HttpPrincipal`
> `com.sun.net.httpserver.HttpContext`
> `com.sun.net.httpserver.HttpsConfigurator` 
> 
> This issue is a sub-task of [JDK-8252822](https://bugs.openjdk.java.net/browse/JDK-8252822)
> 
> Kind regards,
> Patrick

Changes requested by dfuchs (Reviewer).

src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpPrincipal.java line 57:

> 55:      * and realm are equal to this object's username and realm. Returns {@code false}
> 56:      * otherwise.
> 57:      *

Isn't this missing an @param for `another` ?

src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpPrincipal.java line 78:

> 76:     public String getName() {
> 77:         return username;
> 78:     }

Can you log a follow-up bug about this? It seems that the implementation just returns `username`, not `realm:username`.

src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpPrincipal.java line 100:

> 98:     /**
> 99:      * Returns a hashcode for this {@code HttpPrincipal}. This is calculated
> 100:      * as <code>(getUsername()+getRealm().hashCode()</code>.

There is a close parenthesis missing after `getRealm()`

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

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


More information about the net-dev mailing list