Re: Alternatives for Unsafe field access

2016-12-08 Thread Jochen Theodorou
On 09.12.2016 08:55, Jochen Theodorou wrote: On 08.12.2016 22:10, Uwe Schindler wrote: Hi, You can first do standard reflection, then use setAccessible Maybe we have luck here and it does not apply, but if the field comes from a class of a module and is private, my current level knowledge of

Re: Alternatives for Unsafe field access

2016-12-08 Thread Jochen Theodorou
On 08.12.2016 22:10, Uwe Schindler wrote: Hi, You can first do standard reflection, then use setAccessible Maybe we have luck here and it does not apply, but if the field comes from a class of a module and is private, my current level knowledge of jigsaw says, that setAccessible will fail

RE: RFR(M): 8170663: Fix minor issues in corelib and servicabilty coding.

2016-12-08 Thread Lindenmaier, Goetz
Hi, I'll post a new webrev once the hs code has been propagated to dev. Best regards, Goetz. > -Original Message- > From: David Holmes [mailto:david.hol...@oracle.com] > Sent: Donnerstag, 8. Dezember 2016 23:03 > To: daniel.daughe...@oracle.com; Lindenmaier, Goetz >

Re: Alternatives for Unsafe field access

2016-12-08 Thread Remi Forax
- Mail original - > De: "Nathan Mittler" > À: "Uwe Schindler" > Cc: "Daniel Weis" , core-libs-dev@openjdk.java.net, "Louis > Ryan" > Envoyé: Jeudi 8 Décembre 2016 23:16:36 > Objet: Re: Alternatives for

JDK 9 RFR of JDK-8023898: Consolidate Map tests Collisions and InPlaceOpsCollisions into general Map-based test

2016-12-08 Thread Amy Lu
Please review this test refactoring to map test Collisions and InPlaceOpsCollisions. These tests have (almost) same code for creating test data, and the test data can be reused cross tests. With converting to testng, test data creating is now done and provided by

Re: RFR of JDK-7195382: TEST_BUG: java/rmi/activation/CommandEnvironment/SetChildEnv.java can fail

2016-12-08 Thread Hamlin Li
Is some one available to review the patch? Thank you -Hamlin On 2016/12/8 11:07, Hamlin Li wrote: Would you please review the below patch? bug: https://bugs.openjdk.java.net/browse/JDK-7195382 webrev: http://cr.openjdk.java.net/~mli/7195382/webrev.00/ what's changed? * Use

RFR JDK-8170961: ProblemList tools/jlink/multireleasejar/JLinkMultiReleaseJarTest.java due to JDK-8169971

2016-12-08 Thread John Jiang
Hi, This test has failed for several times on Windows x64 platform, it should be included by ProblemList. Please review the below patch. diff -r e307a1fcbcca test/ProblemList.txt --- a/test/ProblemList.txtFri Dec 09 02:26:48 2016 + +++ b/test/ProblemList.txtFri Dec 09 03:00:02 2016

Re: Ping - Re: RFR 8170890, Problem list tools/javadoc/CheckResourceKeys.java and tools/javadoc/ReleaseOption.java until fix for JDK-8170772

2016-12-08 Thread Mandy Chung
I suggest to hold off not to problem list these test failures. CheckResourceKeys.java is a test bug that Jon is working on a test fix. We wanted to observe if ReleaseOption.java will still fail or not. It seems that there is some issue with ResourceBundle caching going on here. Mandy > On

RFR JDK-8170952: jar's usage message output need some cleanup

2016-12-08 Thread Xueming Shen
Hi, Please help some trival usage msg clean of the jar command issue: https://bugs.openjdk.java.net/browse/JDK-8170952 webrev: http://cr.openjdk.java.net/~sherman/8170952/ 321 static void printUsageSummary(PrintWriter out) { 322 out.format("%s%n",

Ping - Re: RFR 8170890, Problem list tools/javadoc/CheckResourceKeys.java and tools/javadoc/ReleaseOption.java until fix for JDK-8170772

2016-12-08 Thread Felix Yang
Hi all, any comment on this problem-list request? Thanks, Felix On 2016/12/8 11:06, Felix Yang wrote: Hi, please review the patch to problem-list two tier1 tests from Linux platform. Bug: https://bugs.openjdk.java.net/browse/JDK-8170890 Thanks, Felix diff -r 586c93260d3b

Re: RFR 9: 8153882 rmid emits warning about security policy with obsolete URL

2016-12-08 Thread Stuart Marks
Hi Roger, Change looks good. Thanks. s'marks On 12/7/16 1:20 PM, Roger Riggs wrote: Please review a change to an warning message from rmid when the security policy is incorrectly configured. There is no reliable link to the rmid documentation that will remain accurate across JDK versions. The

