RFR: jsr166 openjdk9 integration

Paul Sandoz paul.sandoz at oracle.com
Fri Sep 25 12:50:44 UTC 2015


On 24 Sep 2015, at 19:57, Martin Buchholz <martinrb at google.com> wrote:
> FlakyThreadFactory fixed:

Thanks, verified.

Paul.

> (It would be nice if hotspot was consistent about the way it failed, regardless of platform)
> "Write once, fail anywhere"
> 
> Index: src/test/jtreg/util/concurrent/ThreadPoolExecutor/FlakyThreadFactory.java
> ===================================================================
> RCS file: /export/home/jsr166/jsr166/jsr166/src/test/jtreg/util/concurrent/ThreadPoolExecutor/FlakyThreadFactory.java,v
> retrieving revision 1.1
> diff -u -r1.1 FlakyThreadFactory.java
> --- src/test/jtreg/util/concurrent/ThreadPoolExecutor/FlakyThreadFactory.java	24 Dec 2011 02:13:42 -0000	1.1
> +++ src/test/jtreg/util/concurrent/ThreadPoolExecutor/FlakyThreadFactory.java	24 Sep 2015 17:52:27 -0000
> @@ -22,8 +22,10 @@
>          test(OutOfMemoryError.class,
>               new ThreadFactory() {
>                  public Thread newThread(Runnable r) {
> -                    // "guarantee" OutOfMemoryError
> -                    return new Thread(null, r, "bloated", 1L << 60);
> +                    new Thread(null, r, "a natural OOME", 1L << 60);
> +                    // """On some platforms, the value of the stackSize
> +                    // parameter may have no effect whatsoever."""
> +                    throw new OutOfMemoryError("artificial OOME");
>                  }});
>          test(null,
>               new ThreadFactory() {




More information about the core-libs-dev mailing list