Reflection.getCallerClass() and @CallerSensitive for a constructor?

2014-03-24 Thread Wang Weijun
Reflection.getCallerClass(3) seems work but the method is deprecated. Thanks Max

Re: Reflection.getCallerClass() and @CallerSensitive for a constructor?

2014-03-24 Thread Remi Forax
On 03/24/2014 08:43 AM, Wang Weijun wrote: Reflection.getCallerClass(3) seems work but the method is deprecated. Thanks Max what is your the question ? cheers, Rémi

Re: Reflection.getCallerClass() and @CallerSensitive for a constructor?

2014-03-24 Thread Wang Weijun
Calling Reflection.getCallerClass() needs the @CallerSensitive annotation, but it cannot be applied to a constructor. --Max On Mar 24, 2014, at 16:36, Remi Forax fo...@univ-mlv.fr wrote: On 03/24/2014 08:43 AM, Wang Weijun wrote: Reflection.getCallerClass(3) seems work but the method is

Re: JDK 9 RFR of 6375303: Review use of caching in BigDecimal

2014-03-24 Thread Peter Levart
On 03/20/2014 08:49 AM, Aleksey Shipilev wrote: On 03/20/2014 11:06 AM, Peter Levart wrote: I was thinking about last night, for question: Why is this double-checked non-volatile-then-volatile trick not any faster than pure volatile variant even on ARM platform where volatile read should have

Re: Review request for 8035807: Convert use of sun.misc.BASE64Encoder/Decoder with java.util.Base64

2014-03-24 Thread Vincent Ryan
On 22 Mar 2014, at 03:22, Mandy Chung mandy.ch...@oracle.com wrote: Good catch Sherman. Vinnie - what's your recommendation for this LDAP change having both encode/decode uses the platform default charset (rather than retaining the old interop issue)? It's an incompatible change and

Re: AWT Dev [9] Review request: new macro for conversion to jboolean

2014-03-24 Thread Anthony Petrov
How does IS_JNI_TRUE sound? -- best regards, Anthony On 3/23/2014 10:10 PM, Alan Bateman wrote: On 21/03/2014 15:22, Sergey Bylokhov wrote: On 3/21/14 7:10 PM, roger riggs wrote: The macro would just as useful (if I understand the cases) without the cast. How useful is a simple definition

Re: JDK-8036003: Add variable not to separate debug information.

2014-03-24 Thread Magnus Ihse Bursie
On 2014-03-21 10:36, Dmitry Samersoff wrote: (c) Compression mode: 1. none 2. per-section compression, SHF_GNU_COMPRESSED [1] 3. zip entire file Is 2 something we're doing? I couldn't find any references to it in the code. Or is it something we're planning to do? /Magnus

RFR 8037857: Methods j.u.Arrays.spliterator/stream(X[], int, int) throw IAE instead of specified AIOOBE when endIndex startIndex

2014-03-24 Thread Paul Sandoz
Hi, Simple patch to align code with spec for stream/spliterator factory methods on Arrays and spliterator methods on Spliterators, and make the next release of the JCK happy: http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8037857-spliterator-aioob/webrev/ After 9 it should go back to 8u20.

Re: RFR 8037857: Methods j.u.Arrays.spliterator/stream(X[], int, int) throw IAE instead of specified AIOOBE when endIndex startIndex

2014-03-24 Thread Alan Bateman
On 24/03/2014 11:44, Paul Sandoz wrote: Hi, Simple patch to align code with spec for stream/spliterator factory methods on Arrays and spliterator methods on Spliterators, and make the next release of the JCK happy:

Re: RFR 8037857: Methods j.u.Arrays.spliterator/stream(X[], int, int) throw IAE instead of specified AIOOBE when endIndex startIndex

2014-03-24 Thread Paul Sandoz
On Mar 24, 2014, at 1:28 PM, Alan Bateman alan.bate...@oracle.com wrote: On 24/03/2014 11:44, Paul Sandoz wrote: Hi, Simple patch to align code with spec for stream/spliterator factory methods on Arrays and spliterator methods on Spliterators, and make the next release of the JCK happy:

Re: Reflection.getCallerClass() and @CallerSensitive for a constructor?

