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

2013-07-22 Thread Jochen Theodorou
Am 20.07.2013 03:41, schrieb Mandy Chung: Hi Jochen, I read through the thread in mlvm-dev [1] that has a good discussion there. I have filed a RFE: 8020785: caller-sensitive methods to skip dynamic generated frames and look up the true caller This seems that java.lang.instrument might

Re: @CallerSensitive as public API ?

2013-07-22 Thread Mandy Chung
Hi Peter, I have been very busy on other high priority works and didn't have time to look into this request. I filed 8020968 and 8020785 so that others can help follow up and follow up (I'll be on vacation this Wed). Class.getCallerClass and @CallerSensitive is clearly one option to

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

2013-07-22 Thread Mandy Chung
On 7/22/2013 3:37 PM, Jochen Theodorou wrote: Am 20.07.2013 03:41, schrieb Mandy Chung: Hi Jochen, I read through the thread in mlvm-dev [1] that has a good discussion there. I have filed a RFE: 8020785: caller-sensitive methods to skip dynamic generated frames and look up the true

Re: Order of annotation declarations

2013-07-22 Thread Joel Borggren-Franck
Hi, On 2013-07-19, Kasper Nielsen wrote: Hi, I haven't been able to find any info on this. but is [Class|AnnotatedMember].getAnnotations() required to return the annotations is order of declaration? For example, if I have the following definition @First @Second public class Foo{}

Re: Code Review Request: More tests for 7184826: (reflect) Add support for Project Lambda concepts in core reflection

2013-07-22 Thread Amy Lu
Thank you Joel for all the valuable feedback. Test have been refactored and here comes the updated version: https://dl.dropboxusercontent.com/u/5812451/yl153753/7184826/webrev.01/index.html Thanks, Amy On 7/10/13 10:17 PM, Joel Borggren-Franck wrote: Hi Amy, Tristan, I'm not a Reviewer kind

hg: jdk8/tl/jdk: 2 new changesets

2013-07-22 Thread chris . hegarty
Changeset: dcd89e60051a Author:khazra Date: 2013-07-22 15:24 +0100 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/dcd89e60051a 8020498: Crash when both libnet.so and libmawt.so are loaded Reviewed-by: chegar, dsamersoff ! src/share/native/java/net/net_util.c Changeset:

Re: RFR [8020669] java.nio.file.Files.readAllBytes() does not read any data when Files.size() is 0

2013-07-22 Thread roger riggs
Hi Ivan, I'm concerned about the change in behavior for the existing working cases. How many times are the bytes copied in your proposed implementation? How many arrays are allocated and discarded? Files.copy() uses an extra array for the copies. BAOS should only be used for size == 0; that

@CallerSensitive as public API ?

2013-07-22 Thread Paul Benedict
I find this issue tangentially related to some open source logging libraries. Some create a stack trace just so they can get the name of the calling Class instance. Example: Logger log = Logger.createLogger(); // for the current class Are there any thoughts to directly exposing

Re: RFR [8020669] java.nio.file.Files.readAllBytes() does not read any data when Files.size() is 0

2013-07-22 Thread David M. Lloyd
On 07/22/2013 11:19 AM, Martin Buchholz wrote: On Mon, Jul 22, 2013 at 9:03 AM, roger riggs roger.ri...@oracle.com wrote: Hi Ivan, I'm concerned about the change in behavior for the existing working cases. How many times are the bytes copied in your proposed implementation? How many arrays

Re: @CallerSensitive as public API ?

2013-07-22 Thread David M. Lloyd
On 07/22/2013 11:22 AM, Paul Benedict wrote: I find this issue tangentially related to some open source logging libraries. Some create a stack trace just so they can get the name of the calling Class instance. Example: Logger log = Logger.createLogger(); // for the current class Are there any

Re: RFR [8020669] java.nio.file.Files.readAllBytes() does not read any data when Files.size() is 0

2013-07-22 Thread roger riggs
Hi, All I was thinking was: if (size == 0) { use BAOS... code from 1st webrev. } else { current code } But I am curious why fixing the size() method is not a better fix; if FileChannel can return incorrect values that seems like a more serious flaw in the

@CallerSensitive as public API ?

2013-07-22 Thread Paul Benedict
That's true David. I concur with your description. I was just more interested in the fact that Java has the calling Class available, but there's no API that exposes it. Many developers kind of groan they always have to explicitly specify the current class name through the language. private

