hg: jdk8/tl/jdk: 8015792: Rename Spliterators.spliteratorFromIterator to Spliterators.iterator

2013-06-10 Thread paul . sandoz
Changeset: 9c462579b624 Author:psandoz Date: 2013-06-10 12:26 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/9c462579b624 8015792: Rename Spliterators.spliteratorFromIterator to Spliterators.iterator Reviewed-by: chegar ! src/share/classes/java/util/Spliterators.java !

hg: jdk8/tl/langtools: 7113519: test/tools/javac/VersionOpt.java passes on windows

2013-06-10 Thread vicente . romero
Changeset: 105d1f9c1ab8 Author:vromero Date: 2013-06-10 15:18 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/105d1f9c1ab8 7113519: test/tools/javac/VersionOpt.java passes on windows Reviewed-by: jjg ! test/tools/javac/VersionOpt.java

hg: jdk8/tl/jdk: 8015492: Remove DoubleStream.range methods

2013-06-10 Thread paul . sandoz
Changeset: 3990fcab2cd9 Author:psandoz Date: 2013-06-10 11:52 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/3990fcab2cd9 8015492: Remove DoubleStream.range methods Reviewed-by: alanb ! src/share/classes/java/util/stream/DoubleStream.java !

Re: RFR: JDK-8013827 and JDK-8011950, , java.io.File.createTempFile enters infinite loop when passed invalid data

2013-06-10 Thread Alan Bateman
On 10/06/2013 07:26, Dan Xu wrote: Hi Alan, Thank you for the clarification. I have updated the test and if format at webrev, http://cr.openjdk.java.net/~dxu/8013827/webrev.02/. Please review it. Thanks for changing it, it looks good now. -Alan

hg: jdk8/tl/jdk: 8015798: Rename IntStream.longs/doubles and LongStream.doubles to asXxxStream

2013-06-10 Thread paul . sandoz
Changeset: 7322e8ad7c01 Author:psandoz Date: 2013-06-10 12:20 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/7322e8ad7c01 8015798: Rename IntStream.longs/doubles and LongStream.doubles to asXxxStream Reviewed-by: alanb ! src/share/classes/java/util/stream/IntPipeline.java !

Re: Proposal: Comparables.isCommutativelyComparable

2013-06-10 Thread Aleksey Shipilev
On 08.06.2013, at 23:51, Aleksey Shipilev aleksey.shipi...@oracle.com wrote: Hm, sounds interesting. What's about yet another factory-like default in Comparator: ComparatorC Comparator.make(ClassC klass) - returns synthetic comparator using C.compareTo iff C implements ComparableC -

Re: RFR 8015978: Incorrect transformation of XPath expression string(-0)

2013-06-10 Thread Aleksej Efimov
Hi Joe, We can replace the Double.isNaN(d) || Double.isInfinite(d) with !Double.isFinite(d) - I agree that this one check looks better, but we still need to do the -0.0 - 0.0 conversion to solve the reported problem. And as I understand (might be wrong) modification of this check won't help

RFR [7181748] TEST_BUG: java/lang/ThreadGroup/Suspend test fails intermittently

2013-06-10 Thread Ivan Gerasimov
Hello everyone! The test of ThreadGroup.Suspend() was reported to fail on rare occasions. It can happen on a busy machine that 1 second delay would not be enough for the second thread to start. Then the first thread would suspend only itself and the test would fail. Earlier, another test was

hg: jdk8/tl/langtools: 8013576: Add stat support to LambdaToMethod

2013-06-10 Thread maurizio . cimadamore
Changeset: 3582b62dccb2 Author:mcimadamore Date: 2013-06-10 15:57 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/3582b62dccb2 8013576: Add stat support to LambdaToMethod Summary: LambdaToMethod should emit info to help diagnose/test lambda metafactory problems

Re: Request for review: 8016046 (process) Strict validation of input should be security manager case only [win]

2013-06-10 Thread Alexey Utkin
Here is the changed version: http://cr.openjdk.java.net/~uta/openjdk-webrevs/JDK-8016046/webrev.01/ On 6/7/2013 8:02 PM, Alan Bateman wrote: On 07/06/2013 10:02, Alexey Utkin wrote: Hi, Please review the fix. Bug description: http://bugs.sun.com/view_bug.do?bug_id=8016046