RFR(s): JDK-8170943 Collectors.partitioningBy should specify that false and true entries are always present

2016-12-08 Thread Stuart Marks
Hi all, Please review this small spec change to the Collectors.partitioningBy() methods, appended below. This collector returns Map. The change requires the implementation always to populate the returned map with entries for both false and true keys. The implementation

Re: RFR(M): 8170663: Fix minor issues in corelib and servicabilty coding.

2016-12-08 Thread David Holmes
On 9/12/2016 7:31 AM, Daniel D. Daugherty wrote: On 12/8/16 1:59 PM, David Holmes wrote: On 9/12/2016 12:21 AM, Lindenmaier, Goetz wrote: Hi David, thanks for looking at the change. New webrev: http://cr.openjdk.java.net/~goetz/wr16/8170663-corlib_s11y/webrev.04/

Re: RFR(M): 8170663: Fix minor issues in corelib and servicabilty coding.

2016-12-08 Thread Daniel D. Daugherty
On 12/8/16 1:59 PM, David Holmes wrote: On 9/12/2016 12:21 AM, Lindenmaier, Goetz wrote: Hi David, thanks for looking at the change. New webrev: http://cr.openjdk.java.net/~goetz/wr16/8170663-corlib_s11y/webrev.04/ src/java.base/share/native/libjli/java.c As far as I can see the existing

Re: Alternatives for Unsafe field access

2016-12-08 Thread Uwe Schindler
Hi, Of course, private field access is allowed to your own class if you use a private lookup object. The setAccessible hack is only needed when reflection would also be needed for frameworks or other "superusers". Uwe Am 8. Dezember 2016 22:10:32 MEZ schrieb Uwe Schindler

Re: Alternatives for Unsafe field access

2016-12-08 Thread Uwe Schindler
Hi, You can first do standard reflection, then use setAccessible and finally use the Lookup object to convert the now-accessible Field instance to a MethodHandle or VarHandle. You just have to know that way, existing since Java 7. Uwe Am 8. Dezember 2016 21:49:04 MEZ schrieb Nathan Mittler

Re: Alternatives for Unsafe field access

2016-12-08 Thread John Rose
They support private fields. Like MethodHandles the access check is performed at creation time not invocation time. Any class can arrange to make VHs and MHs on its own privates. There will also be super user access for frameworks. – John > On Dec 8, 2016, at 12:49 PM, Nathan Mittler

Re: RFR(M): 8170663: Fix minor issues in corelib and servicabilty coding.

2016-12-08 Thread David Holmes
On 9/12/2016 12:21 AM, Lindenmaier, Goetz wrote: Hi David, thanks for looking at the change. New webrev: http://cr.openjdk.java.net/~goetz/wr16/8170663-corlib_s11y/webrev.04/ src/java.base/share/native/libjli/java.c As far as I can see the existing code is working perfectly fine. Ah, thanks

Re: [9] RFR 8170769: Provide a simple hexdump facility for binary data

2016-12-08 Thread Paul Sandoz
Hi, It may take a few iterations to get the API settled. There are other byte sources we may want to consider such as InputStream and ByteBuffer. Comments below. Paul. > On 7 Dec 2016, at 08:32, Vincent Ryan wrote: > > A hexdump facility has been available for

Re: Alternatives for Unsafe field access

2016-12-08 Thread Roger Riggs
Hi Nathan, Have you looked at VarHandles? [1] It is possible to use MethodsHandles.Lookup to get a VarHandle to an unreflected field. Roger [1] http://download.java.net/java/jdk9/docs/api/java/lang/invoke/MethodHandles.Lookup.html On 12/8/2016 1:03 PM, Nathan Mittler wrote: Hi

Re: [9] RFR 8170769: Provide a simple hexdump facility for binary data

2016-12-08 Thread Alan Bateman
On 07/12/2016 16:32, Vincent Ryan wrote: A hexdump facility has been available for many, many years via an unsupported class: sun.misc.HexDumpEncoder. Although that class was always unsupported, it was still accessible. That accessibility changes with Jigsaw so I’m proposing a very simple

Re: RFR: 8054214: JapaneseEra.getDisplayName doesn't return names if it's an additional era

2016-12-08 Thread Naoto Sato
Okutsu-san, In JapaneseEra::getDisplayName, Should there be Objects.requireNonNull() check for "style"? The current impl seems to return abbreviated era if null is passed as "style". Naoto On 12/8/16 12:55 AM, Masayoshi Okutsu wrote: Hi, Please review the fix for JDK-8054214. It was

Alternatives for Unsafe field access

