hg: jdk8/tl/jdk: 6902861: (cal) GregorianCalendar roll WEEK_OF_YEAR is broken for January 1 2010

2013-10-02 Thread masayoshi . okutsu
Changeset: 914c29c10bce Author:okutsu Date: 2013-10-02 15:31 +0900 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/914c29c10bce 6902861: (cal) GregorianCalendar roll WEEK_OF_YEAR is broken for January 1 2010 Reviewed-by: peytoia ! src/share/classes/java/util/GregorianCalendar.java

Re: RFR (4th): 8023524: Mechanism to dump generated lambda classes / log lambda code generation

2013-10-02 Thread Peter Levart
Hi Henry, Just a hint: Instead of parameterized singleton ProxyClassDumper with static method getInstance(path) which suggests that different ProxyClassDumper instances are returned for different path parameters (which are not), you could create for example: class DumpProxyClassAction

Re: RFR (4th): 8023524: Mechanism to dump generated lambda classes / log lambda code generation

2013-10-02 Thread Peter Levart
Ah, I see, you want it that way to track that a warning about invalid directory is logged only once. That could be solved with an: private static final ConcurrentMapPath, Path invalidDirs = new ConcurrentHashMap(); ...and then in validateDumpDir: if (invalidDirs.putIfAbsent(path,

Re: Please Review fix for reduced value parser 8024076

2013-10-02 Thread Stephen Colebourne
I suggest taking the patch as is and raising a new lower priority bug for the effective chrono aspect. Stephen On 1 October 2013 19:51, roger riggs roger.ri...@oracle.com wrote: Hi Stephen, The proposed approach makes sense to me, shall I take the patch as is or wait to integrate until for

hg: jdk8/tl/jdk: 8024952: ClassCastException in PlainSocketImpl.accept() when using custom socketImpl

2013-10-02 Thread sean . coffey
Changeset: 368172cb6dc5 Author:coffeys Date: 2013-10-02 09:21 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/368172cb6dc5 8024952: ClassCastException in PlainSocketImpl.accept() when using custom socketImpl Reviewed-by: chegar !

hg: jdk8/tl/jdk: 8022666: java.util.Calendar.set(int, int, int, int, int, int) documentation typo

2013-10-02 Thread masayoshi . okutsu
Changeset: 82e3150778e0 Author:okutsu Date: 2013-10-02 17:57 +0900 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/82e3150778e0 8022666: java.util.Calendar.set(int,int,int,int,int,int) documentation typo Reviewed-by: peytoia ! src/share/classes/java/util/Calendar.java

Re: RFR (4th): 8023524: Mechanism to dump generated lambda classes / log lambda code generation

2013-10-02 Thread Remi Forax
On 10/02/2013 07:42 AM, Henry Jen wrote: Remi, Thanks for the review and comments, you have some good points. I am thinking perhaps the dumper class could be used somewhere else given a different path, which is why the directory is used as key to get an instance and injected from caller. As

Re: RFR 8025535: Unsafe typecast in java.util.stream.SortedOps

2013-10-02 Thread Chris Hegarty
The change looks fine to me. Just curious why we don't allow sizes equal to Nodes.MAX_ARRAY_SIZE? Rather less than. -Chris. On 01/10/2013 20:30, Paul Sandoz wrote: Hi, Please review the following patch that checks size limits for the sorted operation and fails quickly rather than failing

Re: RFR 8025535: Unsafe typecast in java.util.stream.SortedOps

2013-10-02 Thread Paul Sandoz
On Oct 2, 2013, at 1:34 PM, Chris Hegarty chris.hega...@oracle.com wrote: The change looks fine to me. Thanks. Just curious why we don't allow sizes equal to Nodes.MAX_ARRAY_SIZE? Rather less than. Hmm... well observed, it's most likely a one off error due to it being confused with

hg: jdk8/tl/jdk: 8025535: Unsafe typecast in java.util.stream.SortedOps

2013-10-02 Thread paul . sandoz
Changeset: e1b04fd49204 Author:psandoz Date: 2013-10-01 18:20 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/e1b04fd49204 8025535: Unsafe typecast in java.util.stream.SortedOps Reviewed-by: mduigou, chegar ! src/share/classes/java/util/stream/SortedOps.java !

Re: RFR 8025535: Unsafe typecast in java.util.stream.SortedOps

2013-10-02 Thread Chris Hegarty
On 02/10/2013 13:03, Paul Sandoz wrote: On Oct 2, 2013, at 1:34 PM, Chris Hegartychris.hega...@oracle.com wrote: The change looks fine to me. Thanks. Just curious why we don't allow sizes equal to Nodes.MAX_ARRAY_SIZE? Rather less than. Hmm... well observed, it's most likely a one

Re: 9 days left for getCallerClass solution

2013-10-02 Thread Jörn Huxhorn
On 1. Oktober 2013 at 15:44:30, Alan Bateman (alan.bate...@oracle.com) wrote: On 01/10/2013 01:50, Jörn Huxhorn wrote:  …just saying…  We know. It seems unlikely that there will be agreement on a standard  API or that there is time for a new API to bake. So the safest thing  might be just restore

Re: RFR (4th): 8023524: Mechanism to dump generated lambda classes / log lambda code generation

2013-10-02 Thread Remi Forax
On 10/02/2013 04:12 PM, Peter Levart wrote: On 10/02/2013 12:19 PM, Remi Forax wrote: final class ProxyClassesDumper { ... private final Path dumpDir; // null if invalid public static ProxyClassesDumper create(String dir) { dir = dir.trim(); Path path =

Re: RFR (4th): 8023524: Mechanism to dump generated lambda classes / log lambda code generation

2013-10-02 Thread Peter Levart
On 10/02/2013 12:19 PM, Remi Forax wrote: final class ProxyClassesDumper { ... private final Path dumpDir; // null if invalid public static ProxyClassesDumper create(String dir) { dir = dir.trim(); Path path = *Paths.get*(dir.isEmpty() ? . : dir); path =

RFR (S) CR 6857566: (bf) DirectByteBuffer garbage creation can outpace reclamation

2013-10-02 Thread Aleksey Shipilev
Hi, There is the issue that annoys me all the time: https://bugs.openjdk.java.net/browse/JDK-6857566 Please review the rework of DirectByteBuffer cleanup mechanics fixing that issue. Since DBB uses sun.misc.Cleaner as the infrastructure to clean up things, we focus there:

hg: jdk8/tl/jdk: 6696975: JTop plugin fails if connected readonly to target JVM

2013-10-02 Thread staffan . larsen
Changeset: 3bb89c509d59 Author:egahlin Date: 2013-10-01 17:48 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/3bb89c509d59 6696975: JTop plugin fails if connected readonly to target JVM Reviewed-by: mchung, jbachorik, sla, sjiang ! src/share/demo/management/JTop/JTop.java

Re: JDK 8 RFR 8010371: getaddrinfo can fail with EAI_SYSTEM/EAGAIN, causes UnknownHostException to be thrown

2013-10-02 Thread Chris Hegarty
On 02/10/2013 04:44, Alan Bateman wrote: On 01/10/2013 12:46, Brian Burkhalter wrote: : I updated the webrev http://cr.openjdk.java.net/~bpb/8010371/ with changes in the test of the return value of getaddrinfo for Unix Inet 4 and 6 and Windows Inet 6. The usual testing is in progress. Brian

Re: JDK 8 RFR 8010371: getaddrinfo can fail with EAI_SYSTEM/EAGAIN, causes UnknownHostException to be thrown

2013-10-02 Thread Michael McMahon
On 02/10/13 15:40, Chris Hegarty wrote: On 02/10/2013 04:44, Alan Bateman wrote: On 01/10/2013 12:46, Brian Burkhalter wrote: : I updated the webrev http://cr.openjdk.java.net/~bpb/8010371/ with changes in the test of the return value of getaddrinfo for Unix Inet 4 and 6 and Windows Inet 6.

RFR 8025534: Unsafe typecast in java.util.stream.Streams.Nodes

2013-10-02 Thread Paul Sandoz
Hi, Please review the following patch that fixes/clarifies areas that cast long to int when creating and processing arrays of elements: http://cr.openjdk.java.net/~psandoz/tl/JDK-8025534-unsafe-int-casts/webrev/ I have retained the one off error (= Nodes.MAX_ARRAY_SIZE) that Chris

Re: RFR (4th): 8023524: Mechanism to dump generated lambda classes / log lambda code generation

2013-10-02 Thread Henry Jen
On Oct 2, 2013, at 7:21 AM, Remi Forax fo...@univ-mlv.fr wrote: On 10/02/2013 04:12 PM, Peter Levart wrote: On 10/02/2013 12:19 PM, Remi Forax wrote: final class ProxyClassesDumper { ... private final Path dumpDir; // null if invalid public static ProxyClassesDumper create(String

Please Review fix for reduced value parser 8024076

2013-10-02 Thread roger riggs
Please review this fix for parsing two digit years in an Chronology. The webrev includes Stephen's proposed alternate method that provides a ChronoLocalDate as the base date. http://cr.openjdk.java.net/~rriggs/webrev-two-digit-8024076/ Thanks, Roger p.s. the design issue raised in the

Re: Please Review fix for reduced value parser 8024076

2013-10-02 Thread Stephen Colebourne
My patch still looks fine to me :-) Stephen On 2 October 2013 16:19, roger riggs roger.ri...@oracle.com wrote: Please review this fix for parsing two digit years in an Chronology. The webrev includes Stephen's proposed alternate method that provides a ChronoLocalDate as the base date.

Re: RFR (S) CR 6857566: (bf) DirectByteBuffer garbage creation can outpace reclamation

2013-10-02 Thread Peter Levart
Hi Aleksey, I briefly skimmed over the changes. If I understand them correctly, they change they way Cleaners are processed. Without any assistance from other threads, Cleaners (WeakReferences now) are 1st enqueued by the ReferenceHandler thread, and CleaningThread then picks them out of the

Please Review java.time static interface methods move to supporting class

2013-10-02 Thread roger riggs
As noted in the issue[1], the static methods in the TemporalAdjuster and TemporalQuery interfaces that provide implementations of Adjusters and Queries seem out of place and are better located in a related supporting class so the purpose and function of the interfaces are not diluted. Adding

hg: jdk8/tl/langtools: 8023679: Improve error message for '_' used as a lambda parameter name

2013-10-02 Thread vicente . romero
Changeset: 1e6088da1740 Author:vromero Date: 2013-10-02 17:04 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/1e6088da1740 8023679: Improve error message for '_' used as a lambda parameter name Reviewed-by: jjg, dlsmith !

Re: RFR (4th): 8023524: Mechanism to dump generated lambda classes / log lambda code generation

2013-10-02 Thread Peter Levart
On 10/02/2013 05:17 PM, Henry Jen wrote: One thing to watch though is that Paths.get(String) can throw InvalidPathException. This will render InnerClassLambdaMetafactory non-functional since its static initialization will throw exception. Each lambda capture will than throw Error. I think the

Re: RFR (S) CR 6857566: (bf) DirectByteBuffer garbage creation can outpace reclamation

2013-10-02 Thread Alan Bateman
On 02/10/2013 07:43, Aleksey Shipilev wrote: Hi, There is the issue that annoys me all the time: https://bugs.openjdk.java.net/browse/JDK-6857566 Please review the rework of DirectByteBuffer cleanup mechanics fixing that issue. Since DBB uses sun.misc.Cleaner as the infrastructure to clean

Re: RFR (S) CR 6857566: (bf) DirectByteBuffer garbage creation can outpace reclamation

2013-10-02 Thread Aleksey Shipilev
Hi Peter, On 10/02/2013 07:58 PM, Peter Levart wrote: I briefly skimmed over the changes. If I understand them correctly, they change they way Cleaners are processed. Without any assistance from other threads, Cleaners (WeakReferences now) are 1st enqueued by the ReferenceHandler thread, and

hg: jdk8/tl/jdk: 8025694: Rename getStrongSecureRandom based on feedback; ...

2013-10-02 Thread bradford . wetmore
Changeset: a6ac824b463d Author:wetmore Date: 2013-10-02 09:38 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/a6ac824b463d 8025694: Rename getStrongSecureRandom based on feedback 8014838: getStrongSecureRandom() should require at least one implementation Reviewed-by: mullan,

Re: RFR (S) CR 6857566: (bf) DirectByteBuffer garbage creation can outpace reclamation

2013-10-02 Thread Aleksey Shipilev
On 10/02/2013 08:31 PM, Alan Bateman wrote: On 02/10/2013 07:43, Aleksey Shipilev wrote: http://cr.openjdk.java.net/~shade/6857566/webrev.00/ I'd like to review, I just don't have time at the moment. Thanks Alan, we can wait. One thing that I'd like to understand is the implication of

Re: Please Review fix for reduced value parser 8024076

2013-10-02 Thread Xueming Shen
Should move the static field BASE_DATE into ReducePrinterParser? Logically (and for performance, if it matters at all) RPP appears to be a better place for this constant. The rest looks fine. -Sherman On 10/02/2013 08:19 AM, roger riggs wrote: Please review this fix for parsing two digit

Re: FutureTask.cancel(true) should run thread.interrupt within doPrivileged

2013-10-02 Thread Peter Levart
Hi Martin, If you want to optimize for without-security-manager case, then it would be better this way: private static void privilegedInterrupt(Thread t) { if (System.getSecurityManager() == null) { t.interrupt(); } else { PrivilegedActionVoid

Re: RFR (S) CR 6857566: (bf) DirectByteBuffer garbage creation can outpace reclamation

2013-10-02 Thread Aleksey Shipilev
On 10/02/2013 09:15 PM, Peter Levart wrote: On 10/02/2013 06:31 PM, Alan Bateman wrote: One thing that I'd like to understand is the implication of moving from phantom to weak references. I think Cleaners as WeakReferences are not correct. Imagine the following code:

Re: Please Review fix for reduced value parser 8024076

2013-10-02 Thread Xueming Shen
On 10/02/2013 10:20 AM, roger riggs wrote: Hi Sherman, The BASE_DATE is the default ChronoLocalDate and is used outside of RPP. RPP itself uses any ChronoLocalDate, not the specific one. Scoping BASE_DATE to RPP would not delay the initialization since it would need to be initialized at line

Re: RFR (S) 8024599: JSR 292 direct method handles need to respect initialization rules for static members

2013-10-02 Thread Christian Thalinger
Since there is no new webrev I assume you incorporated all the stuff below. If that's the case then it looks good. On Sep 20, 2013, at 6:18 PM, John Rose john.r.r...@oracle.com wrote: On Sep 20, 2013, at 8:29 AM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: John, I don't see

Re: Please Review java.time static interface methods move to supporting class

2013-10-02 Thread Xueming Shen
Hi, While it might make sense to have method to return the adjuster for TemporalAdjusters, is there any real benefit to have those parentheses for TemporalQueries? Maybe it can just be an enum? Or we are considering adding more parametrized adjusters in the future? Aren't we? Now all interfaces

Re: Please Review fix for reduced value parser 8024076

2013-10-02 Thread roger riggs
Hi Sherman, Thanks for the detailed review, the webrev has been updated with your recommendation. Roger On 10/2/2013 1:50 PM, Xueming Shen wrote: On 10/02/2013 10:20 AM, roger riggs wrote: Hi Sherman, The BASE_DATE is the default ChronoLocalDate and is used outside of RPP. RPP itself uses

Re: RFR (S) CR 6857566: (bf) DirectByteBuffer garbage creation can outpace reclamation

2013-10-02 Thread Peter Levart
On 10/02/2013 07:30 PM, Aleksey Shipilev wrote: On 10/02/2013 09:15 PM, Peter Levart wrote: On 10/02/2013 06:31 PM, Alan Bateman wrote: One thing that I'd like to understand is the implication of moving from phantom to weak references. I think Cleaners as WeakReferences are not correct.

Re: JDK-8020981: Update methods of java.lang.reflect.Parameter to throw correct exceptions

2013-10-02 Thread Eric McCorkle
I've updated the test, switched to an in-memory class loader, and added a test case. Please review. On 10/01/13 16:27, Eric McCorkle wrote: On 10/01/13 02:41, Joe Darcy wrote: (Suggested changes have been applied) I think the test is acceptable as-is, but an RFE could be filed for some

Re: [concurrency-interest] FutureTask.cancel(true) should run thread.interrupt within doPrivileged

2013-10-02 Thread Tom Hawtin
On 02/10/2013 18:02, Doug Lea wrote: On 10/02/2013 12:29 PM, Martin Buchholz wrote: FutureTask.cancel(true) invokes thread.interrupt on the thread (if any) currently running the task. This should succeed even if modifyThread permission is denied by the security manager. We haven't

Re: RFR (S) 8025112: JSR 292 spec updates for security manager and caller sensitivity

2013-10-02 Thread Christian Thalinger
Thank you for doing this; it is much clearer now. Looks good. On Oct 1, 2013, at 10:19 PM, John Rose john.r.r...@oracle.com wrote: Chris Thalinger suggested removing the new booleans from the changed getDirectMethod call sites and instead put the intended usage into the method names, e.g.,

Re: RFR (S) 8024599: JSR 292 direct method handles need to respect initialization rules for static members

2013-10-02 Thread John Rose
Push-button webrev generator to the rescue: http://cr.openjdk.java.net/~jrose/8024599/webrev.01 — John On Oct 2, 2013, at 11:23 AM, Christian Thalinger christian.thalin...@oracle.com wrote: Since there is no new webrev I assume you incorporated all the stuff below. If that's the case

Re: RFR (M) 8001110: method handles should have a collectArguments transform, generalizing asCollector

2013-10-02 Thread Christian Thalinger
On Sep 20, 2013, at 5:09 PM, John Rose john.r.r...@oracle.com wrote: On Sep 20, 2013, at 3:07 PM, Vladimir Ivanov vladimir.x.iva...@oracle.com wrote: I cleaned javadoc a little [1], so it is more readable in the browser now. Thanks; I applied those edits. I fixed the problem of a

Re: JDK 8 RFR 8010371: getaddrinfo can fail with EAI_SYSTEM/EAGAIN, causes UnknownHostException to be thrown

2013-10-02 Thread Brian Burkhalter
All, Please see comments inline. Thanks, Brian On Oct 1, 2013, at 8:44 PM, Alan Bateman wrote: On 01/10/2013 12:46, Brian Burkhalter wrote: : I updated the webrev http://cr.openjdk.java.net/~bpb/8010371/ with changes in the test of the return value of getaddrinfo for Unix Inet 4

Re: JDK 8 RFR 8010371: getaddrinfo can fail with EAI_SYSTEM/EAGAIN, causes UnknownHostException to be thrown

2013-10-02 Thread Chris Hegarty
On 10/02/2013 08:40 PM, Brian Burkhalter wrote: So, how about this approach: 1) If the error is EAI_AGAIN / EIA_SYSTEM+EAGAIN / WSATRY_AGAIN then do one immediate native retry. 2) If the retry fails with the same error, then throw a UHE with a specific message or cause. Sounds good to

Re: JDK-8020981: Update methods of java.lang.reflect.Parameter to throw correct exceptions

2013-10-02 Thread Joe Darcy
Hi Eric, Please revert the change to j.l.r.Modifer. The fix can be pushed with just that modification; however, I strongly recommend also removing the here is everything that can go wrong list from j.l.r.Executable. Core reflection generally doesn't delve into such details in the main-line

Re: JDK-8020981: Update methods of java.lang.reflect.Parameter to throw correct exceptions

2013-10-02 Thread Eric McCorkle
Thanks, Joe. I reverted Modifier, and removed the list (I thought I had done that already). I will push after a successful test run. On 10/02/13 15:54, Joe Darcy wrote: Hi Eric, Please revert the change to j.l.r.Modifer. The fix can be pushed with just that modification; however, I

write to testbase dir [TEST_BUG] javax/xml/jaxp/parsers/8022548/XOMParserTest.java failed when testbase dir has read only permissions

2013-10-02 Thread huizhe wang
Not sure if this question has been asked before. But is it a general rule that no data should be written to the testbase dir? This test (javax/xml/jaxp/parsers/8022548/XOMParserTest.java) does a transform that writes result to test.src. From the bug report, it gets an Access is denied error

Re: Please Review java.time static interface methods move to supporting class

2013-10-02 Thread roger riggs
Hi Sherman, Most of the new static factories in util and streams are methods. For example, that return interfaces (like Comparable). I think they are more clearly factories when defined as methods, even if they return a constant value. For consistency, I would retain them as methods and to

RFR: 8023524: Mechanism to dump generated lambda classes / log lambda code generation

2013-10-02 Thread Henry Jen
Hi, Please review update of the webrev at http://cr.openjdk.java.net/~henryjen/ccc/8023524/4/webrev This update address comments from Remi and Peter, - Remove the unnecessary static field, also take out not needed singleton behavior of ProxyClassesDumper - Ensure InvalidPathException won't stop

Re: Please Review java.time static interface methods move to supporting class

2013-10-02 Thread Stephen Colebourne
I would agree that methods work best here although we do use constants in other places (such as DTFormatter where it emphasises the immutability) I want to keep the Temporal prefix. Removing it from the static classes does shorten code, but no other pluralized helper class changes the name (eg.

Re: [concurrency-interest] FutureTask.cancel(true) should run thread.interrupt within doPrivileged

2013-10-02 Thread David Holmes
On 3/10/2013 3:02 AM, Doug Lea wrote: On 10/02/2013 12:29 PM, Martin Buchholz wrote: FutureTask.cancel(true) invokes thread.interrupt on the thread (if any) currently running the task. This should succeed even if modifyThread permission is denied by the security manager. We haven't

Re: FutureTask.cancel(true) should run thread.interrupt within doPrivileged

2013-10-02 Thread David Holmes
On 3/10/2013 2:11 PM, Martin Buchholz wrote: I was responding to Peter Levart's suggestion of checking for the presence of a security manager before calling doPrivileged. Which is not an important question now, given that the primary question is whether we should allow future.cancel() to

Re: RFR (S) CR 6857566: (bf) DirectByteBuffer garbage creation can outpace reclamation

2013-10-02 Thread Alan Bateman
On 02/10/2013 09:49, Aleksey Shipilev wrote: On 10/02/2013 08:31 PM, Alan Bateman wrote: On 02/10/2013 07:43, Aleksey Shipilev wrote: http://cr.openjdk.java.net/~shade/6857566/webrev.00/ I'd like to review, I just don't have time at the moment. Thanks Alan, we can wait. BTW: Is this

Re: write to testbase dir [TEST_BUG] javax/xml/jaxp/parsers/8022548/XOMParserTest.java failed when testbase dir has read only permissions

2013-10-02 Thread Alan Bateman
On 02/10/2013 13:43, huizhe wang wrote: Not sure if this question has been asked before. But is it a general rule that no data should be written to the testbase dir? This test (javax/xml/jaxp/parsers/8022548/XOMParserTest.java) does a transform that writes result to test.src. From the bug