Re: Request for review: 8016046 (process) Strict validation of input should be security manager case only [win]

2013-06-10 Thread Alan Bateman
On 10/06/2013 15:05, Alexey Utkin wrote: Here is the changed version: http://cr.openjdk.java.net/~uta/openjdk-webrevs/JDK-8016046/webrev.01/ This looks good to me. -Alan

Re: RFR: JDK-8013827 and JDK-8011950, , java.io.File.createTempFile enters infinite loop when passed invalid data

2013-06-10 Thread Dan Xu
On 06/03/2013 03:23 AM, Alan Bateman wrote: On 02/06/2013 03:16, Dan Xu wrote: : As for the SpecialTempFile testcase, I wonder whether these regression tests may happen to be used to test earlier JDK versions. In that case, the thread pool will help the test framework find the test failure

Re: 8016218: Warnings building corba repo due to missing hashCode methods

2013-06-10 Thread Seán Coffey
Thanks for taking care of that Alan. Those changes look fine to me. Hope the testing works out ok. regards, Sean. On 10/06/13 12:11, Alan Bateman wrote: The warnings from the build of the corba repository on missing hashCode methods have been annoying me for some time. I was hoping they

Re: 8016218: Warnings building corba repo due to missing hashCode methods

2013-06-10 Thread Daniel Fuchs
On 6/10/13 1:11 PM, Alan Bateman wrote: The warnings from the build of the corba repository on missing hashCode methods have been annoying me for some time. I was hoping they would annoy others too but looks like I blinked first :-) Here's the webrev with the changes that I'd like to push to

Re: RFR 8015492: Remove DoubleStream.range methods

2013-06-10 Thread Alan Bateman
On 03/06/2013 16:55, Paul Sandoz wrote: Hi, The following patch updates DoubleStream to remove the range methods: http://cr.openjdk.java.net/~psandoz/tl/JDK-8015492-rm-DoubleStream.range/webrev/ CCC is in progress. It's best if we let numerical libraries integrate with the Stream API

Re: Proposal: Comparables.isCommutativelyComparable

2013-06-10 Thread Doug Lea
On 06/08/13 21:52, Martin Buchholz wrote: On Sat, Jun 8, 2013 at 8:50 AM, Doug Lea d...@cs.oswego.edu mailto:d...@cs.oswego.edu wrote: Suppose you have two objects, x and y, both of the same type (x.getClass() == y.getClass()) and both known to be instanceof Comparable. Can

Re: RFR [7181748] TEST_BUG: java/lang/ThreadGroup/Suspend test fails intermittently

2013-06-10 Thread Chris Hegarty
I'm not sure I ever saw this test fail, but it does look like it has issues. I would much prefer to see a j.u.c.Latch/Phaser used to synchronize across these threads. -Chris. On 10/06/2013 13:51, Ivan Gerasimov wrote: Hello everyone! The test of ThreadGroup.Suspend() was reported to fail

RFR (S) CR 8016236: Class.getGenericInterfaces performance improvement

2013-06-10 Thread Aleksey Shipilev
Hi, This is the follow-up on the issue Doug identified: http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-June/017798.html I had reworked the patch, webrev is here: http://cr.openjdk.java.net/~shade/8016236/webrev.01/ Notable differences from Doug's version are: - handle

Re: Request for review: 8016046 (process) Strict validation of input should be security manager case only [win]

2013-06-10 Thread Alexey Utkin
Here is the changed version: http://cr.openjdk.java.net/~uta/openjdk-webrevs/JDK-8016046/webrev.01/ On 6/7/2013 8:02 PM, Alan Bateman wrote: On 07/06/2013 10:02, Alexey Utkin wrote: Hi, Please review the fix. Bug description: http://bugs.sun.com/view_bug.do?bug_id=8016046

Re: RFR 8015978: Incorrect transformation of XPath expression string(-0)

