Re: RFR(JDK10/JAXP) 8190823: Broken link in org/w3c/dom/ls/

2017-12-11 Thread Joe Wang
Thanks Lance! On 12/11/17, 5:49 PM, Lance Andersen wrote: looks OK joe Best Lance On Dec 11, 2017, at 4:11 PM, Joe Wang > wrote: Hi, Please review a doc-only fix for 4 dom classes. The material change is s/broken link/correct link/g,

Re: Possible bug in StackFrameInfo#getByteCodeIndex?

2017-12-11 Thread mandy chung
On 12/11/17 6:31 PM, Martin Buchholz wrote: Java has an unsigned 16 bit type.  Could bci be of type "char" ? Yes but I think keeping it short is fine. Mandy

Re: Possible bug in StackFrameInfo#getByteCodeIndex?

2017-12-11 Thread Martin Buchholz
Java has an unsigned 16 bit type. Could bci be of type "char" ? On Mon, Dec 11, 2017 at 1:53 PM, mandy chung wrote: > I filed https://bugs.openjdk.java.net/browse/JDK-8193325. I can sponsor > this patch for you. > > ---

Re: RFR(s): 8060192: Add default method Collection.toArray(generator)

2017-12-11 Thread John Rose
On Dec 11, 2017, at 6:00 PM, John Rose wrote: > > class Arrays { > // people who want x.toArray can also use x.copy(Arrays::make): > static T[] make(SequenceContent content) { … } Correction; that one needs an array type to know what to make: static T[]

Re: [10] RFR 8187254 Rearrange private MethodType constructors

2017-12-11 Thread John Rose
Good. On Dec 11, 2017, at 2:02 PM, Paul Sandoz wrote: > > Please review this small fix to collapse the two private constructors of > MethodType into one. This consolidates all the copying/validation logic into > the factory method makeImpl.

Re: RFR(s): 8060192: Add default method Collection.toArray(generator)

2017-12-11 Thread Stuart Marks
Frankly, I think the JDK is just sloppy here. Most of the existing implementations didn't use @Override -- possibly because they were introduced before annotations existed -- and later on, whoever implemented the overrides of the Java 8 default methods decided to add @Override.

Re: RFR(s): 8060192: Add default method Collection.toArray(generator)

2017-12-11 Thread John Rose
On Dec 7, 2017, at 5:03 PM, Martin Buchholz wrote: > > (I'm still trying to love this new API) > > The changes to the jsr166 tck are fine. > > I'm not convinced that the new implementation for ArrayList is progress. > The current implementation of toArray(T[]) does > >

Re: RFR(JDK10/JAXP) 8190823: Broken link in org/w3c/dom/ls/

2017-12-11 Thread Lance Andersen
looks OK joe Best Lance > On Dec 11, 2017, at 4:11 PM, Joe Wang wrote: > > Hi, > > Please review a doc-only fix for 4 dom classes. The material change is > s/broken link/correct link/g, that is replacing all occurrence of the > non-existent link

Re: RFR(s): 8140281 add no-arg Optional.orElseThrow() as preferred alternative to get()

2017-12-11 Thread Stuart Marks
On 12/9/17 1:20 AM, Stephen Colebourne wrote: On 8 December 2017 at 00:33, Stuart Marks wrote: Please review this changeset that introduces a new no-arg method orElseThrow() to Optional, as a preferred alternative to the get() method. I am willing to accept this

Re: RFR 8191216: SimpleTimeZone.clone() has a data race on cache fields

2017-12-11 Thread Peter Levart
Thanks Naoto, Alan, David and Venkat. The change is in. Regards, Peter Naoto Sato je 11. 12. 2017 ob 19:41 napisal: Hi Peter, Thanks for the tests. Looks good to me. One nit: it should throw an Exception instead of AssertionError when the test fails. No further review is needed. > Can

Re: [10] RFR 8187254 Rearrange private MethodType constructors

2017-12-11 Thread mandy chung
It looks okay to me. Mandy On 12/11/17 2:02 PM, Paul Sandoz wrote: Hi, Please review this small fix to collapse the two private constructors of MethodType into one. This consolidates all the copying/validation logic into the factory method makeImpl. Thanks, Paul. diff -r 77866b9147be

Re: Possible bug in StackFrameInfo#getByteCodeIndex?

2017-12-11 Thread mandy chung
I filed https://bugs.openjdk.java.net/browse/JDK-8193325.   I can sponsor this patch for you. --- a/src/java.base/share/classes/java/lang/StackFrameInfo.java +++ b/src/java.base/share/classes/java/lang/StackFrameInfo.java @@ -93,7 +93,7 @@ if (isNativeMethod()) return -1;

[10] RFR 8187254 Rearrange private MethodType constructors

2017-12-11 Thread Paul Sandoz
Hi, Please review this small fix to collapse the two private constructors of MethodType into one. This consolidates all the copying/validation logic into the factory method makeImpl. Thanks, Paul. diff -r 77866b9147be src/java.base/share/classes/java/lang/invoke/MethodType.java ---

RFR(JDK10/JAXP) 8190823: Broken link in org/w3c/dom/ls/

2017-12-11 Thread Joe Wang
Hi, Please review a doc-only fix for 4 dom classes. The material change is s/broken link/correct link/g, that is replacing all occurrence of the non-existent link "http://www.w3.org/TR/DOM-Level-3-Core/core.html; with https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html. Other

Re: [10]RFR 8190278: ClassCastException is thrown by java.util.Scanner when a NumberFormatProvider is used.

2017-12-11 Thread Naoto Sato
Looks good to me. Naoto On 12/11/17 1:04 AM, Nishit Jain wrote: Hi, Please review the fix for JDK-8190278 Bug: https://bugs.openjdk.java.net/browse/JDK-8190278 Webrev: http://cr.openjdk.java.net/~nishjain/8190278/webrev.03/ Fix: Modified the code to check whether the object returned by

Re: RFR 4358774: Add null InputStream and OutputStream

2017-12-11 Thread Brian Burkhalter
On Dec 8, 2017, at 3:12 PM, Brian Burkhalter wrote: > All previous suggested changes have been made in > > http://cr.openjdk.java.net/~bpb/4358774/webrev.03/ > > except for the possible change of name for the IS and OS nullStream() methods > which awaits

RFR of 8180451: ByteArrayInputStream should override readAllBytes, readNBytes, and transferTo

2017-12-11 Thread Brian Burkhalter
https://bugs.openjdk.java.net/browse/JDK-8180451 http://cr.openjdk.java.net/~bpb/8180451/webrev.00 1. Add overrides of readAllBytes(), readNBytes(), and transferTo(). 2. Simplify parameter checks in read(byte[],int,int). 3. Change foo to {@code foo}. Thanks, Brian

Re: RFR (JDK10) 8183743: Umbrella: add overloads that take a Charset parameter

2017-12-11 Thread Joe Wang
On 12/11/17, 11:18 AM, Roger Riggs wrote: Hi Joe, The new tests using testng look good, a few comments: - BAOS/EncodingTest.java 70: The message gets printed if the condition is not true; so "results do not might" might read better (also, there is Assert.assertEquals(str1, str2,

Re: [10] RFR 8171826 Comparator.reverseOrder(c) mishandles singleton comparators

2017-12-11 Thread Roger Riggs
+1 On 12/11/2017 1:58 PM, Paul Sandoz wrote: Hi, Please review this simple fix. http://cr.openjdk.java.net/~psandoz/jdk10/JDK-8171826-comparator-equality/webrev/ The method Comparator reverseOrder(Comparator cmp) is updated to be a little smarter returning constant comparators for natural

Re: RFR (JDK10) 8183743: Umbrella: add overloads that take a Charset parameter

2017-12-11 Thread Roger Riggs
Hi Joe, The new tests using testng look good, a few comments:  - BAOS/EncodingTest.java    70:  The message gets printed if the condition is not true; so "results do not might" might read better     (also, there is Assert.assertEquals(str1, str2, msg) - that compares objects with .equals())   

[10] RFR 8171826 Comparator.reverseOrder(c) mishandles singleton comparators

2017-12-11 Thread Paul Sandoz
Hi, Please review this simple fix. http://cr.openjdk.java.net/~psandoz/jdk10/JDK-8171826-comparator-equality/webrev/ The method Comparator reverseOrder(Comparator cmp) is updated to be a little smarter returning constant comparators for natural and reverse-natural. Paul.

Re: RFR 8191216: SimpleTimeZone.clone() has a data race on cache fields

2017-12-11 Thread Naoto Sato
Hi Peter, Thanks for the tests. Looks good to me. One nit: it should throw an Exception instead of AssertionError when the test fails. No further review is needed. > Can this go into JDK 10 ? You can push it before the JDK 10 fork. Naoto On 12/9/17 2:33 PM, Peter Levart wrote: Hi Naoto,

Re: FW: RFR(M): 8189102: All tools should support -?, -h and --help

2017-12-11 Thread Alan Bateman
On 07/12/2017 11:20, Lindenmaier, Goetz wrote: Hi, ... missed some lists in my first post ... I prepared a fifth webrev for this change. Please review. It incorporates the changes requested by the CSR reviewers (not to remove docuemtation of '-help' where is was documented before) and the

Re: Odd result with canonical paths with intermixed usage of java.io.File and java.nio.file.Files APIs

2017-12-11 Thread Jaikiran Pai
On 11/12/17 9:43 PM, Alan Bateman wrote: On 11/12/2017 15:46, Jaikiran Pai wrote: Thanks Alan. Given that the cache itself is being planned to be eventually removed, that answers the main part of my question and I can workaround this issue in a couple of ways (disabling the cache using that

Re: RFR: 8011697(ScriptEngine "js" randomly means either "rhino" or "nashorn", but should instead select one)

2017-12-11 Thread Alan Bateman
On 11/12/2017 15:26, Srinivas Dama wrote: Hi, Please review http://cr.openjdk.java.net/~sdama/8011697/webrev.00/ for https://bugs.openjdk.java.net/browse/JDK-8011697 Fix is to make sure ScriptEngineManager always returns a particular engine on all platforms consistently. I assume using a

Re: Odd result with canonical paths with intermixed usage of java.io.File and java.nio.file.Files APIs

2017-12-11 Thread Alan Bateman
On 11/12/2017 15:46, Jaikiran Pai wrote: Thanks Alan. Given that the cache itself is being planned to be eventually removed, that answers the main part of my question and I can workaround this issue in a couple of ways (disabling the cache using that system property is one way) in the

Re: Odd result with canonical paths with intermixed usage of java.io.File and java.nio.file.Files APIs

2017-12-11 Thread Jaikiran Pai
Moved this thread from discussions mailing list[1] to here. Comments inline. On 11/12/17 7:55 PM, Alan Bateman wrote: On 11/12/2017 14:06, Jaikiran Pai wrote: : So a few related questions that I have are:     1. Is this inconsistency an expected behaviour or is this a bug?     2. If this is

RFR: 8011697(ScriptEngine "js" randomly means either "rhino" or "nashorn", but should instead select one)

2017-12-11 Thread Srinivas Dama
Hi, Please review http://cr.openjdk.java.net/~sdama/8011697/webrev.00/ for https://bugs.openjdk.java.net/browse/JDK-8011697 Fix is to make sure ScriptEngineManager always returns a particular engine on all platforms consistently. Regards, Srinivas

[10]RFR 8190278: ClassCastException is thrown by java.util.Scanner when a NumberFormatProvider is used.

2017-12-11 Thread Nishit Jain
Hi, Please review the fix for JDK-8190278 Bug: https://bugs.openjdk.java.net/browse/JDK-8190278 Webrev: http://cr.openjdk.java.net/~nishjain/8190278/webrev.03/ Fix: Modified the code to check whether the object returned by NumberFormat#getNumberInstance(Locale) is a DecimalFormat object, if