Re: Sometimes constraints are questionable

2020-05-30 Thread Martin Buchholz
On Sat, May 30, 2020 at 11:11 AM Florian Weimer wrote: > > * Martin Buchholz: > > > I wrote an earlier version of this grow logic, and then it was > > transplanted into other classes. > > > > We strongly suspect that the VM will throw OOME when we try to > > allocate an array beyond

Re: [PATCH] Typo in java.util.regex.Pattern

2020-05-30 Thread naoto . sato
Looks good! Naoto On 5/30/20 3:40 PM, Lance Andersen wrote: All good Naoto Here is the revised diff — $ hg diff src/java.base/share/classes/java/util/regex/Pattern.java *diff -r 968b57610c0f src/java.base/share/classes/java/util/regex/Pattern.java* *---

Re: [PATCH] Typo in java.util.regex.Pattern

2020-05-30 Thread Lance Andersen
All good Naoto Here is the revised diff — $ hg diff src/java.base/share/classes/java/util/regex/Pattern.java diff -r 968b57610c0f src/java.base/share/classes/java/util/regex/Pattern.java --- a/src/java.base/share/classes/java/util/regex/Pattern.java Sat May 30 10:33:28 2020 +0530 +++

Re: [PATCH] Typo in java.util.regex.Pattern

2020-05-30 Thread naoto . sato
Thanks, Pavel. I think the year stays 2006 then. Sorry, Lance, for the false alarm. Naoto On 5/30/20 2:34 PM, Pavel Rappo wrote: I'm holding a copy in my hands right now. I can see "ISBN: 978-0-596-52812-6" written on the back of the book. Searching that number in the database yields the

Re: [PATCH] Typo in java.util.regex.Pattern

2020-05-30 Thread Pavel Rappo
I'm holding a copy in my hands right now. I can see "ISBN: 978-0-596-52812-6" written on the back of the book. Searching that number in the database yields the following record: Mastering Regular Expressions ISBN-13: 9780596528126 ISBN-10: 0596528124 Author: Friedl, Jeffrey E.

Re: [PATCH] 8245694 : java.util.Properties.entrySet() does not override java.lang.Object methods

2020-05-30 Thread Rob Spoor
There's still a little regression there since Java 8, if you add the keySet(), values() or entrySet() to the Properties object as either key or value; in Java 8 this would cause "(this Collection)" to be included, while even with this fix that would cause a StackOverflowError. However, given

RFR: https://bugs.openjdk.java.net/browse/JDK-8246198 (formally: Re: [PATCH] Typo in java.util.regex.Pattern)

2020-05-30 Thread Lance Andersen
I create issue: https://bugs.openjdk.java.net/browse/JDK-8246198 for this typo Here is the updated diff $ hg diff src/java.base/share/classes/java/util/regex/Pattern.java diff -r 968b57610c0f

[PATCH] 8245694 : java.util.Properties.entrySet() does not override java.lang.Object methods

2020-05-30 Thread Lisa Li
Hi, Please help review the fix for JDK-8245694 . And this is my very first patch submission. I know it's not perfect. *BUG DESCRIPTION*: JDK-8245694

Re: [PATCH] Typo in java.util.regex.Pattern

2020-05-30 Thread Lance Andersen
Thank you Naoto, I am building now with both changes and will send a final diff out later along with the bug number! Best Lance > On May 30, 2020, at 2:13 PM, naoto.s...@oracle.com wrote: > > Just noticed that the release year of the 3rd ed. should also be changed to > 2009 in the next line.

Re: [PATCH] Typo in java.util.regex.Pattern

2020-05-30 Thread naoto . sato
Just noticed that the release year of the 3rd ed. should also be changed to 2009 in the next line. Naoto On 5/30/20 4:02 AM, Lance Andersen wrote: I can sponsor this for you Best Lance -- Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037 Oracle Java Engineering 1

Re: Sometimes constraints are questionable

2020-05-30 Thread Florian Weimer
* Martin Buchholz: > I wrote an earlier version of this grow logic, and then it was > transplanted into other classes. > > We strongly suspect that the VM will throw OOME when we try to > allocate an array beyond MAX_ARRAY_SIZE, so are reluctant to do so, > but we also consider the VM behavior a

Re: Sometimes constraints are questionable

2020-05-30 Thread Roger Riggs
Hi Jim, This kind of code exists in other places too, trying to balance preferred grow sizes with necessary ones and implementation limits.  The rationale and design has been raised several times.  That last time it resulting in consolidating similar code into

Re: Sometimes constraints are questionable

2020-05-30 Thread Martin Buchholz
On Sat, May 30, 2020 at 9:53 AM James Laskey wrote: > Understood. Just trying to balance correctness with providing meaningful > exceptions. > The VM should be providing meaningful exceptions. We might get OOME for any int array size. For attempts to allocate more than Integer.MAX_VALUE

Re: Sometimes constraints are questionable

2020-05-30 Thread James Laskey
Understood. Just trying to balance correctness with providing meaningful exceptions. I suppose another approach is to let it all go deep and catch the error on the way back and provide the detail then. Not likely win any fans.  > On May 30, 2020, at 12:30 PM, Martin Buchholz wrote: > >

Re: Sometimes constraints are questionable

2020-05-30 Thread Martin Buchholz
I wrote an earlier version of this grow logic, and then it was transplanted into other classes. We strongly suspect that the VM will throw OOME when we try to allocate an array beyond MAX_ARRAY_SIZE, so are reluctant to do so, but we also consider the VM behavior a bug that may eventually get

Sometimes constraints are questionable

2020-05-30 Thread Jim Laskey
I'm working through https://bugs.openjdk.java.net/browse/JDK-8230744 Several classes throw OutOfMemoryError without message . I'm wondering why hugeCapacity in src/jdk.zipfs/share/classes/jdk/nio/zipfs/ByteArrayChannel.java is defined as

Re: RFR: JDK-8245432: Lookup::defineHiddenClass should throw UnsupportedClassVersionError if the given bytes are of an unsupported major or minor version

2020-05-30 Thread David Holmes
On 30/05/2020 6:03 am, Mandy Chung wrote: On 5/28/20 9:18 PM, David Holmes wrote: On 29/05/2020 1:52 pm, Mandy Chung wrote: On 5/28/20 5:44 PM, David Holmes wrote: This is to validate the given version.  The runtime will check if preview feature is enabled when such class file is loaded.

Re: [PATCH] Typo in java.util.regex.Pattern

2020-05-30 Thread Pavel Rappo
Looks good. I can see that Lance has offered to sponsor that for you. (I was writing this message when I saw his reply.) I researched history a bit. That happened as one might guess quite trivially in November 2006: 2c2 < * @(#)Pattern.java 1.124 06/11/09 --- > * @(#)Pattern.java 1.125

Re: [PATCH] Typo in java.util.regex.Pattern

2020-05-30 Thread Lance Andersen
I can sponsor this for you Best Lance -- Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037 Oracle Java Engineering 1 Network Drive Burlington, MA 01803 lance.ander...@oracle.com Sent from my iPhone > On May 29, 2020, at 10:25 PM, Hong Shao Yang wrote: > > Hi! > > I