Re: Incorrect validation of DST in java.util.SimpleTimeZone

2017-11-15 Thread Peter Levart
Hi David, On 11/14/2017 10:28 PM, David Holmes wrote: Hi Peter, On 15/11/2017 1:02 AM, Peter Levart wrote: Hi David, On 11/11/2017 07:51 AM, David Holmes wrote: AFAICS SimpleTimeZone is simply not thread-safe. It has state that can be modified concurrently without synchronization and with fi

Re: Collections.emptyList().sort() does nothing

2017-11-15 Thread Andrej Golovnin
Hi Bernd, On Wed, Nov 15, 2017 at 7:04 AM, Bernd Eckenfels wrote: > I would however vote for allowing an empty list to be sorted. This is such a > common case to return a replacement empty list that it will not only > introduce changed behavior but also forces ugly code. I think we would need

Re: Collections.emptyList().sort() does nothing

2017-11-15 Thread Andrew Haley
On 15/11/17 10:03, Andrej Golovnin wrote: > I think we would need to write ugly code in any case as Java 9 has now > two empty list implementations: Collections.emptyList() and List.of(). > > Collections.emptyList().sort() does not throw an exception. > > List.of().sort() throws an exception. We

Re: Collections.emptyList().sort() does nothing

2017-11-15 Thread Andrej Golovnin
> On 15/11/17 10:03, Andrej Golovnin wrote: >> I think we would need to write ugly code in any case as Java 9 has now >> two empty list implementations: Collections.emptyList() and List.of(). >> >> Collections.emptyList().sort() does not throw an exception. >> >> List.of().sort() throws an exceptio

Re: Collections.emptyList().sort() does nothing

2017-11-15 Thread Alan Bateman
On 15/11/2017 10:03, Andrej Golovnin wrote: Hi Bernd, On Wed, Nov 15, 2017 at 7:04 AM, Bernd Eckenfels wrote: I would however vote for allowing an empty list to be sorted. This is such a common case to return a replacement empty list that it will not only introduce changed behavior but also

Re: Collections.emptyList().sort() does nothing

2017-11-15 Thread Vitaly Davidovich
On Wed, Nov 15, 2017 at 5:21 AM Andrej Golovnin wrote: > > On 15/11/17 10:03, Andrej Golovnin wrote: > >> I think we would need to write ugly code in any case as Java 9 has now > >> two empty list implementations: Collections.emptyList() and List.of(). > >> > >> Collections.emptyList().sort() doe

Re: JDK-8067661: transferTo proposal for Appendable

2017-11-15 Thread Alan Bateman
On 14/11/2017 16:59, Patrick Reinhart wrote: : And what should it be then here? I’m a bit confused now… Sorry, there was a typo in my mail that Brian picked up on. I think we are converging on: "If the destination is capacity bounded and has insufficient capacity to append all characters

Re: RFR(M) 8189116: Give the jdk.internal.vm.compiler.management only the permissions it really needs to expose the bean

