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

2020-10-30 Thread Patrick Concannon
On Thu, 22 Oct 2020 14:33:11 GMT, Patrick Concannon  
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

This pull request has now been integrated.

Changeset: d1281915
Author:Patrick Concannon 
URL:   https://git.openjdk.java.net/jdk/commit/d1281915
Stats: 129 lines in 4 files changed: 27 ins; 8 del; 94 mod

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

Reviewed-by: dfuchs

-

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


RFR: 8255584: `HttpPrincipal::getName` returns incorrect name

2020-10-30 Thread Patrick Concannon
Hi,

Could someone please review my fix for JDK-8255584: '`HttpPrincipal::getName` 
returns incorrect name' ?
The specification for `HttpPrincipal::getName` reports that it should return 
the name of the HttpPrincipal in the format "realm:username". However, it 
currently returns the username only.

This fix updates the method to return the name in the correct format as 
specified by the javadoc. 

Kind regards,
Patrick

-

Commit messages:
 - 8255584: `HttpPrincipal::getName` returns incorrect name

Changes: https://git.openjdk.java.net/jdk/pull/958/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=958&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8255584
  Stats: 6 lines in 2 files changed: 4 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/958.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/958/head:pull/958

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


Re: RFR: 8255584: `HttpPrincipal::getName` returns incorrect name

2020-10-30 Thread Daniel Fuchs
On Fri, 30 Oct 2020 14:41:18 GMT, Patrick Concannon  
wrote:

> Hi,
> 
> Could someone please review my fix for JDK-8255584: '`HttpPrincipal::getName` 
> returns incorrect name' ?
> The specification for `HttpPrincipal::getName` reports that it should return 
> the name of the HttpPrincipal in the format "realm:username". However, it 
> currently returns the username only.
> 
> This fix updates the method to return the name in the correct format as 
> specified by the javadoc. 
> 
> Kind regards,
> Patrick

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

> 76:  */
> 77: public String getName() {
> 78: return String.format("%s:%s", username, realm);

Isn't it the opposite you should do Patrick :-) ?
:username```

test/jdk/com/sun/net/httpserver/HttpPrincipalTest.java line 44:

> 42: assertEquals(principal.getUsername(), "test");
> 43: assertEquals(principal.getRealm(), "123");
> 44: assertEquals(principal.getName(), "test:123");

should be "123:test" here.

-

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


Re: RFR: 8255584: `HttpPrincipal::getName` returns incorrect name [v2]

2020-10-30 Thread Patrick Concannon
> Hi,
> 
> Could someone please review my fix for JDK-8255584: '`HttpPrincipal::getName` 
> returns incorrect name' ?
> The specification for `HttpPrincipal::getName` reports that it should return 
> the name of the HttpPrincipal in the format "realm:username". However, it 
> currently returns the username only.
> 
> This fix updates the method to return the name in the correct format as 
> specified by the javadoc. 
> 
> Kind regards,
> Patrick

Patrick Concannon has updated the pull request incrementally with one 
additional commit since the last revision:

  8255584: fixed ordering of realm and username in name

-

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/958/files
  - new: https://git.openjdk.java.net/jdk/pull/958/files/fa0f7173..2ad0c8d8

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=958&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=958&range=00-01

  Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/958.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/958/head:pull/958

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


Re: RFR: 8255584: `HttpPrincipal::getName` returns incorrect name [v2]

2020-10-30 Thread Patrick Concannon
On Fri, 30 Oct 2020 15:28:16 GMT, Daniel Fuchs  wrote:

>> Patrick Concannon has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   8255584: fixed ordering of realm and username in name
>
> test/jdk/com/sun/net/httpserver/HttpPrincipalTest.java line 44:
> 
>> 42: assertEquals(principal.getUsername(), "test");
>> 43: assertEquals(principal.getRealm(), "123");
>> 44: assertEquals(principal.getName(), "test:123");
> 
> should be "123:test" here.

Fixed in commit 2ad0c8d8a0d21713b6b3cdbd59306fd4d57bf4d7

> src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpPrincipal.java 
> line 78:
> 
>> 76:  */
>> 77: public String getName() {
>> 78: return String.format("%s:%s", username, realm);
> 
> Isn't it the opposite you should do Patrick :-) ?
> :username```

Fixed in commit 2ad0c8d8a0d21713b6b3cdbd59306fd4d57bf4d7

-

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


Re: RFR: 8255584: `HttpPrincipal::getName` returns incorrect name [v2]

2020-10-30 Thread Daniel Fuchs
On Fri, 30 Oct 2020 15:57:11 GMT, Patrick Concannon  
wrote:

>> Hi,
>> 
>> Could someone please review my fix for JDK-8255584: 
>> '`HttpPrincipal::getName` returns incorrect name' ?
>> The specification for `HttpPrincipal::getName` reports that it should return 
>> the name of the HttpPrincipal in the format "realm:username". However, it 
>> currently returns the username only.
>> 
>> This fix updates the method to return the name in the correct format as 
>> specified by the javadoc. 
>> 
>> Kind regards,
>> Patrick
>
> Patrick Concannon has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   8255584: fixed ordering of realm and username in name

Marked as reviewed by dfuchs (Reviewer).

-

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