2013-06-10 Thread Joe Darcy
Hello Aleksej, Looking at the code, I have another suggestion. If this code can run exclusively on JDK 8 or later, replace 955 if (Double.isNaN(d) || Double.isInfinite(d)) 956 return(Double.toString(d)); with 955 if (!Double.isFinite(d)) 956

Re: 8016218: Warnings building corba repo due to missing hashCode methods

2013-06-10 Thread Chris Hegarty
All look good to me. These, hashCode/equals, warning have been annoying me for a while now too, but I have yet to blink! -Chris. On 10/06/2013 12:11, Alan Bateman wrote: The warnings from the build of the corba repository on missing hashCode methods have been annoying me for some time. I

8016218: Warnings building corba repo due to missing hashCode methods

2013-06-10 Thread Alan Bateman
The warnings from the build of the corba repository on missing hashCode methods have been annoying me for some time. I was hoping they would annoy others too but looks like I blinked first :-) Here's the webrev with the changes that I'd like to push to fix the issues:

Re: RFR 8015978: Incorrect transformation of XPath expression string(-0)

2013-06-10 Thread Aleksej Efimov
Joe, I definitely like it: 1. Its a one-line change - perfect size. 2. Its fastest one from discussed previously. 3. -0.0 - 0.0 has tests. 4. And it solves our problem. As a result of all props the next version of webrev: http://cr.openjdk.java.net/~coffeys/webrev.8015978.v2/

Re: 8016217: More javadoc warnings

2013-06-10 Thread Chris Hegarty
I eyeballed the patch file. Looks fine to me. It is really nice to have a tool to that operates on the actual source. -Chris. On 10/06/2013 11:31, Alan Bateman wrote: About 8 months ago I tried an early build of doclint [1] and used it to fix up a bunch issues at the time [2]. It's been

RFR (jaxp): 8016153 : Property http://javax.xml.XMLConstants/property/accessExternalDTD is not recognized.

2013-06-10 Thread huizhe wang
Hi, This patch is to continue the support of plugging in 3rd party parser impls (such as Xerces) that do not support JAXP 1.5. The fix is to catch SAXNotRecognizedException, print out a warning, and then continue as usual. The warning is for the developer in case he actually sets the new

Re: 8016217: More javadoc warnings

2013-06-10 Thread Lance Andersen - Oracle
This looks good. Thank you for taking this on Alan. Best Lance On Jun 10, 2013, at 6:31 AM, Alan Bateman wrote: About 8 months ago I tried an early build of doclint [1] and used it to fix up a bunch issues at the time [2]. It's been awhile, so I decided to try out the latest version to

Re: RFR 8015978: Incorrect transformation of XPath expression string(-0)

2013-06-10 Thread Joe Darcy
Hi Aleksej, On 6/10/2013 8:02 AM, Aleksej Efimov wrote: Hi Joe, We can replace the Double.isNaN(d) || Double.isInfinite(d) with !Double.isFinite(d) - I agree that this one check looks better, but we still need to do the -0.0 - 0.0 conversion to solve the reported problem. And as I understand

Re: 8016218: Warnings building corba repo due to missing hashCode methods

2013-06-10 Thread Alan Bateman
On 10/06/2013 16:42, Daniel Fuchs wrote: : In ParserTable.java, I wonder whether it would be worth returning a different constant for each different class. I could although I don't think they are used (and probably could be deleted). -Alan.

Re: RFR (S) CR 8016236: Class.getGenericInterfaces performance improvement

2013-06-10 Thread Paul Sandoz
On Jun 10, 2013, at 5:53 PM, Aleksey Shipilev aleksey.shipi...@oracle.com wrote: Hi, This is the follow-up on the issue Doug identified: http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-June/017798.html I had reworked the patch, webrev is here:

hg: jdk8/tl/corba: 8016218: Warnings building corba repo due to missing hashCode methods

2013-06-10 Thread alan . bateman
Changeset: 5845df371e25 Author:alanb Date: 2013-06-10 17:15 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/corba/rev/5845df371e25 8016218: Warnings building corba repo due to missing hashCode methods Reviewed-by: chegar, coffeys, dfuchs !

Re: RFR (S) CR 7177472: JSR292: MethodType interning penalizes scalability