2014-03-24 Thread Tom Hawtin
On 24/03/2014 08:41, Wang Weijun wrote: Calling Reflection.getCallerClass() needs the @CallerSensitive annotation, but it cannot be applied to a constructor. Ah, I see your message from 2012-11-26 05:46. This is very nice but it does not mention Constructor.newInstance(). In fact, I do

Re: Review request for 8038177 Eliminate unnecessary dependency to sun.security.action

2014-03-24 Thread Chris Hegarty
The changes look good to me Mandy. -Chris. On 21/03/14 21:28, Mandy Chung wrote: This is the second patch to eliminate the dependencies to sun.security.action: https://bugs.openjdk.java.net/browse/JDK-8038177 Webrev at: http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8038177/webrev.00/

Re: Review request for 8038177 Eliminate unnecessary dependency to sun.security.action

2014-03-24 Thread Alan Bateman
On 21/03/2014 21:28, Mandy Chung wrote: This is the second patch to eliminate the dependencies to sun.security.action: https://bugs.openjdk.java.net/browse/JDK-8038177 Webrev at: http://cr.openjdk.java.net/~mchung/jdk9/webrevs/8038177/webrev.00/ It looks good to me too. The only one that I

Re: RFR (L) 8037210: Get rid of char-based descriptions 'J' of basic types

2014-03-24 Thread Vladimir Ivanov
Updated version: http://cr.openjdk.java.net/~vlivanov/8037210/webrev.03/ - changed the way how arrays of types are created: static final BasicType[] ALL_TYPES = BasicType.values(); static final BasicType[] ARG_TYPES = Arrays.copyOf(ALL_TYPES, ALL_TYPES.length-1); - added a

Re: [9] RFR (M): 8037209: Improvements and cleanups to bytecode assembly for lambda forms

2014-03-24 Thread Vladimir Ivanov
Updated version: http://cr.openjdk.java.net/~vlivanov/8037209/webrev.01/ Changes: - rebased to enum-based BasicType; - decided to integrate changes for typed array getters/setters separately; Best regards, Vladimir Ivanov On 3/14/14 8:36 PM, Vladimir Ivanov wrote: Doh! crossed webrevs,

The s.m.Unsafe representation in hotspot and method registration

2014-03-24 Thread Paul Sandoz
I started working on a patch to remove the monitor related methods on Unsafe, and was thinking this is gonna be easy, it kind of is, but there is some curious code for the registration of the native methods:

Re: The s.m.Unsafe representation in hotspot and method registration

2014-03-24 Thread Joel Borggrén-Franck
Hi Paul, I would guess this is because of the HSX model where we could use the same VM with different majors of the JDK. Would that make sense? cheers /Joel On 24 Mar 2014, at 17:42, Paul Sandoz paul.san...@oracle.com wrote: I started working on a patch to remove the monitor related methods

Re: JDK 9 RFR of 6375303: Review use of caching in BigDecimal