2016-12-08 Thread Nathan Mittler
Hi everyone, Apologies in advance if this isn't the correct forum for this question. My team is working on an experimental runtime for Google's protocol buffers which is currently relying on sun.misc.Unsafe to perform various tasks efficiently. I'm aware that the plan is to eventually remove

Re: RFR: 8170595: Optimize Class.isAnonymousClass, isLocalClass, and isMemberClass

2016-12-08 Thread Claes Redestad
On 2016-12-08 18:17, Mandy Chung wrote: On Dec 8, 2016, at 3:06 AM, Claes Redestad wrote: http://cr.openjdk.java.net/~redestad/8170595/webrev.04/ Looks good. Thanks! Can you update the synoposis of this issue to include isLocalClass and isMemberClass?

Re: RFR: 8170595: Optimize Class.isAnonymousClass

2016-12-08 Thread Mandy Chung
> On Dec 8, 2016, at 3:06 AM, Claes Redestad wrote: > > http://cr.openjdk.java.net/~redestad/8170595/webrev.04/ Looks good. Can you update the synoposis of this issue to include isLocalClass and isMemberClass? Mandy

Re: RFR 8170348: Appendable.appendN(char, int) method to append multiple copies of char

2016-12-08 Thread Paul Sandoz
> On 8 Dec 2016, at 01:27, Claes Redestad wrote: > > > > On 2016-12-08 10:01, Ulf Zibis wrote: >> Am 08.12.2016 um 09:28 schrieb Peter Levart: >>> >>> On 12/07/2016 11:28 PM, Roger Riggs wrote: AbstractStringBuilder: I agree with Claes' comment

Re: RFR 8169115, java/net/InetAddress/ptr/lookup.sh failed intermittently

2016-12-08 Thread Felix Yang
Langer and Dmitry, thanks for the review. Pushed with typo fixed -Felix On 2016/12/8 20:21, Langer, Christoph wrote: Hi Felix, looks good also for me. Small typo: 85 throw new RuntimeException("Mistmatch between default" Mistmatch -> Mismatch :) Best regards Christoph

RE: RFR(M): 8170663: Fix minor issues in corelib and servicabilty coding.

2016-12-08 Thread Lindenmaier, Goetz
Hi Joe, could you please have a look at my change to e_asin.c: http://cr.openjdk.java.net/~goetz/wr16/8170663-corlib_s11y/webrev.04/src/java.base/share/native/libfdlibm/e_asin.c.udiff.html The change conserves the situation, I just added {} and comments. I would appreciate to clean this up as

RE: RFR 8169115, java/net/InetAddress/ptr/lookup.sh failed intermittently

2016-12-08 Thread Langer, Christoph
Hi Felix, looks good also for me. Small typo: 85 throw new RuntimeException("Mistmatch between default" Mistmatch -> Mismatch :) Best regards Christoph > -Original Message- > From: net-dev [mailto:net-dev-boun...@openjdk.java.net] On Behalf Of Felix > Yang > Sent:

Re: [9] RFR 8170769: Provide a simple hexdump facility for binary data

2016-12-08 Thread Vincent Ryan
> On 8 Dec 2016, at 12:10, Vincent Ryan wrote: > > >> On 8 Dec 2016, at 07:22, David Holmes wrote: >> >> On 8/12/2016 2:32 AM, Vincent Ryan wrote: >>> A hexdump facility has been available for many, many years via an >>> unsupported class:

Re: [9] RFR 8170769: Provide a simple hexdump facility for binary data

2016-12-08 Thread Vincent Ryan
> On 8 Dec 2016, at 07:22, David Holmes wrote: > > On 8/12/2016 2:32 AM, Vincent Ryan wrote: >> A hexdump facility has been available for many, many years via an >> unsupported class: sun.misc.HexDumpEncoder. >> Although that class was always unsupported, it was still

Re: RFR: 8054214: JapaneseEra.getDisplayName doesn't return names if it's an additional era

2016-12-08 Thread Jonathan Bluett-Duncan
Hi Masayoshi, I'm not a reviewer, but there's something in JapaneseEra.java.cdiff.html which isn't terribly clear to me, so I wonder if you could clarify it for me.

Re: [9] RFR 8170769: Provide a simple hexdump facility for binary data

2016-12-08 Thread Vincent Ryan
> On 8 Dec 2016, at 10:41, Ulf Zibis wrote: > > Hi, > > I would prefer a "normal" class instead a convolut of static methods. Via a > normal constructor, we could pass some custom parameters e.g. > capital/uppercase letters for "abcdef", prefix a header line, width of

Re: RFR: 8170595: Optimize Class.isAnonymousClass

