Re: class SplittableRandom

2013-07-11 Thread Peter Levart
Hi Doug, I confess I'm not an expert in PRNGs, but I'll try to ask a hopefully no-nonsense question anyway. SplittableRandom seems to be a kind of PR-PRNG-G - a PseudoRandom-PseudoRandomGenerator-Generator. In a sense that it's split() method returns an instance that represents a PRNG which

Re: RFR: 8017513: Support for closeable streams

2013-07-11 Thread Florian Weimer
On 07/10/2013 11:30 PM, Henry Jen wrote: A new interface, java.util.MayHoldCloseableResource, indicates an implementation may or may not hold a resource need to be closed. Why doesn't close() throw Exception? Annotation {@link HoldsResource} may be used to guide users/static analysis tools

problems with sun.reflect.Reflection.getCallerClass(int)

2013-07-11 Thread Jochen Theodorou
Hi all, I started a thread about this already on the mlvm list, but since I get no responses there I am going to ask here as well. Plus I have an actual problem with openjdk 7u25 related to this it seems. First the u25 problem. According to https://jira.codehaus.org/browse/GROOVY-6246

hg: jdk8/tl/jdk: 8019826: Test com/sun/management/HotSpotDiagnosticMXBean/SetVMOption.java fails with NPE

2013-07-11 Thread jaroslav . bachorik
Changeset: a46982a212e0 Author:jbachorik Date: 2013-07-11 09:21 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/a46982a212e0 8019826: Test com/sun/management/HotSpotDiagnosticMXBean/SetVMOption.java fails with NPE Reviewed-by: sjiang, dholmes, mchung !

Re: problems with sun.reflect.Reflection.getCallerClass(int)

2013-07-11 Thread Mandy Chung
Hi Jochen, On 7/11/2013 4:21 PM, Jochen Theodorou wrote: Hi all, I started a thread about this already on the mlvm list, but since I get no responses there I am going to ask here as well. Plus I have an actual problem with openjdk 7u25 related to this it seems. First the u25 problem.

Re: Review request: JDK-7147084 (process) appA hangs when read output stream of appB which starts appC that runs forever (v.1)

2013-07-11 Thread Alexey Utkin
Rob, Could you help me with bug review. It stay in review pool too long. Nobody like to look into the native code. Here is the long problem solution description:

CompletableFuture updates and CompletionStage

2013-07-11 Thread Doug Lea
Last fall, when putting together class CompletableFuture, and when many issues surrounding lambdas and Streams were still up in the air, we postponed dealing with the question of how to extract out an interface that would support usages by those who need the fluent completion-style capabilities,

hg: jdk8/tl/jdk: 8019484: Sync j.u.c.ConcurrentHashMap from 166 to tl

2013-07-11 Thread paul . sandoz
Changeset: 05b164788aab Author:psandoz Date: 2013-07-11 13:07 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/05b164788aab 8019484: Sync j.u.c.ConcurrentHashMap from 166 to tl Reviewed-by: martin Contributed-by: Doug Lea d...@cs.oswego.edu !

RFR 8020921 was Re: CompletableFuture updates and CompletionStage

2013-07-11 Thread Paul Sandoz
Hi, Doug's explanation provides an excellent hook to hang the RFR off: http://cr.openjdk.java.net/~psandoz/tl/JDK-8020291-completion-stage/specdiff/overview-summary.html http://cr.openjdk.java.net/~psandoz/tl/JDK-8020291-completion-stage/webrev/ Paul. On Jul 11, 2013, at 12:29 PM, Doug Lea

Review request for 7187144: JavaDoc for ScriptEngineFactory.getProgram() contains an error

2013-07-11 Thread A. Sundararajan
Bug: http://bugs.sun.com/view_bug.do?bug_id=7187144 Please review http://cr.openjdk.java.net/~sundar/7187144/ Thanks -Sundar

Re: class SplittableRandom

2013-07-11 Thread Doug Lea
On 07/11/13 03:36, Peter Levart wrote: Hi Doug, I confess I'm not an expert in PRNGs, but I'll try to ask a hopefully no-nonsense question anyway. SplittableRandom seems to be a kind of PR-PRNG-G - a PseudoRandom-PseudoRandomGenerator-Generator. In a sense that it's split() method returns an

Re: class SplittableRandom

