Re: Optional.orElseChain ?

2015-04-17 Thread Andreas Lundblad
On Fri, Apr 17, 2015 at 03:01:29PM -0700, Steven Schlansker wrote: > > On Apr 17, 2015, at 2:37 PM, Remi Forax wrote: > > As you can see the code is not bad but the code of chain() could be > > simplified > > if there was a way on Optional to call a Supplier of Optional if an > > Optional is em

Re: Optional.orElseChain ?

2015-04-17 Thread Steven Schlansker
On Apr 17, 2015, at 2:37 PM, Remi Forax wrote: > As you can see the code is not bad but the code of chain() could be simplified > if there was a way on Optional to call a Supplier of Optional if an Optional > is empty. > Currently, orElse() takes a value, orElseGet takes a lambda that will retur

Optional.orElseChain ?

2015-04-17 Thread Remi Forax
Hi guys, I was trying to write a code that uses Optional and I think one method is missing. Let suppose I want to load a type (like a class, an interface, etc) that can come either by reflection, or by using ASM. I will write an interface TypeProvider that is able to load a Type and i will ch

Re: RFR 9: 8048264 : StringBuffer's codePoint methods throw unspecified IndexOutOfBoundsException

2015-04-17 Thread Brent Christian
On 4/14/15 12:10 AM, Alan Bateman wrote: On 13/04/2015 23:49, Brent Christian wrote: Hello, Please review this small javadoc change. It was discovered that some codePoint-related methods in StringBuffer are missing documentation for throwing IndexOutOfBoundsException. The methods are: code

Re: RFR 9: 8077350 Process API Updates Implementation Review (Due 4/23)

2015-04-17 Thread Roger Riggs
The webrev for ProcessAPI updates has been updated to reflect recent comments. Please review and comment by April 23rd. The updates include: - Renaming Process/ProcessHandle supportsDestroyForcibly to supportsNormalTermination and updating related descriptions - ProcessHandle.destroy/dest

Re: RFR 9: 8077350 Process API Updates Implementation Review

2015-04-17 Thread Roger Riggs
Hi David, On 4/17/2015 2:44 PM, David M. Lloyd wrote: On 04/17/2015 11:53 AM, Roger Riggs wrote: Hi Peter, On 4/17/2015 4:05 AM, Peter Levart wrote: Hi Roger, Retrieving and caching the process start time as soon as ProcessHandle is instantiated might be a good idea. "destroy" native code wo

Re: RFR 9: 8077350 Process API Updates Implementation Review

2015-04-17 Thread David M. Lloyd
On 04/17/2015 11:53 AM, Roger Riggs wrote: Hi Peter, On 4/17/2015 4:05 AM, Peter Levart wrote: Hi Roger, Retrieving and caching the process start time as soon as ProcessHandle is instantiated might be a good idea. "destroy" native code would then use pid *and* start time to check the identity

Re: RFR 9: 8077350 Process API Updates Implementation Review

2015-04-17 Thread Roger Riggs
Hi Thomas, On 4/16/2015 3:01 PM, Thomas Stüfe wrote: Hi Roger, thank you for your answer! The reason I take an interest is not just theoretical. We (SAP) use our JVM for our test infrastructure and we had exactly the problem allChildren() is designed to solve: killing a process tree related

Re: RFR 9: 8077350 Process API Updates Implementation Review

2015-04-17 Thread Roger Riggs
Hi Thomas, On 4/17/2015 4:22 AM, Thomas Stüfe wrote: Hi Roger, aside from the recycle-pid-question, one additional remark: in ProcessHandleImpl_unix.c, Java_java_lang_ProcessHandleImpl_isAlive0, you call kill(pid, 0) for the liveness check. If you have not the necessary permissions to do t

Re: RFR 9: 8077350 Process API Updates Implementation Review

2015-04-17 Thread Roger Riggs
Hi Peter, On 4/17/2015 4:05 AM, Peter Levart wrote: Hi Roger, Retrieving and caching the process start time as soon as ProcessHandle is instantiated might be a good idea. "destroy" native code would then use pid *and* start time to check the identity of the process before killing it. Yes, th

Re: RFR: 8071968: javax/xml/ws/8046817/GenerateEnumSchema.java failed on Windows platform

2015-04-17 Thread Aleksej Efimov
Hi Lance, Correct - bug is fixed by [2], just removing the test from problem list. Thank you for the review. Best Regards, Aleksej On 04/17/2015 07:44 PM, Lance Andersen wrote: Hi Aleksej, To be clear, you are just removing the test from the ProblemList.txt as the bug has since been fixed.

Re: RFR: 8071968: javax/xml/ws/8046817/GenerateEnumSchema.java failed on Windows platform