2016-12-08 Thread Claes Redestad
On 2016-12-08 04:30, Mandy Chung wrote: On Dec 2, 2016, at 6:29 AM, Claes Redestad wrote: : http://cr.openjdk.java.net/~redestad/8170595/webrev.03/ This brings significant improvements to some variants: Good to see the significant improvements. I think what

Re: [9] RFR 8170769: Provide a simple hexdump facility for binary data

2016-12-08 Thread Ulf Zibis
Hi, I would prefer a "normal" class instead a convolut of static methods. Via a normal constructor, we could pass some custom parameters e.g. capital/uppercase letters for "abcdef", prefix a header line, width of the index counter, bytes per line, i.e. have all the parameters, you have

Re: RFR 8169115, java/net/InetAddress/ptr/lookup.sh failed intermittently

2016-12-08 Thread Dmitry Samersoff
Felix, Changes looks good to me. Thank you for doing it. -Dmitry On 2016-12-08 13:35, Felix Yang wrote: > Hi Dmitry, > >I tested your suggested "icann.org" and it indeed works well. Please > review the updated webrev: > > http://cr.openjdk.java.net/~xiaofeya/8169115/webrev.02/ > >

Re: RFR 8169115, java/net/InetAddress/ptr/lookup.sh failed intermittently

2016-12-08 Thread Felix Yang
Hi Dmitry, I tested your suggested "icann.org" and it indeed works well. Please review the updated webrev: http://cr.openjdk.java.net/~xiaofeya/8169115/webrev.02/ Thanks, Felix On 2016/12/6 19:16, Dmitry Samersoff wrote: Felix, 1. I'm not sure that javaweb.sfbay.sun.com is the best

Re: [9] RFR 8170769: Provide a simple hexdump facility for binary data

2016-12-08 Thread Vincent Ryan
> On 8 Dec 2016, at 09:34, Volker Simonis wrote: > > Hi Vincent, > > the bug is closed and can't be looked at outside Oracle. > Can you please make it visible for everybody. Sorry. I’ve just corrected that. > > Also, this is a change of the public API so it

Re: [9] RFR 8170769: Provide a simple hexdump facility for binary data

2016-12-08 Thread Volker Simonis
Hi Vincent, the bug is closed and can't be looked at outside Oracle. Can you please make it visible for everybody. Also, this is a change of the public API so it requires a CCC request/approval. Finally, this seems to be clearly a feature and not a bug so it requires an FC extension request [1]

Re: RFR 8170348: Appendable.appendN(char, int) method to append multiple copies of char

2016-12-08 Thread Claes Redestad
On 2016-12-08 10:01, Ulf Zibis wrote: Am 08.12.2016 um 09:28 schrieb Peter Levart: On 12/07/2016 11:28 PM, Roger Riggs wrote: AbstractStringBuilder: I agree with Claes' comment suggesting that IAE for negative lengths is a pain and defining it to append 0 would be natural in many use

Re: RFR 8170348: Appendable.appendN(char, int) method to append multiple copies of char

2016-12-08 Thread Ulf Zibis
Am 08.12.2016 um 09:28 schrieb Peter Levart: On 12/07/2016 11:28 PM, Roger Riggs wrote: AbstractStringBuilder: I agree with Claes' comment suggesting that IAE for negative lengths is a pain and defining it to append 0 would be natural in many use cases. OTOH, inserting a simple

RFR: 8054214: JapaneseEra.getDisplayName doesn't return names if it's an additional era

2016-12-08 Thread Masayoshi Okutsu
Hi, Please review the fix for JDK-8054214. It was necessary to override Era::getDisplayName to get era names from the specified property. This one fixes getAbbreviation() as well. Issue: https://bugs.openjdk.java.net/browse/JDK-8054214 Webrev:

Re: RFR 8170348: Appendable.appendN(char, int) method to append multiple copies of char

2016-12-08 Thread Peter Levart
On 12/07/2016 11:28 PM, Roger Riggs wrote: AbstractStringBuilder: I agree with Claes' comment suggesting that IAE for negative lengths is a pain and defining it to append 0 would be natural in many use cases. OTOH, inserting a simple Math.max(n, 0) instead of n where n could get

Re: RFR(M): 8170663: Fix minor issues in corelib and servicabilty coding.

2016-12-08 Thread David Holmes
Hi Goetz, On 8/12/2016 1:26 AM, Lindenmaier, Goetz wrote: Hi Dmitry, yes, new_jvmpath is consistent with the other variables. I also merged the ifs in SDE.c. new webrev: http://cr.openjdk.java.net/~goetz/wr16/8170663-corlib_s11y/webrev.03/ src/java.base/share/native/libjli/java.c As far as