2013-07-11 Thread Aleksey Shipilev
(I've been distracted by other high priority stuff, and only starting to explore SR, sorry for dumb questions below) On 07/11/2013 04:16 PM, Doug Lea wrote: (I've been contemplating re-exploring alternatives in TLR, but the options are more limited because it is a subclass of Random. Which

Re: Review request for 7187144: JavaDoc for ScriptEngineFactory.getProgram() contains an error

2013-07-11 Thread Jim Laskey (Oracle)
+1 On 2013-07-11, at 9:13 AM, A. Sundararajan sundararajan.athijegannat...@oracle.com wrote: Bug: http://bugs.sun.com/view_bug.do?bug_id=7187144 Please review http://cr.openjdk.java.net/~sundar/7187144/ Thanks -Sundar

Re: Review request for 7187144: JavaDoc for ScriptEngineFactory.getProgram() contains an error

2013-07-11 Thread Maurizio Cimadamore
On 11/07/13 13:26, Jim Laskey (Oracle) wrote: +1 On 2013-07-11, at 9:13 AM, A. Sundararajan sundararajan.athijegannat...@oracle.com wrote: Bug: http://bugs.sun.com/view_bug.do?bug_id=7187144 Please review http://cr.openjdk.java.net/~sundar/7187144/ Thanks -Sundar Looks good Maurizio

hg: jdk8/tl/jdk: 7187144: JavaDoc for ScriptEngineFactory.getProgram() contains an error

2013-07-11 Thread sundararajan . athijegannathan
Changeset: dadcfd84d33f Author:sundar Date: 2013-07-11 18:50 +0530 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/dadcfd84d33f 7187144: JavaDoc for ScriptEngineFactory.getProgram() contains an error Reviewed-by: mcimadamore, jlaskey, hannesw, attila !

Re: RFR: 8019799: api/java_util/jar/Pack200 test failed with compactX profiles. (EZ)

2013-07-11 Thread Kumar Srinivasan
Hi David, thanks for reviewing this! On 10/07/2013 6:25 AM, Kumar Srinivasan wrote: Hi, We had earlier added a fail over to the java implementation, for reference: http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/1432a6247ac9 The first time the unpacker is called an UnsatisfiedLinkError will

hg: jdk8/tl/langtools: 8013404: Unclear spec for target typing with conditional operator (?:)

2013-07-11 Thread maurizio . cimadamore
Changeset: 87a951c88a33 Author:mcimadamore Date: 2013-07-11 15:37 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/87a951c88a33 8013404: Unclear spec for target typing with conditional operator (?:) Summary: Fix previously ignored test Reviewed-by: jjg, vromero !

Re: hg: jdk8/tl/langtools: 8013404: Unclear spec for target typing with conditional operator (?:)

2013-07-11 Thread Remi Forax
On 07/11/2013 04:37 PM, maurizio.cimadam...@oracle.com wrote: Changeset: 87a951c88a33 Author:mcimadamore Date: 2013-07-11 15:37 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/87a951c88a33 8013404: Unclear spec for target typing with conditional operator (?:) Summary:

Re: hg: jdk8/tl/langtools: 8013404: Unclear spec for target typing with conditional operator (?:)

2013-07-11 Thread Maurizio Cimadamore
On 11/07/13 16:11, Remi Forax wrote: On 07/11/2013 04:37 PM, maurizio.cimadam...@oracle.com wrote: Changeset: 87a951c88a33 Author:mcimadamore Date: 2013-07-11 15:37 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/langtools/rev/87a951c88a33 8013404: Unclear spec for target typing with

Re: hg: jdk8/tl/langtools: 8013404: Unclear spec for target typing with conditional operator (?:)

2013-07-11 Thread Remi Forax
On 07/11/2013 05:45 PM, Maurizio Cimadamore wrote: On 11/07/13 16:11, Remi Forax wrote: On 07/11/2013 04:37 PM, maurizio.cimadam...@oracle.com wrote: Changeset: 87a951c88a33 Author:mcimadamore Date: 2013-07-11 15:37 +0100 URL:

hg: jdk8/tl/jdk: 8020321: Problem in PKCS11 regression test TestRSAKeyLength

2013-07-11 Thread valerie . peng
Changeset: 162c015c434a Author:valeriep Date: 2013-07-11 11:43 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/162c015c434a 8020321: Problem in PKCS11 regression test TestRSAKeyLength Summary: Corrected the isValidKeyLength array Reviewed-by: xuelei !

Re: RFR: 8017513: Support for closeable streams

2013-07-11 Thread Henry Jen
On 07/10/2013 03:17 PM, Zhong Yu wrote: A few things that require clarification: If we have interface A extends B, C interface B extends MayHoldCloseableResource interface C extends AutoCloseable is A considered definitely holding resource? Not programatically. A is both,

Re: class SplittableRandom

2013-07-11 Thread Jeff Hain
Hello. 1) extending Random Doug Lea wrote: Q: Why isn't SplittableRandom a subclass of Random? A: Class Random requires thread-safety in its spec. It would be nonsensical for SplittableRandom to comply. Random Javadoc states Instances of java.util.Random are threadsafe. but ThreadLocalRandom

Re: RFR: 8017513: Support for closeable streams

2013-07-11 Thread Henry Jen
On 07/11/2013 01:13 AM, Florian Weimer wrote: On 07/10/2013 11:30 PM, Henry Jen wrote: A new interface, java.util.MayHoldCloseableResource, indicates an implementation may or may not hold a resource need to be closed. Why doesn't close() throw Exception? Because there is really much a

hg: jdk8/tl/jdk: 8010285: Enforce the requirement of Management Interfaces being public

2013-07-11 Thread jaroslav . bachorik
Changeset: f3211af79339 Author:jbachorik Date: 2013-07-11 21:11 +0200 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/f3211af79339 8010285: Enforce the requirement of Management Interfaces being public Reviewed-by: sjiang, dfuchs, mchung !

