Integrated: 8306036: Use @apiNote in String.toLowerCase, String.toUpperCase

2023-04-16 Thread Eirik Bjorsnos
On Sat, 15 Apr 2023 07:56:17 GMT, Eirik Bjorsnos wrote: > Please review this PR which suggests to use `@apiNote` in the > `String.toLowerCase()` and `String.toUpperCase()` API docs. > > These methods include important usage notes which today are encoded using > `Note:`. This pull request has

Re: RFR: 8306036: Use @apiNote in String.toLowerCase, String.toUpperCase [v2]

2023-04-16 Thread Jaikiran Pai
On Sat, 15 Apr 2023 11:17:34 GMT, Eirik Bjorsnos wrote: >> Please review this PR which suggests to use `@apiNote` in the >> `String.toLowerCase()` and `String.toUpperCase()` API docs. >> >> These methods include important usage notes which today are encoded using >> `Note:`. > > Eirik Bjorsnos

Re: Add String & Character ASCII case conversion methods

2023-04-16 Thread some-java-user-99206970363698485155
Thanks for your effort on deprecating the error-prone toLowerCase() and toUpperCase() methods! Though that only addresses one aspect of my original proposal. Do you or anyone else have any opinion or feedback regarding the proposed ASCII case conversion methods? Even if you think these methods

Re: RFR: 8306038: SystemModulesPlugin: Keep stack clean

2023-04-16 Thread Oliver Kopp
On Wed, 12 Apr 2023 09:18:13 GMT, Oliver Kopp wrote: > This refs [https://bugs.openjdk.org/browse/JDK-8306038](8306038). > > (Before this referenced 8240567) > > Although this change is rather small, I think, it's good to have a "more > clean" SystemModulesPlugin available. Thank you for cre

Re: Draft: Deprecate toLowerCase()/toUpperCase() and provide locale insensitive alternative

2023-04-16 Thread Glavo
> > There's a lot more thinking required before considering adding new APIs > like this. It requires thinking about new developers writing toy programs > that could easily be confused by two methods that appear to do the same > thing. Also needs taking a broader view on how it works with other loca

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v2]

2023-04-16 Thread Sergey Tsypanov
On Wed, 12 Apr 2023 17:41:58 GMT, Roger Riggs wrote: >> Added benchmark for this > > Special casing for len == 0 and keeping the existing buf.insert for len == 1 > would avoid object creation except when it would improve performance. @RogerRiggs sorry I don't get it. Maybe you mean speacial cas

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v4]

2023-04-16 Thread Sergey Tsypanov
> Currently it's O(n) - we do `n` shifts of bytes within `StringBuilder`. This > can be reduced to O(1) improving the code like: > > DateTimeFormatter dtf = new DateTimeFormatterBuilder() > .appendLiteral("Date:") > .padNext(20, ' ') > .append(DateTimeFormatter.ISO_DATE) > .toFormatter();

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v3]

2023-04-16 Thread Sergey Tsypanov
On Wed, 12 Apr 2023 17:39:16 GMT, Roger Riggs wrote: >> Sergey Tsypanov has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains six additional >> commit

Re: RFR: 8305945: (zipfs) Opening a directory to get input stream produces incorrect exception message [v5]

2023-04-16 Thread Lance Andersen
On Sun, 16 Apr 2023 08:39:32 GMT, Alan Bateman wrote: >> added validation for other file being null but also kept the existing >> validation of the message > > Okay, although I assume this test will fail if it throws a more general > IOException (it's allowed to do that) or there is any adjustm

Re: RFR: 8305785: Avoid redundant HashMap.containsKey call in java.util.regex

2023-04-16 Thread Sergey Tsypanov
On Mon, 3 Apr 2023 16:58:15 GMT, Andrey Turbanov wrote: > `Pattern.namedGroups` and `Matcher.namedGroups` contains only non-null > values. It means instead of separate `containsKey`+`get` calls, we can use > single `HashMap.get` call and then compare result with null. > Result code is a bit sim

Re: RFR: 8306036: Use @apiNote in String.toLowerCase, String.toUpperCase [v2]

2023-04-16 Thread Eirik Bjorsnos
On Sat, 15 Apr 2023 11:17:34 GMT, Eirik Bjorsnos wrote: >> Please review this PR which suggests to use `@apiNote` in the >> `String.toLowerCase()` and `String.toUpperCase()` API docs. >> >> These methods include important usage notes which today are encoded using >> `Note:`. > > Eirik Bjorsnos

Re: RFR: 8305945: (zipfs) Opening a directory to get input stream produces incorrect exception message [v5]

2023-04-16 Thread Alan Bateman
On Sat, 15 Apr 2023 10:24:58 GMT, Lance Andersen wrote: >> test/jdk/jdk/nio/zipfs/ZipFSDirectoryExceptionMessageTest.java line 96: >> >>> 94: var file = zipfs.getPath(DIRECTORY_NAME); >>> 95: var x = assertThrows(FileSystemException.class, () -> >>> Files.newInputStream(

Re: RFR: 8306036: Use @apiNote in String.toLowerCase, String.toUpperCase [v2]

2023-04-16 Thread Alan Bateman
On Sat, 15 Apr 2023 19:54:41 GMT, Eirik Bjorsnos wrote: > Would you prefer that I expand this PR to take care of at least a few of > those? Happy to do so, but it will require more reviewer cycles. (Although > changes should be fairly straightforward). Gosh no, my comment was to say that there

Re: RFR: 8240567: SystemModulesPlugin: Keep stack clean

2023-04-16 Thread Alan Bateman
On Wed, 12 Apr 2023 10:05:34 GMT, Oliver Kopp wrote: > For me, it's the correct one. I was not sure which one to link. I can also > drop the reference. I checked the generated code and it looks like the code generated to invoke builder's newRequires, newExports, ... is missing a pop as the ret