Arrays.asList returned List - Its modifying/write-through semantics

2018-08-14 Thread Jaikiran Pai
Consider the following code: import java.util.Arrays; import java.util.List; public class ArraysAsListTest {     public static void main(final String[] args) throws Exception {         final List someList = Arrays.asList(new String[] {"a"});         System.out.println("Removed? " + someList.remo

JDK 12 RFR of 5075463 : (enum) Serialized Form javadoc for java.lang.Enum is misleading

2018-08-14 Thread joe darcy
Hello, Cleaning out an old bug, please review the CSR and fix for:     JDK-5075463 : (enum) Serialized Form javadoc for java.lang.Enum is misleading     http://cr.openjdk.java.net/~darcy/5075463.0/     CSR: https://bugs.openjdk.java.net/browse/JDK-8209524 The abstract class java.lang.Enum imp

JDK 12 RFR of 8176425: Add radix indication in NumberFormatException message for Integer.decode

2018-08-14 Thread joe darcy
Hello, Please review the changes to address:     8176425: Add radix indication in NumberFormatException message for Integer.decode     http://cr.openjdk.java.net/~darcy/8176425.0/ Basically the radix used for parsing an int or long is passed along to a factory method in the NumberFormatExcep

Re: RFR 8209184: JDK8 ResourceBundle vulnerable to GC (fix included)

2018-08-14 Thread mandy chung
Thanks for the information. Not sure what's the best option we can do in 8u. I think it's acceptable to have a fix that works in the current context (like empty static method). Thoughts? Mandy On 8/14/18 4:22 PM, Hans Boehm wrote: I haven't looked at the details here, but comparing against a

Re: RFR 8208715: Conversion of milliseconds to nanoseconds in UNIXProcess contains bug

2018-08-14 Thread Martin Buchholz
Looks good to me ... but ... my intent was that the self-interrupt was added in __addition__ to interrupt by other thread, because there is often different code to handle pre-existing interrupt. As with BlockingQueueTest.testTimedPollWithOffer. public void run() {

Re: [12] (AIX) 8207744: Clean up inconsistent use of opendir/closedir versus opendir64/closedir64

2018-08-14 Thread Brian Burkhalter
Hi Bernard, On Aug 14, 2018, at 4:13 AM, B. Blaser wrote: > Seems quite good to me, last notes: > > 1) dealing with 'stat/stat64' in 'UnixFileSystem_md.c' might be > outside the scope of this fix (?) even if fully pertinent per [1]. It might be slightly out of scope but I think it’s OK as stat

Re: RFR 8208715: Conversion of milliseconds to nanoseconds in UNIXProcess contains bug

2018-08-14 Thread Roger Riggs
Hi Martin, Updated with suggestions:  http://cr.openjdk.java.net/~rriggs/webrev-timeout-8208715/index.html On 8/14/2018 1:22 PM, Martin Buchholz wrote: Thanks, Roger.  I approve this version, although as always I have comments.  520     private static native void waitForTimeoutInterruptibly(

OpenJDK 9 - Make (no deprecations flag setting)

2018-08-14 Thread mr rupplin
Where in Makefile do we add this - to suppress deprecation warnings - to our personal builds. Thanks. MR

Re: RFR 8208715: Conversion of milliseconds to nanoseconds in UNIXProcess contains bug

2018-08-14 Thread Martin Buchholz
Thanks, Roger. I approve this version, although as always I have comments. 520 private static native void waitForTimeoutInterruptibly( 521 long handle, long timeout); The units being used should be obvious from the signature - rename timeout to timeoutMillis. But even better is to

Re: RFR 8208715: Conversion of milliseconds to nanoseconds in UNIXProcess contains bug

2018-08-14 Thread Roger Riggs
Hi Martin, I updated the webrev with the suggestions. On 8/14/2018 10:47 AM, Martin Buchholz wrote: hi Roger, 509 if (deadline <= 0) { 510 deadline = Long.MAX_VALUE; 511 } This must be wrong.  Nanotime wraparound is normal in this sort of code. ok, this reader didn't make that assumption -

Re: RFR 8209184: JDK8 ResourceBundle vulnerable to GC (fix included)

2018-08-14 Thread mandy chung
Hi Adam, Have you tried Peter's suggestion if an empty static method taking an Object parameter? Does it work for you? Your proposed approach seems fine and I would suggest to put the check in a static keepAlive method that will make it explicitly. Mandy On 8/10/18 8:42 AM, Adam Farley8 wrote

Re: RFR 8208715: Conversion of milliseconds to nanoseconds in UNIXProcess contains bug

2018-08-14 Thread Martin Buchholz
hi Roger, 509 if (deadline <= 0) { 510 deadline = Long.MAX_VALUE; 511 } This must be wrong. Nanotime wraparound is normal in this sort of code. --- We ought to be able to delegate the fiddling with nanos to TimeUnit.timedWait. Does it work to simply call NANOSECO

MethodHandles.Lookup.defineResource?

2018-08-14 Thread Stephen Colebourne
A new method MethodHandles.Lookup defineClass() was added recently. But what about a defineResource? For adding a new resource to the classpath (such as a .txt file). I just needed such a thing, and though undoubtedly rare, all the recommended solutions use reflection and setAccessible(). thanks S

RFR 8208715: Conversion of milliseconds to nanoseconds in UNIXProcess contains bug

2018-08-14 Thread Roger Riggs
Please review a fix for Process.waitFor(Long.MAX_VALUE,MILLIS). Catch wrap around in very large wait times and saturate at Long.MAX_VALUE. Webrev: http://cr.openjdk.java.net/~rriggs/webrev-timeout-8208715/ Issue: https://bugs.openjdk.java.net/browse/JDK-8208715 Thanks, Roger

Re: RFR: 8207851 JEP Draft: Support ByteBuffer mapped over non-volatile memory

2018-08-14 Thread Andrew Dinn
Hi Alan, Thanks for looking at this and apologies for the delayed response (c/o our annual Red Hat OpenJDK team meeting taking place all last week). On 06/08/18 10:29, Alan Bateman wrote: > The current iteration, to introduce new MapMode values, is not too bad > but it makes me wonder if we coul

Re: [12] (AIX) 8207744: Clean up inconsistent use of opendir/closedir versus opendir64/closedir64

2018-08-14 Thread B. Blaser
Seems quite good to me, last notes: 1) dealing with 'stat/stat64' in 'UnixFileSystem_md.c' might be outside the scope of this fix (?) even if fully pertinent per [1]. In the same file, I think '#define dirent dirent64' is probably missing for AIX. 2) I guess '#if defined(_AIX) ...' is now missing