2013-06-10 Thread Peter Levart
On 06/08/2013 10:25 PM, Peter Levart wrote: On 06/08/2013 10:17 PM, Peter Levart wrote: On 06/08/2013 12:21 PM, Remi Forax wrote: On 06/07/2013 12:01 PM, Aleksey Shipilev wrote: (posting this to hotspot-dev@ and cc-ing core-libs-dev@, as Christian T. suggested offline) Hi guys, Hi

Re: RFR (jaxp): 8016153 : Property http://javax.xml.XMLConstants/property/accessExternalDTD is not recognized.

2013-06-10 Thread Lance Andersen - Oracle
looks fine joe -lance On Jun 8, 2013, at 4:11 PM, huizhe wang wrote: Hi, This patch is to continue the support of plugging in 3rd party parser impls (such as Xerces) that do not support JAXP 1.5. The fix is to catch SAXNotRecognizedException, print out a warning, and then continue as

Re: Proposal: Comparables.isCommutativelyComparable

2013-06-10 Thread Aleksey Shipilev
Hm, sounds interesting. What's about yet another factory-like default in Comparator: ComparatorC Comparator.make(ClassC klass) - returns synthetic comparator using C.compareTo iff C implements ComparableC - returns null otherwise That will naively instantiate the Comparator, but there is

Re: RFR (S) CR 7177472: JSR292: MethodType interning penalizes scalability

2013-06-10 Thread Peter Levart
On 06/08/2013 10:17 PM, Peter Levart wrote: On 06/08/2013 12:21 PM, Remi Forax wrote: On 06/07/2013 12:01 PM, Aleksey Shipilev wrote: (posting this to hotspot-dev@ and cc-ing core-libs-dev@, as Christian T. suggested offline) Hi guys, Hi Aleksey, The fix for scalability problem is

Re: RFR (S) CR 8016236: Class.getGenericInterfaces performance improvement

2013-06-10 Thread Aleksey Shipilev
Thanks for taking a look, Paul! Can I count your review as official? On 06/10/2013 08:44 PM, Paul Sandoz wrote: - reuse ReflectionData to cache the interfaces and generic signatures Any guess on the size impact due to those new fields in ReflectionData? Seems to be additional 16 bytes

RE: 8016217: More javadoc warnings

2013-06-10 Thread Iris Clark
Hi, Alan. The changes look good to me. One thing caught my eye. In java.util.Calendar, around lines 2681 and later around 2702 you removed the blockquote --- old/src/share/classes/java/util/Calendar.java 2013-06-10 10:37:52.585879060 +0100 +++

Re: RFR (S) CR 7177472: JSR292: MethodType interning penalizes scalability

2013-06-10 Thread Peter Levart
On 06/08/2013 12:21 PM, Remi Forax wrote: On 06/07/2013 12:01 PM, Aleksey Shipilev wrote: (posting this to hotspot-dev@ and cc-ing core-libs-dev@, as Christian T. suggested offline) Hi guys, Hi Aleksey, The fix for scalability problem is here:

Re: 8016217: More javadoc warnings

2013-06-10 Thread Alan Bateman
On 10/06/2013 18:29, Iris Clark wrote: Hi, Alan. The changes look good to me. One thing caught my eye. In java.util.Calendar, around lines 2681 and later around 2702 you removed the blockquote --- old/src/share/classes/java/util/Calendar.java 2013-06-10 10:37:52.585879060 +0100 +++

Re: 8016217: More javadoc warnings

2013-06-10 Thread Mike Duigou
I took a pass through the patch and nothing leaped out at me either. I wondered about the use of nbsp; to prevent an expression from breaking across lines but decided it's OK. On Jun 10 2013, at 03:31 , Alan Bateman wrote: About 8 months ago I tried an early build of doclint [1] and used it

Dismal performance of String.intern()

2013-06-10 Thread Steven Schlansker
Hi core-libs-dev, While doing performance profiling of my application, I discovered that nearly 50% of the time deserializing JSON was spent within String.intern(). I understand that in general interning Strings is not the best approach for things, but I think I have a decent use case -- the

hg: jdk8/tl/jdk: 8013827: File.createTempFile hangs with temp file starting with 'com1.4'; ...

