Stream.findFirst for unordered source optimization

2016-01-21 Thread Tagir F. Valeev
Hello! Seems that currently Stream.findFirst is not optimized for unordered source. I think it should work as findAny in this case. Here's a small patch which fixes this: http://cr.openjdk.java.net/~tvaleev/patches/findFirst/find_patch.txt Simple JMH test: http://cr.openjdk.java.net/~tvaleev/pat

Re: RFR JDK-8147531,To add named character construct \N{...} to support Unicode name property

2016-01-21 Thread Xueming Shen
On 1/19/16 11:43 AM, Martin Buchholz wrote: Many years ago I considered implementing this cool feature. I thought that few would find it worth the cost - it would be hard to keep the cost low if this feature is used only rarely. You might want an expiring cache of character name mappings, and th

Re: RFR: JDK-8146568 NegativeArraySizeException in ArrayList.grow(int)

2016-01-21 Thread Martin Buchholz
We have a new webrev. Bug8146568.java now uses @ignore. readObject has a minor rewrite, only assigning to elementData once. (Yes, we can talk more about future improvements to ArrayList) (maybe MAX_ARRAY_SIZE could have a better name ...) We have some hopefully clearer internal comments: /**

Re: API review of VarHandles

2016-01-21 Thread Brian Goetz
I am baffled as to how the original language syntax proposal of using some trick like "xx.volatile.imaginaryMethod()" plus maybe one or two new bytecodes was considered unacceptable; looking at this API, I know that none of the aforementioned metrics were considered as acceptance criteria. H

Re: RFR - 8132734: java.util.jar.* changes to support multi-release jar files

2016-01-21 Thread Mandy Chung
> On Jan 21, 2016, at 3:49 PM, Steve Drach wrote: > >>> I suspected this is a bike shed candidate. I think Release._9 is nicer and >>> it conveys the same information in a less cluttered way than >>> Release.RELEASE_9. >> Yes a bike shed, I'm just saying that Release._9 looks odd/inconsistent

Re: API review of VarHandles

2016-01-21 Thread Vitaly Davidovich
I think the get/setOpaque methods need a bit more explanation ("opaque" is an odd naming choice, IMO). Specifically, it says the operations are done in program order but have no effect on inter-thread ordering/visibility. Is this spec verbiage for a full compiler-only fence? On Thursday, January

Re: RFR - 8132734: java.util.jar.* changes to support multi-release jar files

2016-01-21 Thread Steve Drach
>> I suspected this is a bike shed candidate. I think Release._9 is nicer and >> it conveys the same information in a less cluttered way than >> Release.RELEASE_9. > Yes a bike shed, I'm just saying that Release._9 looks odd/inconsistent when > we have SourceVersion.RELEASE_9 elsewhere. Maybe t

Re: API review of VarHandles

2016-01-21 Thread David M. Lloyd
On 01/21/2016 04:42 PM, Paul Sandoz wrote: Hi This is a request to review the VarHandles API. The code reviews and pushes will occur separately, and flow through the hs-comp repo, most likely from the bottom up first with Unsafe changes. The specdiff can be found here: http://cr.openjdk.

Re: RFR 8065076/9, test/java/net/SocketPermission/SocketPermissionTest.java failed intermittently

2016-01-21 Thread Felix Yang
Hi Chris, your fix is cool. I will assign the bug to you:) a comment on this fix. The test changed system SecurityManager and it is not executed with othervm mode. I think you need to rollback the change after test. Otherwise it may affect other tests. Thanks, Felix > On Jan 20, 2016,

API review of VarHandles

2016-01-21 Thread Paul Sandoz
Hi This is a request to review the VarHandles API. The code reviews and pushes will occur separately, and flow through the hs-comp repo, most likely from the bottom up first with Unsafe changes. The specdiff can be found here: http://cr.openjdk.java.net/~psandoz/jdk9/varhandles/specdiff/ove

Re: RFR: JDK-8146568 NegativeArraySizeException in ArrayList.grow(int)

2016-01-21 Thread Stuart Marks
On 1/21/16 1:57 PM, Martin Buchholz wrote: One is that in list.addAll(other), the sizes of list and other exceeds Integer.MAX_VALUE, then grow(int) will be called with a negative value for minCapacity. The code *seems* to handle this ok, but the negative minCapacity value can get pretty deeply

Re: ClassFileTransformer does not apply to anonymous classes

2016-01-21 Thread Rafael Winterhalter
Hi Andrew, if there is any update on the matter, I would of course love to hear about it. Unfortunately, I never received an answer to my question, but maybe I picked the wrong list. Thank you for your support on this issue! Regards, Rafael 2016-01-21 10:07 GMT+01:00 Andrew Dinn : > Hi Rafael, > >

Re: RFR: JDK-8146568 NegativeArraySizeException in ArrayList.grow(int)

2016-01-21 Thread Martin Buchholz
On Thu, Jan 21, 2016 at 11:39 AM, Stuart Marks wrote: > Hi Martin, > > Thanks for digging into this. There are some subtle issues here. I have a > few questions. > > One is that in list.addAll(other), the sizes of list and other exceeds > Integer.MAX_VALUE, then grow(int) will be called with a neg

Re: RFR - 8132734: java.util.jar.* changes to support multi-release jar files

2016-01-21 Thread Alan Bateman
On 21/01/2016 18:02, Steve Drach wrote: : I suspected this is a bike shed candidate. I think Release._9 is nicer and it conveys the same information in a less cluttered way than Release.RELEASE_9. Yes a bike shed, I'm just saying that Release._9 looks odd/inconsistent when we have SourceVersi

Re: RFR: JDK-8146568 NegativeArraySizeException in ArrayList.grow(int)

2016-01-21 Thread Stuart Marks
Hi Martin, Thanks for digging into this. There are some subtle issues here. I have a few questions. One is that in list.addAll(other), the sizes of list and other exceeds Integer.MAX_VALUE, then grow(int) will be called with a negative value for minCapacity. The code *seems* to handle this o

Re: RFR - 8132734: java.util.jar.* changes to support multi-release jar files

2016-01-21 Thread Steve Drach
Thank you for the review Alan. See comments in line below. > Overall I think the API looks much better. With the advantage of being much simpler too. > For Release then I have to admit that I dislike _9 and wonder if other > options were considered? javax.lang.model.SourceVersion uses the RELE

Re: RFR: JDK-8144144 - ORB destroy() leaks filedescriptors after unsuccessful connection

2016-01-21 Thread Mark Sheppard
Thanks Sean i can revert the isClosed(), I put them in to make the access consistent regards Mark On 20/01/2016 18:17, Seán Coffey wrote: Hi Mark, SelectorImpl.java: line 125, could you use a 2 arg method call to dprint. It'll print the stacktrace instead : dprint(".close: selector.close: "

Re: RFR: JDK-8146568 NegativeArraySizeException in ArrayList.grow(int)

2016-01-21 Thread Martin Buchholz
PIng. How about Alan, Chris, Xueming ? On Tue, Jan 19, 2016 at 9:24 AM, Martin Buchholz wrote: > Hi Stuart et al, > Please review my fix for this corner case bug, including more > importantly some performance improvements. > > https://bugs.openjdk.java.net/browse/JDK-8146568 > http://cr.openjdk.

Re: RFR - 8132734: java.util.jar.* changes to support multi-release jar files

2016-01-21 Thread Alan Bateman
On 20/01/2016 17:56, Steve Drach wrote: Hi, This is a repeat of the RFR I sent last Wed (Jan 13). : Webrev: http://cr.openjdk.java.net/~sdrach/8132734/webrev.02/ Overall I think the API looks much better. For Release then I have to a

Re: RFR:8146218: Producing streams in java.time?

2016-01-21 Thread Tagir F. Valeev
Hello! Thank you for review! I did very small change in unit test comments to make them less confusing. Here's updated webrev: http://cr.openjdk.java.net/~tvaleev/webrev/8146218/r3/ With best regards, Tagir Valeev. SC> I'm happy with the logic and specification of this proposal. I think it SC>

Re: RFR[9u-dev] 8130425: libjvm crash due to stack overflow in executables with 32k tbss/tdata

2016-01-21 Thread Peter Levart
On 01/21/2016 09:57 AM, David Holmes wrote: The cc's are going dropped unfortunately - adding by serviceability. On 21/01/2016 1:19 AM, Peter Levart wrote: Hi, On 01/20/2016 03:09 PM, Roger Riggs wrote: Hi David, I read an old description; I was expecting the value of the property to be t

Re: ClassFileTransformer does not apply to anonymous classes

2016-01-21 Thread Andrew Dinn
Hi Rafael, On 01/12/15 12:45, Rafael Winterhalter wrote: > I can tell that this behavior has not only affected me as I had this > question comming up by multiple users of my open-source code generation > library. > > What is your view on this? > > Thank you for your feedback! I have an interest

Re: RFR[9u-dev] 8130425: libjvm crash due to stack overflow in executables with 32k tbss/tdata

2016-01-21 Thread David Holmes
The cc's are going dropped unfortunately - adding by serviceability. On 21/01/2016 1:19 AM, Peter Levart wrote: Hi, On 01/20/2016 03:09 PM, Roger Riggs wrote: Hi David, I read an old description; I was expecting the value of the property to be the stack size for the reaper. That would allow