RFR : 6799426 : (xs) Add constructor PriorityQueue(Comparator)

2013-07-22 Thread Mike Duigou
Hello all; A simple rewiew for the addition of another constructor to PriorityQueue. Currently if you wish to specify a Comparator you must also supply a size. This addition allows use of the default size which is good for two reason; you don't have to specify a fixed value and the

Re: RFR : 6799426 : (xs) Add constructor PriorityQueue(Comparator)

2013-07-22 Thread Lance Andersen - Oracle
looks fine Mike Best Lance On Jul 22, 2013, at 3:24 PM, Mike Duigou wrote: Hello all; A simple rewiew for the addition of another constructor to PriorityQueue. Currently if you wish to specify a Comparator you must also supply a size. This addition allows use of the default size which is

RFR: 8019840 : (s) Spec updates to java.util.function package

2013-07-22 Thread Mike Duigou
Hello all; This is a minor update to the java.util.function package. There is only one normative change, Consumer.chain() - Consumer.andThen() but many textual improvements. http://cr.openjdk.java.net/~mduigou/JDK-8019840/0/webrev/ One change to note: I have reverted the change to the block

Re: RFR : 6799426 : (xs) Add constructor PriorityQueue(Comparator)

2013-07-22 Thread Remi Forax
On 07/22/2013 09:42 PM, Lance Andersen - Oracle wrote: looks fine Mike Best Lance Yes, fine for me too. Rémi On Jul 22, 2013, at 3:24 PM, Mike Duigou wrote: Hello all; A simple rewiew for the addition of another constructor to PriorityQueue. Currently if you wish to specify a Comparator

Re: RFR : 6799426 : (xs) Add constructor PriorityQueue(Comparator)

2013-07-22 Thread Chris Hegarty
On 22/07/2013 20:24, Mike Duigou wrote: Hello all; A simple rewiew for the addition of another constructor to PriorityQueue. Currently if you wish to specify a Comparator you must also supply a size. This addition allows use of the default size which is good for two reason; you don't have to

RFR : 6799426 : (xs) Add constructor PriorityQueue(Comparator)

2013-07-22 Thread Paul Benedict
Mike, I know the description is pulled from the previous constructor, but both sound a bit awkward. Both can probably benefit from an improvement. Currently: Creates a {@code PriorityQueue} with the default initial capacity that orders its elements according to the specified comparator.

Re: RFR : 6799426 : (xs) Add constructor PriorityQueue(Comparator)

2013-07-22 Thread Mike Duigou
Reasonable comment but unfortunately missed my push by mere seconds. I've made a note to correct the docs but will likely wait for some other issue to incorporate it. Mike On Jul 22 2013, at 14:00 , Paul Benedict wrote: Mike, I know the description is pulled from the previous constructor,

Re: RFR: 8019840 : (s) Spec updates to java.util.function package

2013-07-22 Thread John Rose
Good; 'andThen' is a more productive[1] term than 'chain'. [1]: http://en.wikipedia.org/wiki/Productivity_(linguistics) — John

Re: Java 8 RFR 6476168: (fmt) Inconsistency formatting subnormal doubles with hexadecimal conversion

2013-07-22 Thread Brian Burkhalter
An updated webrev is in the same location: http://cr.openjdk.java.net/~bpb/6476168/. On Jul 19, 2013, at 5:38 PM, Joseph Darcy wrote: A spec quibble decimal separator isn't really the appropriate term for the hex formatting. I've changed this in the verbiage on lines 613 and 1376 of

Re: Java 8 RFR 6476168: (fmt) Inconsistency formatting subnormal doubles with hexadecimal conversion

2013-07-22 Thread Joseph Darcy
Hi Brian, Almost there! A few additional comments. On 7/22/2013 4:47 PM, Brian Burkhalter wrote: An updated webrev is in the same location: http://cr.openjdk.java.net/~bpb/6476168/. On Jul 19, 2013, at 5:38 PM, Joseph Darcy wrote: A spec quibble decimal separator isn't really the

hg: jdk8/tl/jdk: 8021109: Add serialVersionUID to LambdaConversionException.java

2013-07-22 Thread joe . darcy
Changeset: 7716beb127d4 Author:darcy Date: 2013-07-22 22:11 -0700 URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/7716beb127d4 8021109: Add serialVersionUID to LambdaConversionException.java Reviewed-by: jrose ! src/share/classes/java/lang/invoke/LambdaConversionException.java