Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Remi Forax
On 12/06/2012 06:10 AM, David Holmes wrote: On 6/12/2012 5:39 AM, Akhil Arora wrote: This patch adds a constructor to ThreadLocal to supply initial values using the new Supplier functional interface. Please review. This work was done by Jim Gish.

Re: CFR: javax.xml.parsers: Using ServiceLoader to load JAXP parser factories (7169894: JAXP Plugability Layer: using service loader)

2012-12-06 Thread Alan Bateman
On 05/12/2012 16:17, Daniel Fuchs wrote: Hi, Please find below a revised version of the changes for the javax.xml.parsers package. It hopefully incorporates all comments I have received so far. http://cr.openjdk.java.net/~dfuchs/JDK-7169894/javax.xml.parsers/webrev.01/ * better

Re: CFR: javax.xml.parsers: Using ServiceLoader to load JAXP parser factories (7169894: JAXP Plugability Layer: using service loader)

2012-12-06 Thread Daniel Fuchs
Hi Mandy, On 12/5/12 10:55 PM, Mandy Chung wrote: Hi Daniel, Looks good to me. One question - the last bullet in the search order covers the default implementation case: Platform default codeDocumentBuilderFactory/code instance. Would it make sense to merge the statement Otherwise, the

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Doug Lea
On 12/06/12 03:23, Remi Forax wrote: On 12/06/2012 06:10 AM, David Holmes wrote: On 6/12/2012 5:39 AM, Akhil Arora wrote: This patch adds a constructor to ThreadLocal to supply initial values using the new Supplier functional interface. Please review. This work was done by Jim Gish.

Re: Proposal: Fully Concurrent ClassLoading

2012-12-06 Thread Peter Levart
Hi David, What about a middle-ground mode where findLoadedClass() and delegation to parent would be called without locks and only findClass() would be guarded by a per-class-name-per-classloader lock? In this mode concurrent attempts to define the same class would still be possible, but the

Re: Proposal: Fully Concurrent ClassLoading

2012-12-06 Thread Alan Bateman
On 05/12/2012 11:59, David Holmes wrote: Java 7 introduced support for parallel classloading by adding to each class loader a ConcurrentHashMap, referenced through a new field, parallelLockMap. This contains a mapping from class names to Objects to use as a classloading lock for that class

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Vitaly Davidovich
Doug, When you see the fast to slow ThreadLocal transition due to class loading invalidating inlined get(), do you not then see it get restored back to fast mode since the receiver type in your call sites is still the monomorphic ThreadLocal (and not the unrelated subclasses)? Just trying to

Re: Request for Review : CR#8004015 : [final (?) pass] Add interface extends and defaults for basic functional interfaces

2012-12-06 Thread Chris Hegarty
Mike, Some small comments. 1) IntUnaryOperator.java Typo in: + 30 * pThis is the primitive type specialization of {@link IntUnaryOperator} for + 31 * {@code int} and also may be used as a {@code IntUnaryOperatorInteger}. When + 32 * used as a {@code IntUnaryOperator} the

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Vitaly Davidovich
Understood - I'm just trying to make sure I don't have the wrong mental model of this in my mind. Taking pathology aside (e.g. code cache is full when time to recompile, poor tiering interaction, etc), I'd expect the fast inlined path to be restored assuming call site type profile (of the ones we

Re: Review Request: 8004201: add reducers to primitive type wrappers

2012-12-06 Thread David Holmes
On 6/12/2012 7:27 AM, Akhil Arora wrote: Updated - http://cr.openjdk.java.net/~akhil/8004201.1/webrev/ - delegate to Math.min/max for int/long/float/double - rename Boolean.and/or/xor to logicalAnd/logicalOr/logicalXor - removed Character variants of min/max/sum On 12/02/2012 05:50 PM, David

Re: Proposal: Fully Concurrent ClassLoading

2012-12-06 Thread David M. Lloyd
On 12/06/2012 05:35 AM, Alan Bateman wrote: On 05/12/2012 11:59, David Holmes wrote: Java 7 introduced support for parallel classloading by adding to each class loader a ConcurrentHashMap, referenced through a new field, parallelLockMap. This contains a mapping from class names to Objects to