hg: jdk8/tl/jdk: 8019799: api/java_util/jar/Pack200 test failed with compactX profiles.

2013-07-11 Thread kumar . x . srinivasan
Changeset: 0bd48087e2dc Author:ksrini Date: 2013-07-11 11:14 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/0bd48087e2dc 8019799: api/java_util/jar/Pack200 test failed with compactX profiles. Reviewed-by: dholmes !

Re: RFR: 8017513: Support for closeable streams

2013-07-11 Thread Paul Benedict
Paul S.'s said the negative of using AutoCloseable is it is no longer clear whether a stream should be closed or not (6/20). That's true because the semantics of AutoCloseable indicates you have a resource that requires closing. However, the choice to make MayHoldCloseableResource a sub-interface

Re: class SplittableRandom

2013-07-11 Thread Doug Lea
On 07/11/13 15:50, Jeff Hain wrote: Doug Lea wrote: Q: Why isn't SplittableRandom a subclass of Random? A: Class Random requires thread-safety in its spec. It would be nonsensical for SplittableRandom to comply. Random Javadoc states Instances of java.util.Random are threadsafe. but

hg: jdk8/tl/jdk: 8017212: File.createTempFile requires unnecessary read permission

2013-07-11 Thread dan . xu
Changeset: 10d2a4b1e576 Author:dxu Date: 2013-07-11 13:40 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/10d2a4b1e576 8017212: File.createTempFile requires unnecessary read permission Summary: Directly call FileSystem method to check a file existence. Also reviewed by

Re: RFR: 8017513: Support for closeable streams

2013-07-11 Thread Peter Levart
Hi Paul, I think the MayHoldCloseableResource extends AutoClosable is correct and AutoClosable extends MayHoldCloseableResource would be wrong. And exactly because of Liskov: MayHoldCloseableResource contract says: If you know it holds a resource, call close(), otherwise you need not call

Re: RFR: 8017513: Support for closeable streams

2013-07-11 Thread roger riggs
Hi, Wouldn't the close() implementation be nil in most cases if there was no resource. That kind of method runs very quickly and I would expect the compiler to inline nothing. It would be quicker to just call close() than to engage reflection to determine if it really did and then decide to

Re: class SplittableRandom

2013-07-11 Thread Jeff Hain
Doug Lea wrote:     new Subtask(new MySequentialRandom(currentTaskRandom.nextLong())).fork() One way to think of SplittableRandom is that it makes your idea behind this code actually work. As it stands, if you were to do this with java.util.Random, both would generate the same sequence. What I

Re: Point lambdaification of List/Set/Map

2013-07-11 Thread Mike Duigou
(Just getting back from vacation) This seems like a reasonable idea. There has been some concern about adding defaulted non-static methods to these core interfaces because of potential collisions with existing implementations abut that would not seem to be a concern with static methods. On

Re: class SplittableRandom

2013-07-11 Thread Doug Lea
On 07/11/13 15:50, Jeff Hain wrote: One could use that instead, which doesn't have that problem, and provides values in [0,1-1/2^53], with 1/2^53 granularity: public double nextDouble() { return (this.nextLong() ((1L53)-1)) * (1.0/(1L53)); } Thanks very much! We changed to

Re: RFR: 8017513: Support for closeable streams

2013-07-11 Thread Zhong Yu
On Thu, Jul 11, 2013 at 4:08 PM, Peter Levart peter.lev...@gmail.com wrote: Hi Paul, I think the MayHoldCloseableResource extends AutoClosable is correct and AutoClosable extends MayHoldCloseableResource would be wrong. And exactly because of Liskov: MayHoldCloseableResource contract says:

Re: Point lambdaification of List/Set/Map

2013-07-11 Thread Stephen Colebourne
On 12 July 2013 00:04, Mike Duigou mike.dui...@oracle.com wrote: Implementation would ideally be via new dedicated immutable classes, however space could be saved by simply reusing the existing classes. I would prefer to use existing Collections implementations. Primarily because they have

Re: Point lambdaification of List/Set/Map

2013-07-11 Thread Nick Williams
On Jun 24, 2013, at 10:14 AM, Stephen Colebourne wrote: One point lambdaification that I haven't seen mentioned is addition static factory methods for the main collection interfaces. (Strictly, this proposal is not point lambdaification as it does not involve lambdas, but it is very much in

hg: jdk8/tl/jdk: 7 new changesets

2013-07-11 Thread valerie . peng
Changeset: f225da733291 Author:valeriep Date: 2013-07-05 13:53 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/f225da733291 8012637: Adjust CipherInputStream class to work in AEAD/GCM mode Summary: Ensure the Cipher.doFinal() is called only once Reviewed-by: xuelei !

Re: Review request for 7187144: JavaDoc for ScriptEngineFactory.getProgram() contains an error

2013-07-11 Thread Mandy Chung
Looks good to me. Mandy On 7/11/2013 8:13 PM, A. Sundararajan wrote: Bug: http://bugs.sun.com/view_bug.do?bug_id=7187144 Please review http://cr.openjdk.java.net/~sundar/7187144/ Thanks -Sundar