RFR 8206123 : ArrayDeque created with default constructor can only hold 15 elements

2018-06-29 Thread Ivan Gerasimov
Hello! The spec states that an ArrayDeque created with the default constructor should be able to hold 16 elements. https://docs.oracle.com/javase/10/docs/api/java/util/ArrayDeque.html#%3Cinit%3E() """ Constructs an empty array deque with an initial capacity sufficient to hold 16 elements.

Re: [PATCH] AbstractStringBuilder.append()

2018-06-29 Thread Paul Sandoz
> On Jun 29, 2018, at 2:50 PM, Jonathan Gibbons > wrote: > > In that specific snippet, I would expect the compiler (javac) to fold the > constants together. > Yes, and behold the use of indy string concat :-) Classfile /Users/sandoz/Projects/jdk/jdk-test/target/classes/Test.class Last

Re: [PATCH] AbstractStringBuilder.append()

2018-06-29 Thread Jonathan Gibbons
In that specific snippet, I would expect the compiler (javac) to fold the constants together. -- Jon On 06/29/2018 01:02 PM, Isaac Levy wrote: Would this snippet end up merging two StringBuilders? String x = "bar" + "foo"; x += "baz" + "biz"; I had trouble reading stringopts.cpp. I was

Re: [PATCH] AbstractStringBuilder.append()

2018-06-29 Thread Isaac Levy
Would this snippet end up merging two StringBuilders? String x = "bar" + "foo"; x += "baz" + "biz"; I had trouble reading stringopts.cpp. I was thinking this append might be common due to implicit StringBuilder creation. Isaac On Fri, Jun 29, 2018 at 12:48 PM, Paul Sandoz wrote: > Hard to

Re: RFR(JDK12/JAXP/java.xml) 8190835: Subtraction with two javax.xml.datatype.Duration gives incorrect result

2018-06-29 Thread Joe Wang
Thanks Lance! Pushed. -Joe On 6/28/18, 5:22 PM, Lance Andersen wrote: Looks OK joe. On Jun 28, 2018, at 5:06 PM, Joe Wang > wrote: Hi, Please review a quick fix for the first of JDK12/JAXP. JBS: https://bugs.openjdk.java.net/browse/JDK-8190835 webrevs:

Re: [PATCH] AbstractStringBuilder.append()

2018-06-29 Thread Paul Sandoz
Hard to reconstruct the culture memory around this. I suspect such a new method was not considered necessary when StringBuilder was added to Java 1.5 given the CharSequence accepting method, and performance was not considered a concern, and I doubt it's a concern now. (I don’t think there is

Re: RFR: 8148188: Enhance the security libraries to record events of interest

2018-06-29 Thread Seán Coffey
I've introduced a new test helper class in the jdk/test/lib/jfr directory to help with the dual test nature of the new tests. It's helped alot with test code duplication. Looked at use of @DataAmount(DataAmount.BITS) also. Not sure if it's fits. The output is displayed in units like "KiB" -

RFR(M): 8203826: Chain class initialization exceptions into later NoClassDefFoundErrors

2018-06-29 Thread Volker Simonis
Hi, can I please have a review for the following change which saves ExceptionInInitializerError thrown during class initialization and chains them as cause into potential NoClassDefFoundErrors for the same class. We are using this features since years in our commercial SAP JVM and it proved

Re: 8143850: retrofit ArrayDeque to implement List

2018-06-29 Thread Martin Buchholz
On Thu, Jun 28, 2018 at 11:42 PM, Alex Foster wrote: > Another question is whether or not it should allow null elements. > ArrayDeque currently doesn't but I think it would be useful to support > them, which makes having an asList() view or sharing code harder. > JDK has moved away from null