Re: Review request: 8003562: Provide a command-line tool to find static dependencies

2012-12-06 Thread Mandy Chung
Thanks Erik for the help. I missed the files for images build. I'll incorporate your patch. Mandy On 12/6/2012 6:37 AM, Erik Joelsson wrote: Hello, I've looked at the build changes and noted that the old and new build did not produce the same results. Here is a webrev with adjustments (I

Re: Review request: 8004042 : Arrrghs.java test failed on windows with access error.

2012-12-06 Thread David DeHaven
A fix for intermittent test failures causing grief on Windows, particularly Windows 7 and 2008 systems: http://cr.openjdk.java.net/~ddehaven/8004042/webrev.1/ The underlying cause is as of yet unknown, but I was able to create an environment that caused similar failures by running watch

signatures that are recorded for default methods

2012-12-06 Thread Lance Andersen - Oracle
Folks, Will the signatures for interfaces that are recorded by the TCKs for interfaces record the fact that a method includes a default method? or will it just record the method definition? I am assuming it will, but I know there has been discussion that a implementor could choose a different

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Akhil Arora
On 12/06/2012 03:32 AM, Doug Lea wrote: These seem like really good reasons to implement as you suggested in last post, with a static factory that uses a non-public *final* subclass that wires initialValue to supplier call, and not otherwise modifying the ThreadLocal class. It has the added

Misleading documentation for class java.nio.charset.spi.CharsetProvider

2012-12-06 Thread Christian Schulte
Hello, I am not sure if this is the correct mailing list to send this mail to. Please apologize any inconvenience caused. The JDK 7 documentation of class java.nio.charset.spi.CharsetProvider states the following: [...] Charset providers are looked up via the current thread's context class

Re: Review Request: 8004201: add reducers to primitive type wrappers

2012-12-06 Thread Brian Goetz
This suggestion makes me nervous, because we're already asking a great deal of type inference. If you say reduce(Operators::plus) and there are eight versions of Operators to choose from (and add boxing into the mix), I think we'll see a lot more inference errors. If the user says

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Chris Hegarty
Thank you Akhil, this looks much better. I'm not completely comfortable with, The initial value of the variable is provided by calling the {@code intialValue} method. Similarly, The initial value of the variable is determined by invoking the {@code get} method on the {@code Supplier.

Re: CFR: javax.xml.parsers: Using ServiceLoader to load JAXP parser factories (7169894: JAXP Plugability Layer: using service loader)

2012-12-06 Thread Daniel Fuchs
Updated the javadoc for newInstance(): http://cr.openjdk.java.net/~dfuchs/JDK-7169894/javax.xml.parsers/webrev.02/ -- daniel On 12/6/12 11:04 AM, Alan Bateman wrote: On 05/12/2012 16:17, Daniel Fuchs wrote: Hi, Please find below a revised version of the changes for the javax.xml.parsers

Re: Review request: 8004042 : Arrrghs.java test failed on windows with access error.

2012-12-06 Thread David DeHaven
New webrev posted: http://cr.openjdk.java.net/~ddehaven/8004042/webrev.2/ Summary: - Cleaned it up a bit by change to a for loop (eliminating done flag) - Throws RuntimeException instead of IOException, handles InterruptedException - Bumped retry count to 10 - Changed @run mode to main/othervm

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Doug Lea
On 12/06/12 12:01, Akhil Arora wrote: redone - http://cr.openjdk.java.net/~akhil/8003246.1/webrev/ Much better; thanks! As a minor matter, it probably makes sense to give that class a name. Even though it is a non-public static class, the name will be seen here and there by debuggers,

Re: Misleading documentation for class java.nio.charset.spi.CharsetProvider

2012-12-06 Thread Alan Bateman
On 06/12/2012 17:26, Christian Schulte wrote: Hello, I am not sure if this is the correct mailing list to send this mail to. Please apologize any inconvenience caused. The JDK 7 documentation of class java.nio.charset.spi.CharsetProvider states the following: [...] Charset providers are

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Akhil Arora
On 12/06/2012 09:38 AM, Doug Lea wrote: Much better; thanks! As a minor matter, it probably makes sense to give that class a name. Even though it is a non-public static class, the name will be seen here and there by debuggers, stacktraces, etc, and the default $ name will be confusing. As in:

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Akhil Arora
On 12/05/2012 09:10 PM, David Holmes wrote: Was there a CCC request for this? Yes, a CCC was submitted on Nov 12, but it was deferred pending a discussion on this alias. I just updated and resubmitted the CCC based on Doug and Remi's suggestions.

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Doug Lea
On 12/06/12 13:00, Akhil Arora wrote: http://cr.openjdk.java.net/~akhil/8003246.2/webrev/ - added SuppliedThreadLocal inner class - reverted javadoc changes to no-args constructor - added null check for Supplier Great! Thanks for the quick response. -Doug

Re: Review Request: 8004201: add reducers to primitive type wrappers

2012-12-06 Thread Remi Forax
On 12/06/2012 06:35 PM, Brian Goetz wrote: This suggestion makes me nervous, because we're already asking a great deal of type inference. If you say reduce(Operators::plus) and there are eight versions of Operators to choose from (and add boxing into the mix), I think we'll see a lot more

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Peter Levart
There's a quick trick that guarantees in-lining of get/set/remove: public static class FastThreadLocalT extends ThreadLocalT { @Override public final T get() { return super.get(); } @Override public final void set(T value) { super.set(value); }

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Remi Forax
On 12/06/2012 07:29 PM, Doug Lea wrote: On 12/06/12 13:00, Akhil Arora wrote: http://cr.openjdk.java.net/~akhil/8003246.2/webrev/ - added SuppliedThreadLocal inner class - reverted javadoc changes to no-args constructor - added null check for Supplier Great! Thanks for the quick response.

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Remi Forax
On 12/06/2012 08:01 PM, Peter Levart wrote: There's a quick trick that guarantees in-lining of get/set/remove: public static class FastThreadLocalT extends ThreadLocalT { @Override public final T get() { return super.get(); } @Override public final void

Re: CFR: javax.xml.parsers: Using ServiceLoader to load JAXP parser factories (7169894: JAXP Plugability Layer: using service loader)

2012-12-06 Thread Alan Bateman
On 06/12/2012 17:38, Daniel Fuchs wrote: Updated the javadoc for newInstance(): http://cr.openjdk.java.net/~dfuchs/JDK-7169894/javax.xml.parsers/webrev.02/ -- daniel Thumbs up from me! -Alan

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Remi Forax
On 12/06/2012 01:12 PM, Vitaly Davidovich wrote: Understood - I'm just trying to make sure I don't have the wrong mental model of this in my mind. Taking pathology aside (e.g. code cache is full when time to recompile, poor tiering interaction, etc), I'd expect the fast inlined path to be

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Akhil Arora
On 12/06/2012 11:02 AM, Remi Forax wrote: just nitpicking, return new SuppliedThreadLocalT(supplier); should be return new SuppliedThreadLocal(supplier); Also, can you add a @see in the constructor of ThreadLocal that references ThreadLocal.withInitialValue(Supplier).

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Alan Bateman
On 06/12/2012 19:43, Akhil Arora wrote: http://cr.openjdk.java.net/~akhil/8003246.3/webrev/ also incorporates a nitpick from Mike - Objects.requireNonNull returns its arg Thanks - nitpicking welcome :) Would it be worth including a note in the withInitial's javadoc to make it clear that

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Peter Levart
On 12/06/2012 08:08 PM, Remi Forax wrote: On 12/06/2012 08:01 PM, Peter Levart wrote: There's a quick trick that guarantees in-lining of get/set/remove: public static class FastThreadLocalT extends ThreadLocalT { @Override public final T get() { return super.get(); }

hg: jdk8/tl/jdk: 8004374: CachedRowSetSwriter.writeData reports wrong number of conflicts in SyncProviderException

2012-12-06 Thread lance . andersen
Changeset: 41a1b110f34d Author:lancea Date: 2012-12-06 15:51 -0500 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/41a1b110f34d 8004374: CachedRowSetSwriter.writeData reports wrong number of conflicts in SyncProviderException Reviewed-by: naoto !

Request for review: 8000525: Java.net.httpcookie api does not support 2-digit year format

2012-12-06 Thread Rob McKenna
Hi folks, According to HttpCookie.java: There are 3 http cookie specifications: Netscape draft RFC 2109 -/http://www.ietf.org/rfc/rfc2109.txt/ RFC 2965 -/http://www.ietf.org/rfc/rfc2965.txt/ HttpCookie class can accept all these 3 forms of syntax. According to

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Peter Levart
Ok, I've got an explanation. It's not because of using different static type of variables in code with final methods, but because TL0 was redirected to a separate method with separate call sites. The same happens using this variant: static class TL0 extends ThreadLocalInt {} static

Request for review: JDK-8004337: java/sql tests aren't run in test/Makefile

2012-12-06 Thread Rob McKenna
Hi folks, There's a missing folder in the jdk_other test target: http://cr.openjdk.java.net/~robm/8004337/webrev.01/ http://cr.openjdk.java.net/%7Erobm/8004337/webrev.01/ -Rob

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Remi Forax
On 12/06/2012 09:38 PM, Peter Levart wrote: On 12/06/2012 08:08 PM, Remi Forax wrote: On 12/06/2012 08:01 PM, Peter Levart wrote: There's a quick trick that guarantees in-lining of get/set/remove: public static class FastThreadLocalT extends ThreadLocalT { @Override public

Re: Request for review: JDK-8004337: java/sql tests aren't run in test/Makefile

2012-12-06 Thread Lance Andersen - Oracle
Looks fine Rob On Dec 6, 2012, at 4:22 PM, Rob McKenna wrote: Hi folks, There's a missing folder in the jdk_other test target: http://cr.openjdk.java.net/~robm/8004337/webrev.01/ http://cr.openjdk.java.net/%7Erobm/8004337/webrev.01/ -Rob Lance Andersen| Principal Member of

Re: Misleading documentation for class java.nio.charset.spi.CharsetProvider

2012-12-06 Thread Christian Schulte
Am 12/06/12 18:50, schrieb Alan Bateman: On 06/12/2012 17:26, Christian Schulte wrote: Hello, I am not sure if this is the correct mailing list to send this mail to. Please apologize any inconvenience caused. The JDK 7 documentation of class java.nio.charset.spi.CharsetProvider states the

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Jeff Hain
nitpicking welcome :) AFAIK (*), removing 'private' for supplier field could prevent javac to generate accessors for this field, in case it would be accessed from outside inner class (but since it's not, it would not yield better perfs, just smaller bytecode). (*) If I correctly undertood what

hg: jdk8/tl: 8004685: add java.util.function to CORE_PKGS.gmk

2012-12-06 Thread mike . duigou
Changeset: fb1bf5e5bc9e Author:henryjen Date: 2012-12-06 15:38 -0800 URL: http://hg.openjdk.java.net/jdk8/tl/rev/fb1bf5e5bc9e 8004685: add java.util.function to CORE_PKGS.gmk Reviewed-by: mduigou ! common/makefiles/javadoc/CORE_PKGS.gmk

Re: RFR: 8003246: Add Supplier to ThreadLocal

2012-12-06 Thread Remi Forax
On 12/06/2012 11:05 PM, Jeff Hain wrote: nitpicking welcome :) AFAIK (*), removing 'private' for supplier field could prevent javac to generate accessors for this field, in case it would be accessed from outside inner class (but since it's not, it would not yield better perfs, just smaller

hg: jdk8/tl/jdk: 8003881: Prevent lambda implementing inner classes from allowing the creation of new instances

2012-12-06 Thread robert . field
Changeset: 896d4af2ebfd Author:rfield Date: 2012-12-06 21:55 -0800 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/896d4af2ebfd 8003881: Prevent lambda implementing inner classes from allowing the creation of new instances Summary: Lambda implementing inner classes now has private