RFR: 8199849 HttpServer/BasicAuthenticator: unicode bytes are not correctly handled and no workaround is provided

2018-12-12 Thread Michael McMahon
Could I get the following webrev reviewed please? http://cr.openjdk.java.net/~michaelm/8199849/webrev.1/ A CSR for the small API change will follow. Thanks, Michael

Re: RFR: 8199849 HttpServer/BasicAuthenticator: unicode bytes are not correctly handled and no workaround is provided

2018-12-12 Thread Daniel Fuchs
Hi Michael, BasicAuthentication.java: An alternative to: byte[] passwdBytes = (new String(passwd)).getBytes(cs); would be: ByteBuffer bb = cs.newEncoder() .encode(CharBuffer.wrap(passwd)); then use ByteBuffer::get to copy the bytes into `concat` Or better you could construct a Cha

Re: RFR: 8199849 HttpServer/BasicAuthenticator: unicode bytes are not correctly handled and no workaround is provided

2018-12-12 Thread Michael McMahon
Hi Daniel, On 12/12/2018, 11:46, Daniel Fuchs wrote: Hi Michael, BasicAuthentication.java: An alternative to: byte[] passwdBytes = (new String(passwd)).getBytes(cs); would be: ByteBuffer bb = cs.newEncoder() .encode(CharBuffer.wrap(passwd)); then use ByteBuffer::get to copy the b

RFR [12] 8215292: Back out changes for node- and link- local ipv6 multicast address

2018-12-12 Thread Pavel Rappo
Hello, Please review the following change: http://cr.openjdk.java.net/~prappo/8215292/webrev.00 That change backs out the fix for "Bind to node- or linklocal ipv6 multicast address fails" [1]. The change in question is produced as: hg diff -c 23b3a46fa159 --reverse --git After I have appl

Re: RFR [12] 8215292: Back out changes for node- and link- local ipv6 multicast address

2018-12-12 Thread Chris Hegarty
The backout looks correct, and I agree with the approach. -Chris. On 12/12/2018 16:09, Pavel Rappo wrote: Hello, Please review the following change: http://cr.openjdk.java.net/~prappo/8215292/webrev.00 That change backs out the fix for "Bind to node- or linklocal ipv6 multicast address fai

Re: RFR [12] 8215292: Back out changes for node- and link- local ipv6 multicast address

2018-12-12 Thread Alan Bateman
On 12/12/2018 16:15, Chris Hegarty wrote: The backout looks correct, and I agree with the approach. -Chris. On 12/12/2018 16:09, Pavel Rappo wrote: Hello, Please review the following change:   http://cr.openjdk.java.net/~prappo/8215292/webrev.00 That change backs out the fix for "Bind to

RFR: 8215281: Use String.isEmpty() where applicable in java.base

2018-12-12 Thread Claes Redestad
Hi, please review this patch to use String.isEmpty when applicable: Webrev: http://cr.openjdk.java.net/~redestad/8215281/jdk.00/ Bug: https://bugs.openjdk.java.net/browse/JDK-8215281 Why? - It reads better :-) - Better startup/warmup due fewer method invocations - Better peak performance: Strin

Re: RFR: 8215281: Use String.isEmpty() where applicable in java.base

2018-12-12 Thread Daniel Fuchs
Hi Claes, It might read even better if things like: +resultString = !specarg.isEmpty() ? specarg.intern(): opt; were changed into: +resultString = specarg.isEmpty() ? opt : specarg.intern(); best regards, -- daniel On 12/12/2018 16:53, Claes Redestad wrote: Hi, please revi

Re: RFR: 8215281: Use String.isEmpty() where applicable in java.base

2018-12-12 Thread Alan Bateman
On 12/12/2018 16:53, Claes Redestad wrote: Hi, please review this patch to use String.isEmpty when applicable: Webrev: http://cr.openjdk.java.net/~redestad/8215281/jdk.00/ Bug: https://bugs.openjdk.java.net/browse/JDK-8215281 Why? - It reads better :-) - Better startup/warmup due fewer method

Re: RFR: 8215281: Use String.isEmpty() where applicable in java.base

2018-12-12 Thread Claes Redestad
On 2018-12-12 17:56, Alan Bateman wrote: In Checks.java, the parameter change from CharSequence to String means that "cs" needs to be renamed. Changed to 'str' /Claes

Re: RFR: 8215281: Use String.isEmpty() where applicable in java.base

2018-12-12 Thread Claes Redestad
On 2018-12-12 17:54, Daniel Fuchs wrote: Hi Claes, It might read even better if things like: +    resultString = !specarg.isEmpty() ? specarg.intern(): opt; were changed into: +    resultString = specarg.isEmpty() ? opt : specarg.intern(); best regards, I only found this pattern