2015-04-17 Thread Lance Andersen
Hi Aleksej, To be clear, you are just removing the test from the ProblemList.txt as the bug has since been fixed. The change looks OK. Best Lance On Apr 17, 2015, at 12:29 PM, Aleksej Efimov wrote: > Hello, > > Please, review an exclusion of GenerateEnumSchema.java from ProblemList.txt > [1

Re: RFR [9] 8077332: tidy warnings from javax/xml

2015-04-17 Thread alexander stepanov
Thanks! Regards, Alexander On 17.04.2015 19:33, huizhe wang wrote: Hi Alexander, That fixed the issue in the existing Javadoc. The JAXP changes look good now. Thanks for doing this! Best, Joe On 4/17/2015 4:36 AM, alexander stepanov wrote: Hello Joe, > [jw] as I mentioned, is needed fo

Re: RFR [9] 8077332: tidy warnings from javax/xml

2015-04-17 Thread huizhe wang
Hi Alexander, That fixed the issue in the existing Javadoc. The JAXP changes look good now. Thanks for doing this! Best, Joe On 4/17/2015 4:36 AM, alexander stepanov wrote: Hello Joe, > [jw] as I mentioned, is needed for the code snippet. Fixed, please see http://cr.openjdk.java.net/~avst

RFR: 8071968: javax/xml/ws/8046817/GenerateEnumSchema.java failed on Windows platform

2015-04-17 Thread Aleksej Efimov
Hello, Please, review an exclusion of GenerateEnumSchema.java from ProblemList.txt [1]. The problem was fixed in upstream JAXWS project and was bringed over to JDK as part of sync-up process [2]. The test passes on all platforms after exclusion on JDK9 JPRT builds. With Best Regards, Aleksej

Re: RFR: 8078057: Reapply fixes for 8073361, 8073374, 8073696

2015-04-17 Thread Aleksej Efimov
Mandy, Alan, Thanks for reviews. With Best Regards, Aleksej On 04/17/2015 04:58 PM, Alan Bateman wrote: On 17/04/2015 14:31, Aleksej Efimov wrote: Hello, The latest JAXWS [1] integration to JDK9 reverted back three bug fixes in JAXWS repository: https://bugs.openjdk.java.net/browse/JDK-80733

Re: RFR: 8078057: Reapply fixes for 8073361, 8073374, 8073696

2015-04-17 Thread Alan Bateman
On 17/04/2015 14:31, Aleksej Efimov wrote: Hello, The latest JAXWS [1] integration to JDK9 reverted back three bug fixes in JAXWS repository: https://bugs.openjdk.java.net/browse/JDK-8073374 https://bugs.openjdk.java.net/browse/JDK-8073696 https://bugs.openjdk.java.net/browse/JDK-8073361 It w

Re: RFR: 8078057: Reapply fixes for 8073361, 8073374, 8073696

2015-04-17 Thread Mandy Chung
The change looks good to me. thanks Mandy On 4/17/2015 6:31 AM, Aleksej Efimov wrote: Hello, The latest JAXWS [1] integration to JDK9 reverted back three bug fixes in JAXWS repository: https://bugs.openjdk.java.net/browse/JDK-8073374 https://bugs.openjdk.java.net/browse/JDK-8073696 https://b

RFR: 8078057: Reapply fixes for 8073361, 8073374, 8073696

2015-04-17 Thread Aleksej Efimov
Hello, The latest JAXWS [1] integration to JDK9 reverted back three bug fixes in JAXWS repository: https://bugs.openjdk.java.net/browse/JDK-8073374 https://bugs.openjdk.java.net/browse/JDK-8073696 https://bugs.openjdk.java.net/browse/JDK-8073361 It was caused by skipped integration to upstream

RFR: JDK-8074859 Turn on warnings as error

2015-04-17 Thread Magnus Ihse Bursie
With JDK-8074096, the number of warnings in the product was reduced to a minimum. This enables the next step, which is turning on the respective compiler flags that turns warnings into errors. In the long run, this is the only way to keep the warnings from creeping back. Even with JDK-8074096,

Re: RFR [9] 8077332: tidy warnings from javax/xml

2015-04-17 Thread alexander stepanov
Hello Joe, > [jw] as I mentioned, is needed for the code snippet. Fixed, please see http://cr.openjdk.java.net/~avstepan/8077332/webrev.01/jaxp/src/java.xml/share/classes/javax/xml/stream/XMLStreamReader.java.udiff.html > [jw] I saw in a few cases where two @code tags are next to each other Fi

Re: RFR 9: 8077350 Process API Updates Implementation Review

2015-04-17 Thread Thomas Stüfe
Hi Roger, aside from the recycle-pid-question, one additional remark: in ProcessHandleImpl_unix.c, Java_java_lang_ProcessHandleImpl_isAlive0, you call kill(pid, 0) for the liveness check. If you have not the necessary permissions to do this call, this may fail with EPERM. In this case, isAlive()

Re: RFR 9: 8077350 Process API Updates Implementation Review

2015-04-17 Thread Thomas Stüfe
On Fri, Apr 17, 2015 at 8:40 AM, Staffan Larsen wrote: > > On 16 apr 2015, at 21:01, Thomas Stüfe wrote: > > Hi Roger, > > thank you for your answer! > > The reason I take an interest is not just theoretical. We (SAP) use our JVM > for our test infrastructure and we had exactly the problem allCh

Re: RFR 9: 8077350 Process API Updates Implementation Review

2015-04-17 Thread Peter Levart
Hi Roger, Retrieving and caching the process start time as soon as ProcessHandle is instantiated might be a good idea. "destroy" native code would then use pid *and* start time to check the identity of the process before killing it. At least on Linux (/proc//stat) and Solaris (/proc//status)