2013-06-10 Thread dan . xu
Changeset: 4a66dd1d7eea Author:dxu Date: 2013-06-10 11:06 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/4a66dd1d7eea 8013827: File.createTempFile hangs with temp file starting with 'com1.4' 8011950: java.io.File.createTempFile enters infinite loop when passed invalid data

Re: 8016218: Warnings building corba repo due to missing hashCode methods

2013-06-10 Thread Mike Duigou
StubDelegateImpl.java:: - Could just call Objects.hashCode(ior); RepIdDelegator:: - Could also call Objects.hashCode(delegate) as it extends nothing the super.equals(delegate) is calling Object.equals Mike On Jun 10 2013, at 04:11 , Alan Bateman wrote: The warnings from the build of the

Re: RFR (jaxp): 8016153 : Property http://javax.xml.XMLConstants/property/accessExternalDTD is not recognized.

2013-06-10 Thread huizhe wang
Thanks Lance! As Daniel noted, I added warnings to these additional property settings, but there are a couple of other places in the original JAXP 1.5 impl that did not have warning. I've added the warning message now (in ValidatorHandlerImpl.java and XMLReaderManager.java). Also, in

Re: RFR (jaxp): 8016153 : Property http://javax.xml.XMLConstants/property/accessExternalDTD is not recognized.

2013-06-10 Thread Lance Andersen - Oracle
looks OK On Jun 10, 2013, at 3:26 PM, huizhe wang wrote: Thanks Lance! As Daniel noted, I added warnings to these additional property settings, but there are a couple of other places in the original JAXP 1.5 impl that did not have warning. I've added the warning message now (in

Re: 8016218: Warnings building corba repo due to missing hashCode methods

2013-06-10 Thread Daniel Fuchs
On 6/10/13 9:04 PM, Mike Duigou wrote: StubDelegateImpl.java:: - Could just call Objects.hashCode(ior); RepIdDelegator:: - Could also call Objects.hashCode(delegate) as it extends nothing the super.equals(delegate) is calling Object.equals Depends on whether you intend to backport the patch

Re: RFR (jaxp): 8016153 : Property http://javax.xml.XMLConstants/property/accessExternalDTD is not recognized.

2013-06-10 Thread huizhe wang
Thanks! On 6/10/2013 12:28 PM, Lance Andersen - Oracle wrote: looks OK On Jun 10, 2013, at 3:26 PM, huizhe wang wrote: Thanks Lance! As Daniel noted, I added warnings to these additional property settings, but there are a couple of other places in the original JAXP 1.5 impl that did not

Re: RFR (jaxp): 8016153 : Property http://javax.xml.XMLConstants/property/accessExternalDTD is not recognized.

2013-06-10 Thread Daniel Fuchs
Hi Joe, Looks good. I wonder whether using java.util.logging would be more (or less) appropriate than System.err.println()? best regards, -- daniel On 6/10/13 9:26 PM, huizhe wang wrote: Thanks Lance! As Daniel noted, I added warnings to these additional property settings, but there are

Re: 8016218: Warnings building corba repo due to missing hashCode methods

2013-06-10 Thread Alan Bateman
On 10/06/2013 20:59, Daniel Fuchs wrote: On 6/10/13 9:04 PM, Mike Duigou wrote: StubDelegateImpl.java:: - Could just call Objects.hashCode(ior); RepIdDelegator:: - Could also call Objects.hashCode(delegate) as it extends nothing the super.equals(delegate) is calling Object.equals Depends

Re: RFR (jaxp): 8016153 : Property http://javax.xml.XMLConstants/property/accessExternalDTD is not recognized.

2013-06-10 Thread huizhe wang
On 6/10/2013 1:04 PM, Daniel Fuchs wrote: Hi Joe, Looks good. I wonder whether using java.util.logging would be more (or less) appropriate than System.err.println()? It would make sense. The current error/warning report system came from the original source. System.err is consistent with

Re: RFR (S) CR 8016236: Class.getGenericInterfaces performance improvement