2014-03-24 Thread Brian Burkhalter
Hi Peter, On Mar 22, 2014, at 2:01 AM, Peter Levart peter.lev...@gmail.com wrote: Looks good. Just a nit. In the following method: 3726 private static void matchScale(BigDecimal[] val) { I concur. One of 3 ifs is superfluous. Either the 1st one: private static void

Re: JDK 9 RFR of 6375303: Review use of caching in BigDecimal

2014-03-24 Thread Brian Burkhalter
Hi Peter, On Mar 24, 2014, at 2:21 AM, Peter Levart peter.lev...@gmail.com wrote: Thanks to Aleksey for re-establishing the access, I bring you results of the microbenchmark from his quad-core Cortex-A9: Thanks to you and Aleksey for taking the initiative to test on that platform. ...as

Re: The s.m.Unsafe representation in hotspot and method registration

2014-03-24 Thread Peter Levart
On 03/24/2014 07:02 PM, Paul Sandoz wrote: On Mar 24, 2014, at 6:37 PM, Joel Borggrén-Franck joel.fra...@oracle.com wrote: Hi Paul, I would guess this is because of the HSX model where we could use the same VM with different majors of the JDK. Would that make sense? I was wondering about

[9] RFR (S): 8038261: JSR292: cache and reuse typed array accessors

2014-03-24 Thread Vladimir Ivanov
http://cr.openjdk.java.net/~vlivanov/8038261/webrev.00 https://bugs.openjdk.java.net/browse/JDK-8038261 56 lines changed: 26 ins; 14 del; 16 mod Cache typed array element getters/setters and reuse them. Initially, it was part of 8037209, but I decided to integrate it separately.

Re: RFR: JDK-8033662 DateTimeFormatter parsing ignores withZone()

2014-03-24 Thread Xueming Shen
Hi Stephen, The webrev has been updated accordingly. http://cr.openjdk.java.net/~sherman/8033662/webrev/ Thanks! -Sherman On 03/24/2014 08:59 AM, Stephen Colebourne wrote: I don't think think email was delivered to me. (And I think another from you also wasn't). The email is in the

Re: JDK 9 RFR of 6375303: Review use of caching in BigDecimal

2014-03-24 Thread Peter Levart
On 03/24/2014 06:52 PM, Martin Buchholz wrote: On Wed, Mar 12, 2014 at 1:45 AM, Peter Levart peter.lev...@gmail.com mailto:peter.lev...@gmail.com wrote: What would the following cost? private transient String stringCache; public String toString() {

Re: The s.m.Unsafe representation in hotspot and method registration

2014-03-24 Thread Paul Sandoz
On Mar 24, 2014, at 6:37 PM, Joel Borggrén-Franck joel.fra...@oracle.com wrote: Hi Paul, I would guess this is because of the HSX model where we could use the same VM with different majors of the JDK. Would that make sense? I was wondering about too, but does that still apply to JDKs

Re: The s.m.Unsafe representation in hotspot and method registration

2014-03-24 Thread Staffan Larsen
We have abandoned the HSX model. From JDK 8 one version of Hotspot will be tied to one version of the JDK. This looks like old code that has not been cleaned up. /Staffan On 24 mar 2014, at 19:13, Peter Levart peter.lev...@gmail.com wrote: On 03/24/2014 07:02 PM, Paul Sandoz wrote: On Mar

Re: RFR: JDK-8033662 DateTimeFormatter parsing ignores withZone()

2014-03-24 Thread Stephen Colebourne
I'm happy with this updated patch. Stephen On 24 March 2014 18:24, Xueming Shen xueming.s...@oracle.com wrote: Hi Stephen, The webrev has been updated accordingly. http://cr.openjdk.java.net/~sherman/8033662/webrev/ Thanks! -Sherman On 03/24/2014 08:59 AM, Stephen Colebourne wrote:

Re: JDK 9 RFR of 6375303: Review use of caching in BigDecimal

2014-03-24 Thread Mike Duigou
On Mar 24 2014, at 12:25 , Martin Buchholz marti...@google.com wrote: On Mon, Mar 24, 2014 at 11:25 AM, Peter Levart peter.lev...@gmail.com wrote: On 03/24/2014 06:52 PM, Martin Buchholz wrote: On Wed, Mar 12, 2014 at 1:45 AM, Peter Levart peter.lev...@gmail.com wrote: What

RFR(S) : 8038186 : [TESTBUG] improvements of test j.l.i.MethodHandles

2014-03-24 Thread Igor Ignatyev
Hi all, Please review the patch: Problems: - MethodHandlesTest::testCatchException() doesn't provide enough testing of j.l.i.MethodHandles::catchException(). - MethodHandlesTest contains more than 3k lines, an auxiliary code together w/ a test code, many methods aren't connected w/ each

Re: AWT Dev [9] Review request: new macro for conversion to jboolean

2014-03-24 Thread roger riggs
Hi, For now I would just use the explicit ternary operator. The macro would have a very narrow use. Improving the ability to do static checking on JNI types would be a larger undertaking. Roger On 3/21/2014 5:38 PM, Mike Duigou wrote: What if we just abandon adding an IS_TRUE /

Re: RFR: 8034944: (process) Improve subprocess handling on Solaris

2014-03-24 Thread roger riggs
Hi Rob, Martin, et.al. I've prototyped (for 9) a thread reaper[1] that uses a single thread to wait for exiting processes and calling back to the process with the exit status. the interesting part is getting the exit status back to the Process that needs it It needs more testing and

Process API Updates (JEP 102)

2014-03-24 Thread roger riggs
Hi, I'm starting to work on JEP 102, Process API Updates for JDK 9. The use cases identified include test execution and build systems such as Jtreg and Hudson/Jenkins. And there is a use-case for using Java to monitor the health of a more complex system where the processes are not spawned by the