2017-11-15 Thread Jaroslav Tulach
On úterý 14. listopadu 2017 21:34:45 CET mandy chung wrote: > I am wondering this ACE comes from Graal accessing jdk.vm.ci.services > from JVMCI which is defined to the boot loader versus Graal is defined > to the platform class loader. > > java.security.AccessControlException: access denied > (

RFR (S): JDK-8191328: Avoid unnecessary overhead in CRC32C

2017-11-15 Thread Dmitry Chuyko
Hello, Please review a performance enhancement for java.util.CRC32C pure Java implementation. rfe: https://bugs.openjdk.java.net/browse/JDK-8191328 webrev: http://cr.openjdk.java.net/~dchuyko/8191328/webrev.00/ some results: https://bugs.openjdk.java.net/browse/JDK-8191328?focusedCommentId=14

Re: Review request: JDK-8157246 MHs.arrayLength, arrayElementGetter/Setter, arrayConstructor need to specify invocation-time behavior

2017-11-15 Thread Roger Riggs
Looks fine. Nothing more from me,   Roger On 11/8/2017 6:52 PM, mandy chung wrote: Hi Roger, Updated version: http://cr.openjdk.java.net/~mchung/jdk10/webrevs/8157246/webrev.02/index.html On 11/8/17 11:37 AM, Roger Riggs wrote: Hi Mandy, A few editorial suggestions: MethodHandle.java: 8

Re: RFR (S): JDK-8191328: Avoid unnecessary overhead in CRC32C

2017-11-15 Thread Alan Bateman
On 15/11/2017 15:27, Dmitry Chuyko wrote: Hello, Please review a performance enhancement for java.util.CRC32C pure Java implementation. Moving the nativeOrder out of the loop make sense but I'm curious about the context for improving this implementation. You mentioned it helps -Xcomp but th

Re: RFR (S): JDK-8191328: Avoid unnecessary overhead in CRC32C

2017-11-15 Thread Dmitry Chuyko
On 11/15/2017 06:38 PM, Alan Bateman wrote: On 15/11/2017 15:27, Dmitry Chuyko wrote: Hello, Please review a performance enhancement for java.util.CRC32C pure Java implementation. Moving the nativeOrder out of the loop make sense but I'm curious about the context for improving this implemen

Re: RFR 8187742 Minimal set of bootstrap methods for dynamic constants

2017-11-15 Thread Paul Sandoz
> On 14 Nov 2017, at 20:48, stanislav lukyanov > wrote: > > On 15.11.2017 6:19, Paul Sandoz wrote: >>> On 10 Nov 2017, at 01:36, stanislav lukyanov >>> wrote: >>> >>> On 10.11.2017 0:13, Paul Sandoz wrote: <...> I would prefer to follow up later on with more non-normative explanat

Re: RFR (S): JDK-8191328: Avoid unnecessary overhead in CRC32C

2017-11-15 Thread Andrew Haley
On 15/11/17 15:38, Alan Bateman wrote: > Moving the nativeOrder out of the loop make sense but I'm curious about > the context for improving this implementation. I wonder about lifting ByteOrder.nativeOrder(). Maybe it fails to inline because the method is too large: if that happens, we really l

Re: [10] RFR 8176841: Additional Unicode Language-Tag Extensions

2017-11-15 Thread Naoto Sato
On 11/14/17 4:44 PM, Stephen Colebourne wrote: On 14 November 2017 at 23:58, Naoto Sato wrote: So even with the new suggested method, formatter.withZone(locale).withLocalization(locale) formatter.withLocalization(locale).withZone(locale) would produce different formatters. Would it be OK, ass

Re: JDK-8067661: transferTo proposal for Appendable

2017-11-15 Thread Brian Burkhalter
On Nov 15, 2017, at 3:22 AM, Alan Bateman wrote: > "If the destination is capacity bounded and has insufficient capacity to > append all characters read from the source then the exception may be thrown > after transferring some characters to the destination". Could “is capacity-bounded and” be

Re: RFR (S): JDK-8191328: Avoid unnecessary overhead in CRC32C

2017-11-15 Thread Vitaly Davidovich
On Wed, Nov 15, 2017 at 12:40 PM, Andrew Haley wrote: > On 15/11/17 15:38, Alan Bateman wrote: >> Moving the nativeOrder out of the loop make sense but I'm curious about >> the context for improving this implementation. > > I wonder about lifting ByteOrder.nativeOrder(). Maybe it fails to > inlin

Re: RFR (S): JDK-8191328: Avoid unnecessary overhead in CRC32C

2017-11-15 Thread Andrew Haley
On 15/11/17 18:38, Vitaly Davidovich wrote: > On Wed, Nov 15, 2017 at 12:40 PM, Andrew Haley wrote: >> On 15/11/17 15:38, Alan Bateman wrote: >>> Moving the nativeOrder out of the loop make sense but I'm curious about >>> the context for improving this implementation. >> >> I wonder about lifting

Re: JDK-8067661: transferTo proposal for Appendable

2017-11-15 Thread Patrick Reinhart
Just to see if I picked up the Discussion so far. The discussion is about that original sentence from: http://cr.openjdk.java.net/~reinhapa/reviews/8067661/webrev.03 "Depending on which class implements the appendable, there may be a limit of data that can written to which in turn could lead to a

Re: [10] RFR 8176841: Additional Unicode Language-Tag Extensions

2017-11-15 Thread Naoto Sato
Here is the proposed spec changes: http://cr.openjdk.java.net/~naoto/8191349/specdiff.00/overview-summary.html Naoto On 11/15/17 10:06 AM, Naoto Sato wrote: On 11/14/17 4:44 PM, Stephen Colebourne wrote: On 14 November 2017 at 23:58, Naoto Sato wrote: So even with the new suggested method,

Re: [10] RFR 8176841: Additional Unicode Language-Tag Extensions

2017-11-15 Thread Roger Riggs
Hi Naoto, - The word "designated" is unnecessary and inconsistent with the rest of the java.time API doc.    "designated locale" -> "locale"     I would have written: "Unicode extensions in the locale are ignored." - localizedBy(Locale):   The first sentence should be more specific.    " Retur

Re: [10] RFR 8176841: Additional Unicode Language-Tag Extensions

2017-11-15 Thread Naoto Sato
Thanks, Roger. Updated the specdiff as suggested: http://cr.openjdk.java.net/~naoto/8191349/specdiff.01/overview-summary.html Naoto On 11/15/17 2:06 PM, Roger Riggs wrote: Hi Naoto, - The word "designated" is unnecessary and inconsistent with the rest of the java.time API doc.    "designat

Re: [10] RFR 8176841: Additional Unicode Language-Tag Extensions

2017-11-15 Thread Lance Andersen
Hi Naoto localizedBy, i would suggest changing: - “If the new locale contains “ca”…” to “if the new locale contains the “ca”…” - “Unlike withLocale method” to Unlike the withLocale method” Best Lance > On Nov 15, 2017, at 5:36 PM, Naoto Sato wrote: > > http://cr.openjdk.java.net/~naoto/819

Re: [10] RFR 8176841: Additional Unicode Language-Tag Extensions

2017-11-15 Thread Naoto Sato
Thanks, Lance. Corrected as suggested. http://cr.openjdk.java.net/~naoto/8191349/specdiff.02/overview-summary.html Also, I inserted "@since 10." Naoto On 11/15/17 3:06 PM, Lance Andersen wrote: Hi Naoto localizedBy, i would suggest changing: -   “If the new locale contains “ca”…”  to “if th

Re: Collections.emptyList().sort() does nothing

2017-11-15 Thread Stuart Marks
On 11/14/17 7:52 PM, Tagir Valeev wrote: According to `List.sort` specification [1] "This list must be modifiable". According to `Collections.emptyList` specification [2] "Returns an empty list (immutable)." So I assume that `List.sort` cannot be called on `Collections.emptyList` result. Howev

Re: Collections.emptyList().sort() does nothing

2017-11-15 Thread Tagir Valeev
Hello! > My view is that it's preferable for collections implementations to be > strict. If I'm handing out an unmodifiable List, it should always be illegal > for the callee to attempt to sort it, even if it has zero or one elements. Thank you, this totally makes sence. > While this isn't guara