2013-06-10 Thread Peter Levart
Hi Aleksey, When 'sun.reflect.noCaches=true' system property is defined, reflectionData() returns null. In that case, the code should cope without using ReflectionData (no caching). See other uses of reflectionData() (for example: in privateGetDeclaredFields())... I should note that

Re: RFR (S) CR 8016236: Class.getGenericInterfaces performance improvement

2013-06-10 Thread Peter Levart
Hi Aleksey, While you're at it adding getInterfaces() cache, why not also getSuperclass()? Is it maybe already intrinsified? Regards, Peter On 06/10/2013 05:53 PM, Aleksey Shipilev wrote: Hi, This is the follow-up on the issue Doug identified:

hg: jdk8/tl/jaxp: 8016153: Property http://javax.xml.XMLConstants/property/accessExternalDTD is not recognized.

2013-06-10 Thread huizhe . wang
Changeset: 5c84d4a878f1 Author:joehw Date: 2013-06-10 14:42 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jaxp/rev/5c84d4a878f1 8016153: Property http://javax.xml.XMLConstants/property/accessExternalDTD is not recognized. Reviewed-by: lancea, dfuchs !

Re: RFR (S) CR 8016236: Class.getGenericInterfaces performance improvement

2013-06-10 Thread Peter Levart
On 06/10/2013 10:57 PM, Peter Levart wrote: I don't think 3 fields are needed (genericSignatureResolved, genericSignature genericInfo). I think one boolean flag (say : genericInfoPresent) and genericInfo is all that is needed. If there was a singleton ClassRepository NONE instance, then even

Re: Dismal performance of String.intern()

2013-06-10 Thread Andrew Haley
On 06/10/2013 07:06 PM, Steven Schlansker wrote: I discovered that replacing String.intern() with a ConcurrentHashMap improved performance by almost an order of magnitude. I'm not the only person that discovered this and was surprised:

Re: Dismal performance of String.intern()

2013-06-10 Thread Steven Schlansker
On Jun 10, 2013, at 3:55 PM, Andrew Haley a...@redhat.com wrote: On 06/10/2013 07:06 PM, Steven Schlansker wrote: I discovered that replacing String.intern() with a ConcurrentHashMap improved performance by almost an order of magnitude. I'm not the only person that discovered this and

Re: Dismal performance of String.intern()

2013-06-10 Thread Steven Schlansker
On Jun 10, 2013, at 3:55 PM, Andrew Haley a...@redhat.com wrote: On 06/10/2013 07:06 PM, Steven Schlansker wrote: I discovered that replacing String.intern() with a ConcurrentHashMap improved performance by almost an order of magnitude. I'm not the only person that discovered this and

Re: RFR : 7129185 : (M) Add Collections.{checked|empty|unmodifiable}Navigable{Map|Set}

2013-06-10 Thread Mike Duigou
On Jun 10 2013, at 16:47 , Louis Wasserman wrote: Is there any reason that Collections.unmodifiableSortedSet() shouldn't just delegate to Collections.unmodifiableNavigableSet(), and similarly for the Maps? Some of the implementations are pre-8 and almost certainly have serialized

Review request JDK-8015912: jdeps support to output in dot file format

2013-06-10 Thread Mandy Chung
This adds jdeps --format=dot option to print the output in dot-style format that can be taken to generate a dependency graph. Webrev at: http://cr.openjdk.java.net/~mchung/jdk8/webrevs/8015912/webrev.00/ This also extends --verbose option to take an optional argument (class and package) to

RFR (jaxp): 8016133 : Regression: diff. behavior with user-defined SAXParser

2013-06-10 Thread huizhe wang
Hi, This is a quick fix on a regression caused by a previous patch. The XMLReaderFactory uses a class variable (_jarread) to indicate if service file has already been read. Along with this variable, there was another (clsFromJar ) that caches the classname if found in a service file. The 2nd

Re: Is there a better way to throw this exception?

2013-06-10 Thread David Holmes
Sorry missed the return after once() in the original code. David On 7/06/2013 5:53 PM, David Holmes wrote: Peter, On 7/06/2013 12:57 AM, Peter Levart wrote: On 06/06/2013 11:42 AM, Weijun Wang wrote: Hi All I have a method that could throw two kinds of checked exceptions and possibly other