Re: RFR: 8287390: Cleanup Map usage in AuthenticationInfo.requestAuthentication [v2]

2022-06-01 Thread Andrey Turbanov
> `AuthenticationInfo.requestAuthentication` uses separate `HashMap`'s `get` > +`put` calls. > > https://github.com/openjdk/jdk/blob/176bb23de18d9ab448e77e85a9c965a7c02f2c50/src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java#L155-L165 > > Instead we can use the `HashMa

Re: RFR: 8287390: Cleanup Map usage in AuthenticationInfo.requestAuthentication [v2]

2022-06-01 Thread Jaikiran Pai
On Wed, 1 Jun 2022 13:27:27 GMT, Andrey Turbanov wrote: >> src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java >> line 159: >> >>> 157: if (t == null || t == c) { >>> 158: assert cached == null; >>> 159: return cached; >> >>

Re: RFR: 8287390: Cleanup Map usage in AuthenticationInfo.requestAuthentication [v2]

2022-06-01 Thread Jaikiran Pai
On Wed, 1 Jun 2022 13:32:28 GMT, Andrey Turbanov wrote: >> `AuthenticationInfo.requestAuthentication` uses separate `HashMap`'s `get` >> +`put` calls. >> >> https://github.com/openjdk/jdk/blob/176bb23de18d9ab448e77e85a9c965a7c02f2c50/src/java.base/share/classes/sun/net/www/protocol/http/Authent

Re: RFR: 8287390: Cleanup Map usage in AuthenticationInfo.requestAuthentication [v2]

2022-06-01 Thread Andrey Turbanov
On Wed, 1 Jun 2022 04:08:53 GMT, Jaikiran Pai wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8287390: Cleanup Map usage in AuthenticationInfo.requestAuthentication >> remove obvious assert > > src/java.base/s

Re: RFR: 8287390: Cleanup Map usage in AuthenticationInfo.requestAuthentication

2022-06-01 Thread Daniel Fuchs
On Sat, 30 Apr 2022 10:17:43 GMT, Andrey Turbanov wrote: > `AuthenticationInfo.requestAuthentication` uses separate `HashMap`'s `get` > +`put` calls. > > https://github.com/openjdk/jdk/blob/176bb23de18d9ab448e77e85a9c965a7c02f2c50/src/java.base/share/classes/sun/net/www/protocol/http/Authentica

Re: RFR: 8287390: Cleanup Map usage in AuthenticationInfo.requestAuthentication

2022-05-31 Thread Jaikiran Pai
On Sat, 30 Apr 2022 10:17:43 GMT, Andrey Turbanov wrote: > `AuthenticationInfo.requestAuthentication` uses separate `HashMap`'s `get` > +`put` calls. > > https://github.com/openjdk/jdk/blob/176bb23de18d9ab448e77e85a9c965a7c02f2c50/src/java.base/share/classes/sun/net/www/protocol/http/Authentica

RFR: 8287390: Cleanup Map usage in AuthenticationInfo.requestAuthentication

2022-05-26 Thread Andrey Turbanov
`AuthenticationInfo.requestAuthentication` uses separate `HashMap`'s `get` +`put` calls. Thread t, c; c = Thread.currentThread(); if ((t = requests.get(key)) == null) { requests.put (key, c); assert cached == null;