Re: RFR: 8278087: Deserialization filter and filter factory property error reporting under specified [v2]

2021-12-16 Thread Lance Andersen
On Mon, 6 Dec 2021 16:59:41 GMT, Roger Riggs wrote: >> The effects of invalid values of `jdk.serialFilter` and >> `jdk.serialFilterFactory` properties are >> incompletely specified. The behavior for invalid values of the properties is >> different and >> use an unconventional exception type, `

Re: RFR: 8274811: Remove superfluous use of boxing in java.base

2021-12-27 Thread Lance Andersen
On Sat, 11 Sep 2021 12:11:50 GMT, Andrey Turbanov wrote: > Usages of primitive types should be preferred and makes code easier to read. > Similar cleanups: > 1. [JDK-8273168](https://bugs.openjdk.java.net/browse/JDK-8273168) > java.desktop > 2. [JDK-8274234](https://bugs.openjdk.java.net/browse/

Re: RFR: 8272746: ZipFile can't open big file (NegativeArraySizeException) [v2]

2022-01-06 Thread Lance Andersen
On Thu, 6 Jan 2022 09:34:24 GMT, Alan Bateman wrote: > > @AlanBateman Could you please review the above comments. > > Thanks for changing the message, the update to ZipFile looks good to me > although I'm still surprised that the native tools support a CEN larger than > 2Gb. > > I'm slow to a

Re: RFR: 8268081: Upgrade Unicode Data Files to 14.0.0

2022-01-06 Thread Lance Andersen
On Wed, 5 Jan 2022 22:42:38 GMT, Naoto Sato wrote: > Please review the changes for upgrading the Unicode support in the JDK, from > version 13 to version 14. Corresponding CSR has also been drafted. Marked as reviewed by lancea (Reviewer). - PR: https://git.openjdk.java.net/jdk/pu

Re: RFR: 8272746: ZipFile can't open big file (NegativeArraySizeException) [v2]

2022-01-08 Thread Lance Andersen
On Fri, 24 Dec 2021 11:07:04 GMT, Masanori Yano wrote: >> Could you please review the JDK-8272746 bug fixes? >> Since the array index is of type int, the overflow occurs when the value of >> end.cenlen is too large because of too many entries. >> It is necessary to read a part of the CEN from th

Re: RFR: 8279918: Fix various doc typos

2022-01-13 Thread Lance Andersen
On Thu, 13 Jan 2022 10:30:07 GMT, Pavel Rappo wrote: > - Most of the typos are of a trivial kind: missing whitespace. > - If any of the typos should be fixed in the upstream projects instead, > please say so; I will drop those typos from the patch. > - As I understand it, ` ` in ImageInputStream

Re: RFR: 8279918: Fix various doc typos

2022-01-13 Thread Lance Andersen
On Thu, 13 Jan 2022 11:28:34 GMT, Kevin Walls wrote: >> I thought about it too, but then noticed how the position of `[]` mimics >> that of the respective method signatures in code. > > OK, so lines 264, 295, 329, 364, 431 are arguably wrong as well? Separating > the [] completely looks quite

Re: RFR: 8279918: Fix various doc typos

2022-01-13 Thread Lance Andersen
On Thu, 13 Jan 2022 11:29:35 GMT, Pavel Rappo wrote: >> src/java.sql/share/classes/java/sql/Statement.java line 784: >> >>> 782: * statement returns a {@code ResultSet} object, the second >>> argument >>> 783: * supplied to this method is not an >>> 784: * {@code int} array whose

Re: RFR: 8279918: Fix various doc typos [v2]

2022-01-13 Thread Lance Andersen
On Thu, 13 Jan 2022 12:37:46 GMT, Pavel Rappo wrote: > > The above is a bit confusing as it reads(same in ImageInputStream.java). I > > think that that can be looked at later. > > Just to clarify: you are okay with removing the ` ` entity, right? As for > ImageInputStream, some doc comments sh

Re: RFR: 8279918: Fix various doc typos [v2]

2022-01-13 Thread Lance Andersen
On Thu, 13 Jan 2022 13:48:02 GMT, Pavel Rappo wrote: > > Yes an "or" is probably worthwhile to add. > > I would prefer to leave it for the follow-up cleanup if only because adding > "or" here would make it inconsistent with other `@throws SQLException` > descriptions in that file and perhaps e

Re: RFR: 8279918: Fix various doc typos [v2]

2022-01-13 Thread Lance Andersen
On Thu, 13 Jan 2022 14:01:04 GMT, Pavel Rappo wrote: >> - Most of the typos are of a trivial kind: missing whitespace. >> - If any of the typos should be fixed in the upstream projects instead, >> please say so; I will drop those typos from the patch. >> - As I understand it, ` ` in ImageInputSt

Re: RFR: 8272746: ZipFile can't open big file (NegativeArraySizeException) [v3]

2022-01-14 Thread Lance Andersen
On Fri, 14 Jan 2022 11:05:06 GMT, Masanori Yano wrote: >> Could you please review the JDK-8272746 bug fixes? >> Since the array index is of type int, the overflow occurs when the value of >> end.cenlen is too large because of too many entries. >> It is necessary to read a part of the CEN from th

Re: RFR: 8272746: ZipFile can't open big file (NegativeArraySizeException) [v4]

2022-01-17 Thread Lance Andersen
On Mon, 17 Jan 2022 09:56:13 GMT, Masanori Yano wrote: >> Could you please review the JDK-8272746 bug fixes? >> Since the array index is of type int, the overflow occurs when the value of >> end.cenlen is too large because of too many entries. >> It is necessary to read a part of the CEN from th

Re: RFR: JDK-8280492: Address remaining doclint issues in JDK build

2022-01-23 Thread Lance Andersen
On Sat, 22 Jan 2022 21:09:03 GMT, Joe Darcy wrote: > Use presumed syntax that will be introduced by JDK-8280488. Marked as reviewed by lancea (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/7189

Re: RFR: 8280403: RegEx: String.split can fail with NPE in Pattern.CharPredicate::match

2022-01-24 Thread Lance Andersen
On Mon, 24 Jan 2022 17:21:57 GMT, Ian Graves wrote: > Replacing a buggy NullPointerException in `Pattern.compile()` with the proper > PatternSyntaxException Marked as reviewed by lancea (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/7201

Re: RFR: 8266974: duplicate property key in java.sql.rowset resource bundle

2022-01-25 Thread Lance Andersen
On Tue, 25 Jan 2022 10:47:41 GMT, Masanori Yano wrote: > I have removed the duplicate property keys. > Could you please review the fix? Marked as reviewed by lancea (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/7212

Re: RFR: JDK-8280534: Enable compile-time doclint reference checking [v2]

2022-01-28 Thread Lance Andersen
On Fri, 28 Jan 2022 02:15:59 GMT, Joe Darcy wrote: >> The changes in this PR on top of the out-for-review changes in >> https://git.openjdk.java.net/jdk/pull/7222 allow compile-time doclint >> checking to be enabled in all JDK modules. >> >> Typically, a @SuppressWarnings("doclint:refernce") a

Re: RFR: JDK-8281082: Improve javadoc references to JOSS

2022-02-01 Thread Lance Andersen
On Tue, 1 Feb 2022 21:11:39 GMT, Joe Darcy wrote: > The references to JOSS, the Java Object Serialization Specification, are not > done consistently in the API javadoc. This should be improved. > > I'll update copyright years before pushing. Marked as reviewed by lancea (Reviewer). --

Re: RFR: 8281104: jar --create should create missing parent directories

2022-02-03 Thread Lance Andersen
On Wed, 2 Feb 2022 20:21:54 GMT, Christian Stein wrote: > Calling `jar --create --file a/b/foo.jar INPUT-FILES` should create missing > parent directories (here `a/b`) on the default file system before storing the > JAR file (here `foo.jar`) in the destination directory. Thank you for taking t

Re: RFR: 8281104: jar --create should create missing parent directories

2022-02-03 Thread Lance Andersen
On Thu, 3 Feb 2022 19:42:25 GMT, Christian Stein wrote: > Thanks for the review, Lance. > > I didn't change order of creation, validation, and movement of the temporary > JAR file in order to keep existing behaviour consistent. I do think we are better served with the validation check earlier

RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName()

2022-02-04 Thread Lance Andersen
Hi all, Please review the attached patch to address - That JarFile::getInputStream did not check for a null ZipEntry passed as a parameter - Have Zip/JarFile::getInputStream throw a ZipException in the event that an unexpected exception occurs Mach5 tiers1-3 runs are clean as are the TCK java.

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName()

2022-02-04 Thread Lance Andersen
On Fri, 4 Feb 2022 15:06:59 GMT, Alan Bateman wrote: >> Hi all, >> >> Please review the attached patch to address >> >> - That JarFile::getInputStream did not check for a null ZipEntry passed as a >> parameter >> - Have Zip/JarFile::getInputStream throw a ZipException in the event that an >>

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName()

2022-02-04 Thread Lance Andersen
On Fri, 4 Feb 2022 15:55:33 GMT, Sean Mullan wrote: > Could these unexpected exceptions also occur when using the `JarInputStream` > API? It's a different code path as Zip/JarFile leverage the CEN where Zip/JarInputStream leverage the LOC. I can give it a go and if there is an issue will cr

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName()

2022-02-04 Thread Lance Andersen
On Fri, 4 Feb 2022 16:06:34 GMT, Lance Andersen wrote: > > Could these unexpected exceptions also occur when using the > > `JarInputStream` API? > > It's a different code path as Zip/JarFile leverage the CEN where > Zip/JarInputStream leverage the LOC. I can give

Re: RFR: 8281104: jar --create should create missing parent directories

2022-02-04 Thread Lance Andersen
On Wed, 2 Feb 2022 20:21:54 GMT, Christian Stein wrote: > Calling `jar --create --file a/b/foo.jar INPUT-FILES` should create missing > parent directories (here `a/b`) on the default file system before storing the > JAR file (here `foo.jar`) in the destination directory. > > I think this would

Re: RFR: 8281104: jar --create should create missing parent directories [v2]

2022-02-04 Thread Lance Andersen
On Fri, 4 Feb 2022 21:55:28 GMT, Christian Stein wrote: >> Calling `jar --create --file a/b/foo.jar INPUT-FILES` should create missing >> parent directories (here `a/b`) on the default file system before storing >> the JAR file (here `foo.jar`) in the destination directory. > > Christian Stein

Re: RFR: 8281104: jar --create should create missing parent directories

2022-02-04 Thread Lance Andersen
On Fri, 4 Feb 2022 21:47:16 GMT, Christian Stein wrote: > Should I also extend this "usage.compat" help message block? When and where > is it displayed? 🤔 > > https://github.com/openjdk/jdk/blob/48523b090886f7b24ed4009f0c150efaa6f7b056/src/jdk.jartool/share/classes/sun/tools/jar/resources/jar.p

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName()

2022-02-07 Thread Lance Andersen
On Mon, 7 Feb 2022 15:16:43 GMT, Sean Mullan wrote: >> JarFile::getInputStream. mentions ZipException but not JarException which is >> why I chose this. If we change this to JarException, I would need to update >> the javadoc and create a CSR. >> >> Please let me know your preference > > `Jar

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName()

2022-02-07 Thread Lance Andersen
On Mon, 7 Feb 2022 18:44:10 GMT, Sean Mullan wrote: >> Looking at this a bit more, it looks like `JariFile::initializeVerifier` is >> the only place currently in `JarFile` that could throw a `JarException` and >> that method could be called from `JarFile::getInputStream` >> >> As `verifiableE

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v2]

2022-02-07 Thread Lance Andersen
Mach5 tiers1-3 runs are clean as are the TCK java.util.zip and java.util.jar > test runs > > Best > Lance Lance Andersen has updated the pull request incrementally with one additional commit since the last revision: Reduce Exception checking to JarFile::verifiableEnt

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v2]

2022-02-07 Thread Lance Andersen
On Mon, 7 Feb 2022 20:16:43 GMT, Lance Andersen wrote: >> If you are pretty sure the only other case are as above, I wonder if a >> simpler fix would be to change `verifiableEntry()` to check for these null >> cases and throw a `ZipException` which will get dire

Re: RFR: 8281104: jar --create should create missing parent directories [v3]

2022-02-08 Thread Lance Andersen
On Fri, 4 Feb 2022 22:29:45 GMT, Christian Stein wrote: >> Calling `jar --create --file a/b/foo.jar INPUT-FILES` should create missing >> parent directories (here `a/b`) on the default file system before storing >> the JAR file (here `foo.jar`) in the destination directory. > > Christian Stein

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v2]

2022-02-08 Thread Lance Andersen
On Tue, 8 Feb 2022 16:15:20 GMT, Sean Mullan wrote: >> if ZipEntry is extended and getName() overridden then you can't trust the >> name. So I think you'll have extract the name rather than calling >> ZipEntry::getName twice. I'm almost tempted to have getInputStream(ZipEntry) >> be re-specifi

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v2]

2022-02-08 Thread Lance Andersen
On Tue, 8 Feb 2022 18:06:52 GMT, Lance Andersen wrote: >> Ah, yes - good catch! > > Will do. > I'm almost tempted to have getInputStream(ZipEntry) be re-specified to throw > IAE if the zip entry name is null. I personally think it is best to continue throw the NPE as

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v2]

2022-02-08 Thread Lance Andersen
On Tue, 8 Feb 2022 15:31:51 GMT, Sean Mullan wrote: >> Lance Andersen has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Reduce Exception checking to JarFile::verifiableEntry > > src/java.base/share/classes/j

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v2]

2022-02-08 Thread Lance Andersen
On Tue, 8 Feb 2022 18:05:25 GMT, Lance Andersen wrote: >> ze can't be null here. > >> ze can't be null here. > > Actually it can be: Consider the following: > > > try (JarFile jf = new JarFile(SIGNED_VALID_ENTRY_NAME_JAR.toFile(), > true))

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v2]

2022-02-08 Thread Lance Andersen
On Tue, 8 Feb 2022 15:55:50 GMT, Alan Bateman wrote: > ze can't be null here. Actually it can be: Consider the following: try (JarFile jf = new JarFile(SIGNED_VALID_ENTRY_NAME_JAR.toFile(), true)) { var ze = new ZipEntry("org/gotham/Batcave.class"); var ex= ex

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v2]

2022-02-08 Thread Lance Andersen
On Tue, 8 Feb 2022 18:56:02 GMT, Alan Bateman wrote: >>> I'm almost tempted to have getInputStream(ZipEntry) be re-specified to >>> throw IAE if the zip entry name is null. >> >> I personally think it is best to continue throw the NPE as that provides >> symmetry with ZipFile::getInputStream,

Re: Integrated: 8281476: ProblemList tools/jar/CreateMissingParentDirectories.java

2022-02-08 Thread Lance Andersen
On Tue, 8 Feb 2022 20:09:30 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList tools/jar/CreateMissingParentDirectories.java. Marked as reviewed by lancea (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/7390

Re: RFR: 8281470: tools/jar/CreateMissingParentDirectories.java fails with "Should have failed creating jar file"

2022-02-09 Thread Lance Andersen
On Wed, 9 Feb 2022 06:42:51 GMT, Christian Stein wrote: > This PR removes the redundant and failing test-case. > It also removes the test class from the problem list. > > Adds additional test-cases using long form option names of `jar`. Looks good. Thank you for addressing this hiccup! --

Re: RFR: 8280825: Modules that "provide" ToolProvider should document the name that can be used

2022-02-09 Thread Lance Andersen
On Wed, 9 Feb 2022 16:37:00 GMT, Christian Stein wrote: > A number of modules declare that the "provide" ToolProvider. > > These modules now specify the "name" of the argument used by > `ToolProvider.findFirst` to access an instance of the tool provider within > the description part of a `@pro

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v2]

2022-02-09 Thread Lance Andersen
On Tue, 8 Feb 2022 18:06:04 GMT, Lance Andersen wrote: >>> ze can't be null here. >> >> Actually it can be: Consider the following: >> >> >> try (JarFile jf = new JarFile(SIGNED_VALID_ENTRY_NAME_JAR.toFile(), >> true)) { >>

Re: RFR: 8280825: Modules that "provide" ToolProvider should document the name that can be used

2022-02-10 Thread Lance Andersen
On Thu, 10 Feb 2022 03:04:43 GMT, Christian Stein wrote: >> What is "it" in "it provides..." ? > > Perhaps like this? > > > /** > * ... > * @provides java.util.spi.ToolProvider > * Module {@code jdk.jartool} provides a tool named {@code "jar"}. > * Invoke {@link java.util.sp

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v3]

2022-02-10 Thread Lance Andersen
Mach5 tiers1-3 runs are clean as are the TCK java.util.zip and java.util.jar > test runs > > Best > Lance Lance Andersen has updated the pull request incrementally with two additional commits since the last revision: - Return a null InputStream when the ZipEntry is not found in

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v2]

2022-02-10 Thread Lance Andersen
On Thu, 10 Feb 2022 20:37:50 GMT, Sean Mullan wrote: >> Agree on returning null to maintain current behavior. I would also lean >> towards amending the specification to specify what has been long-standing >> behavior. > > If we had to do it over again, I do think throwing IAE is more appropriat

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v3]

2022-02-11 Thread Lance Andersen
On Fri, 11 Feb 2022 13:45:47 GMT, Alan Bateman wrote: >> Lance Andersen has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Return a null InputStream when the ZipEntry is not found in the Jar >> - Address f

Re: RFR: 8280825: Modules that "provide" ToolProvider should document the name that can be used

2022-02-14 Thread Lance Andersen
On Mon, 14 Feb 2022 18:20:19 GMT, Christian Stein wrote: > I think Jon's latest proposal combines all requirements with using better > wording than my initial text. > > Do you agree, @AlanBateman and @LanceAndersen? Yes, I think that sounds good - PR: https://git.openjdk.java.net

Re: RFR: 8280825: Modules that "provide" ToolProvider should document the name that can be used [v3]

2022-02-15 Thread Lance Andersen
On Tue, 15 Feb 2022 06:40:57 GMT, Christian Stein wrote: >> A number of modules declare that the "provide" ToolProvider. >> >> These modules now specify the "name" of the argument used by >> `ToolProvider.findFirst` to access an instance of the tool provider within >> the description part of a

Re: RFR: 8276686: Malformed Javadoc inline tags in JDK source in /java/util/regex/Pattern.java

2022-02-17 Thread Lance Andersen
On Thu, 17 Feb 2022 18:02:20 GMT, Ian Graves wrote: > Adding a missing period per this doc bug. Marked as reviewed by lancea (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/7521

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v4]

2022-02-17 Thread Lance Andersen
Mach5 tiers1-3 runs are clean as are the TCK java.util.zip and java.util.jar > test runs > > Best > Lance Lance Andersen has updated the pull request incrementally with one additional commit since the last revision: Return null when ZipEntry::getName is null - Chan

Re: RFR: 8280409: JarFile::verifiableEntry can fail with NPE accessing ze.getName() [v3]

2022-02-17 Thread Lance Andersen
On Fri, 11 Feb 2022 17:43:47 GMT, Lance Andersen wrote: >> src/java.base/share/classes/java/util/jar/JarFile.java line 881: >> >>> 879: ze = getJarEntry(entryName); >>> 880: } else { >>> 881: throw new ZipExc

Re: RFR: 8281962: Avoid unnecessary native calls in InflaterInputStream [v2]

2022-02-17 Thread Lance Andersen
On Thu, 17 Feb 2022 16:02:42 GMT, Volker Simonis wrote: >> Currently, `InflaterInputStream::read()` first does a native call to the >> underlying zlib `inflate()` function and only afterwards checks if the >> inflater requires input (i.e. `Inflater::needsInput()`) or has finished >> inflating

Re: RFR: 8280409: JarFile::getInputStream can fail with NPE accessing ze.getName() [v4]

2022-02-18 Thread Lance Andersen
On Fri, 18 Feb 2022 12:09:53 GMT, Alan Bateman wrote: > The updates changes to ZipFile/JarFile look okay. I don't have time to study > the test too closely right now but it will need to include instructions on > how to re-create the signed JAR that is stored in the byte array. Those instructio

Re: RFR: 8280409: JarFile::getInputStream can fail with NPE accessing ze.getName() [v4]

2022-02-18 Thread Lance Andersen
On Fri, 18 Feb 2022 17:05:53 GMT, Alan Bateman wrote: > > > The updates changes to ZipFile/JarFile look okay. I don't have time to > > > study the test too closely right now but it will need to include > > > instructions on how to re-create the signed JAR that is stored in the > > > byte array

Re: RFR: 8280409: JarFile::getInputStream can fail with NPE accessing ze.getName() [v5]

2022-02-18 Thread Lance Andersen
Mach5 tiers1-3 runs are clean as are the TCK java.util.zip and java.util.jar > test runs > > Best > Lance Lance Andersen has updated the pull request incrementally with one additional commit since the last revision: Add additional comments describing how the jars are creat

Re: RFR: 8280409: JarFile::getInputStream can fail with NPE accessing ze.getName() [v4]

2022-02-18 Thread Lance Andersen
On Fri, 18 Feb 2022 17:20:26 GMT, Alan Bateman wrote: > > If you feel there is still something lacking for documentation, I can > > certainly make another pass clarify/add it, but I tried to cover the steps > > (but I also understand what might be obvious to me might not be as obvious > > as I

Re: RFR: 8280409: JarFile::getInputStream can fail with NPE accessing ze.getName() [v6]

2022-02-18 Thread Lance Andersen
Mach5 tiers1-3 runs are clean as are the TCK java.util.zip and java.util.jar > test runs > > Best > Lance Lance Andersen has updated the pull request incrementally with one additional commit since the last revision: remove trailing space - Changes: - all: https:

Re: RFR: 8280409: JarFile::getInputStream can fail with NPE accessing ze.getName() [v7]

2022-02-18 Thread Lance Andersen
Mach5 tiers1-3 runs are clean as are the TCK java.util.zip and java.util.jar > test runs > > Best > Lance Lance Andersen has updated the pull request incrementally with one additional commit since the last revision: remove extra '}' - Changes: - a

Re: RFR: 8282190: Typo in javadoc of java.time.format.DateTimeFormatter#getDecimalStyle

2022-02-21 Thread Lance Andersen
On Mon, 21 Feb 2022 12:42:37 GMT, Jaikiran Pai wrote: > Can I please get a review of this trivial change to the javadoc of > `DateTimeFormatter.getDecimalStyle()` method which fixes the typo noted in > https://bugs.openjdk.java.net/browse/JDK-8282190? Marked as reviewed by lancea (Reviewer).

Re: RFR: 8281962: Avoid unnecessary native calls in InflaterInputStream [v2]

2022-02-21 Thread Lance Andersen
On Mon, 21 Feb 2022 10:06:40 GMT, Volker Simonis wrote: > > The change looks innocuous so it is probably OK. I would like to kick of > > our Mach5 runs to see if it shakes out any potential issues. > > @LanceAndersen , did you manage to get any Mach5 results? Did you find any > issues? Tests

Re: RFR: 8280409: JarFile::getInputStream can fail with NPE accessing ze.getName() [v8]

2022-02-22 Thread Lance Andersen
Mach5 tiers1-3 runs are clean as are the TCK java.util.zip and java.util.jar > test runs > > Best > Lance Lance Andersen has updated the pull request incrementally with one additional commit since the last revision: Modified and clarified test comments - Changes:

Re: RFR: 8280409: JarFile::getInputStream can fail with NPE accessing ze.getName() [v4]

2022-02-22 Thread Lance Andersen
On Sat, 19 Feb 2022 10:59:56 GMT, Alan Bateman wrote: > > Ok, thank you for the feedback. I just pushed a change with additional > > comments on the jar creation which hopefully will address your input above. > > It's a bit better but I think it needs a clear step-by-step instructions in a > c

Re: RFR: 8281962: Avoid unnecessary native calls in InflaterInputStream [v2]

2022-02-22 Thread Lance Andersen
On Thu, 17 Feb 2022 16:02:42 GMT, Volker Simonis wrote: >> Currently, `InflaterInputStream::read()` first does a native call to the >> underlying zlib `inflate()` function and only afterwards checks if the >> inflater requires input (i.e. `Inflater::needsInput()`) or has finished >> inflating

Integrated: 8280409: JarFile::getInputStream can fail with NPE accessing ze.getName()

2022-02-23 Thread Lance Andersen
On Fri, 4 Feb 2022 12:42:39 GMT, Lance Andersen wrote: > Hi all, > > Please review the attached patch to address > > - That JarFile::getInputStream did not check for a null ZipEntry passed as a > parameter > - Have Zip/JarFile::getInputStream throw a ZipException

Re: RFR: 8282131: java.time.ZoneId should be a sealed abstract class

2022-02-25 Thread Lance Andersen
On Fri, 25 Feb 2022 19:02:55 GMT, Naoto Sato wrote: > Refactoring `java.time.ZoneId` class to be a sealed class. A CSR has also > been drafted. Marked as reviewed by lancea (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/7625

Re: RFR: 8282081: java.time.DateTimeFormatter: wrong definition of symbol F

2022-03-01 Thread Lance Andersen
On Mon, 28 Feb 2022 23:17:57 GMT, Naoto Sato wrote: > Fixing the definition and implementation of the pattern symbol `F`. Although > it is an incompatible change, I believe it is worth the fix. For that, a CSR > has been drafted. I think the change makes sense. Are there any TCK tests that ne

RFR: 8280404: Unexpected exception thrown when CEN file entry comment length is not valid

2022-03-03 Thread Lance Andersen
Hi all, This PR addresses an issue where an unexpected exception is thrown when the CEN file entry comment length is not correct. Mach5 tiers 1 - 3 run clean with this change. - Commit messages: - Correct bug number in test - Validate comment if it exists when processing the CEN

Re: RFR: 8280404: Unexpected exception thrown when CEN file entry comment length is not valid [v2]

2022-03-03 Thread Lance Andersen
> Hi all, > > This PR addresses an issue where an unexpected exception is thrown when the > CEN file entry comment length is not correct. > > Mach5 tiers 1 - 3 run clean with this change. Lance Andersen has updated the pull request incrementally with one additional com

Re: RFR: 8282583: Update BCEL md to include the copyright notice

2022-03-03 Thread Lance Andersen
On Thu, 3 Mar 2022 17:51:31 GMT, Joe Wang wrote: > Update BCEL md to include the copyright notice. Looks fine. I assume the 2020 vs 2022 is intentional? - Marked as reviewed by lancea (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7681

Re: RFR: 8282583: Update BCEL md to include the copyright notice

2022-03-03 Thread Lance Andersen
On Thu, 3 Mar 2022 18:35:05 GMT, Joe Wang wrote: > Yes, it's 2020. The latest release, 6.5.0, was released in 2020. The text > comes from the NOTICE.txt file in the BCEL 6.5.0 release. Thank you for the confirmation Joe! - PR: https://git.openjdk.java.net/jdk/pull/7681

Re: RFR: 8282583: Update BCEL md to include the copyright notice [v2]

2022-03-03 Thread Lance Andersen
On Thu, 3 Mar 2022 22:34:43 GMT, Joe Wang wrote: >> Update BCEL md to include the copyright notice. > > Joe Wang has updated the pull request incrementally with one additional > commit since the last revision: > > remove the section that's no longer in the notice file Marked as reviewed by l

Re: RFR: 8282657: Code cleanup: removing double semicolons at the end of lines

2022-03-04 Thread Lance Andersen
On Fri, 28 Jan 2022 14:39:31 GMT, Matteo Baccan wrote: > Hi > > I have reviewed the code for removing double semicolons at the end of lines > > all the best > matteo The changes look OK. The copyright year probably should be updated as part of this PR - Marked as reviewed by la

Re: RFR: JDK-8282696: Add constructors take a cause to InvalidObjectException and InvalidClassException [v3]

2022-03-05 Thread Lance Andersen
On Sat, 5 Mar 2022 03:29:44 GMT, Joe Darcy wrote: >> Occasionally in core-libs we've discussed whether or not to do a pass over >> the exception classes and proactively add any of four missing convention >> constructors per java.lang.Throwable (no-arg, string, cause, cause and >> string). Last

Re: RFR: JDK-8282696: Add constructors take a cause to InvalidObjectException and InvalidClassException [v4]

2022-03-06 Thread Lance Andersen
On Sun, 6 Mar 2022 17:28:42 GMT, Joe Darcy wrote: >> Occasionally in core-libs we've discussed whether or not to do a pass over >> the exception classes and proactively add any of four missing convention >> constructors per java.lang.Throwable (no-arg, string, cause, cause and >> string). Last

Integrated: 8280404: Unexpected exception thrown when CEN file entry comment length is not valid

2022-03-07 Thread Lance Andersen
On Thu, 3 Mar 2022 11:19:12 GMT, Lance Andersen wrote: > Hi all, > > This PR addresses an issue where an unexpected exception is thrown when the > CEN file entry comment length is not correct. > > Mach5 tiers 1 - 3 run clean with this change. This pull request has n

Re: RFR: 8282657: Code cleanup: removing double semicolons at the end of lines

2022-03-07 Thread Lance Andersen
On Fri, 28 Jan 2022 14:39:31 GMT, Matteo Baccan wrote: > Hi > > I have reviewed the code for removing double semicolons at the end of lines > > all the best > matteo What problem are you having editing the PR header? You should be able to do so as the author of the PR - PR: ht

Re: RFR: 8281560: Matcher.hitEnd returns unexpected results in presence of CANON_EQ flag. [v2]

2022-03-07 Thread Lance Andersen
On Mon, 7 Mar 2022 22:29:29 GMT, Ian Graves wrote: >> Fixing a bug in `NFCCharProperty` where code falling through an if-statement >> can prematurely set the matcher's `hitEnd` field to true. > > Ian Graves has updated the pull request with a new target base due to a merge > or a rebase. The pu

Re: RFR: 8281560: Matcher.hitEnd returns unexpected results in presence of CANON_EQ flag. [v4]

2022-03-08 Thread Lance Andersen
On Tue, 8 Mar 2022 04:23:43 GMT, Ian Graves wrote: >> Fixing a bug in `NFCCharProperty` where code falling through an if-statement >> can prematurely set the matcher's `hitEnd` field to true. > > Ian Graves has updated the pull request incrementally with one additional > commit since the last r

Re: RFR: 8282572: EnumSet should be a sealed class

2022-03-08 Thread Lance Andersen
On Tue, 8 Mar 2022 11:45:13 GMT, Athijegannathan Sundararajan wrote: > Do we need a CSR as a public class is changed from non-sealed to sealed? > > (Although the constructor has been package-private and hence it will not > affect any non-dk code as noted by Jaikiran via private conversation. O

Re: RFR: 8264160: Regex \b is not consistent with \w without UNICODE_CHARACTER_CLASS

2022-03-08 Thread Lance Andersen
On Fri, 18 Feb 2022 19:47:09 GMT, Ian Graves wrote: > Proposed change in behavior to correct inconsistencies between `\w` and `\b` > metacharacters Have not gone through the javadoc changes in detail yet but plan to, only scanned it just now On a quick skim of the test, it could use some TLC

Re: RFR: 8264160: Regex \b is not consistent with \w without UNICODE_CHARACTER_CLASS [v3]

2022-03-08 Thread Lance Andersen
On Tue, 8 Mar 2022 17:19:14 GMT, Ian Graves wrote: >> Proposed change in behavior to correct inconsistencies between `\w` and `\b` >> metacharacters > > Ian Graves has updated the pull request with a new target base due to a merge > or a rebase. The pull request now contains six commits: > >

Re: RFR: 8264160: Regex \b is not consistent with \w without UNICODE_CHARACTER_CLASS [v4]

2022-03-09 Thread Lance Andersen
On Wed, 9 Mar 2022 01:33:43 GMT, Ian Graves wrote: >> Proposed change in behavior to correct inconsistencies between `\w` and `\b` >> metacharacters > > Ian Graves has updated the pull request incrementally with one additional > commit since the last revision: > > Updating with additional de

Re: RFR: 8264160: Regex \b is not consistent with \w without UNICODE_CHARACTER_CLASS [v6]

2022-03-10 Thread Lance Andersen
On Thu, 10 Mar 2022 16:17:16 GMT, Ian Graves wrote: >> Proposed change in behavior to correct inconsistencies between `\w` and `\b` >> metacharacters > > Ian Graves has updated the pull request incrementally with one additional > commit since the last revision: > > Adding description of word

Re: RFR: 8058924: FileReader(String) documentation is insufficient

2022-03-11 Thread Lance Andersen
On Thu, 10 Mar 2022 02:30:35 GMT, Brian Burkhalter wrote: > Add a statement to the `java.io` package documentation clarifying how a > `String` representing a _pathname string_ is interpreted in the package. Marked as reviewed by lancea (Reviewer). - PR: https://git.openjdk.java.ne

Re: RFR: 8282929: Localized monetary symbols are not reflected in `toLocalizedPattern` return value [v2]

2022-03-12 Thread Lance Andersen
On Fri, 11 Mar 2022 22:20:38 GMT, Naoto Sato wrote: >> `DecimalFormat.toLocalizedPattern()` was not honoring the monetary >> decimal/grouping separator symbols. Fix is straightforward to use the >> correct symbols depending on the formatter type. > > Naoto Sato has updated the pull request incr

Re: RFR: 8278794: Infinite loop in DeflaterOutputStream.finish() [v2]

2022-03-16 Thread Lance Andersen
On Wed, 16 Mar 2022 16:34:37 GMT, Ravi Reddy wrote: >> Hi All, >> >> This review request contains fix for infinite loop issue in >> DeflaterOutputStream.finish() in an exception scenario. >> 1. The issue is with 'finished' flag not getting set to correct value when >> there is an IOException i

Re: RFR: 8278794: Infinite loop in DeflaterOutputStream.finish() [v3]

2022-03-17 Thread Lance Andersen
On Thu, 17 Mar 2022 16:56:15 GMT, Ravi Reddy wrote: >> Hi All, >> >> This review request contains fix for infinite loop issue in >> DeflaterOutputStream.finish() in an exception scenario. >> 1. The issue is with 'finished' flag not getting set to correct value when >> there is an IOException i

Re: RFR: 8283411: InflaterInputStream holds on to a temporary byte array of 512 bytes

2022-03-20 Thread Lance Andersen
On Sun, 20 Mar 2022 04:24:07 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which handles > https://bugs.openjdk.java.net/browse/JDK-8283411? > > The commit here moves the temporary byte array from being a member of the > class to a local variable within the `skip` method

Re: RFC: JDK-8282648: Problems due to conflicting specification of Inflater::inflate(..) and InflaterInputStream::read(..)

2022-03-21 Thread Lance Andersen
ut buffer. I think we all agree that this is only a theoretic option because of its unacceptable performance regression. I personally favor option 1 but I'm interested in your opinions? Thank you and best regards, Volker [cid:E1C4E2F0-ECD0-4C9D-ADB4-B16CA7BCB7FC@home] Lance Andersen| Princip

Re: RFC: JDK-8282648: Problems due to conflicting specification of Inflater::inflate(..) and InflaterInputStream::read(..)

2022-03-22 Thread Lance Andersen
On Mar 22, 2022, at 12:28 PM, Volker Simonis mailto:volker.simo...@gmail.com>> wrote: On Mon, Mar 21, 2022 at 8:24 PM Lance Andersen mailto:lance.ander...@oracle.com>> wrote: Hi Lance, Thanks for looking into this issue. Please find my answers inline: Hi Volker, I have read

Re: RFR: 8273370: Preferences.exportSubtree() generates invalid XML if value contains control char

2022-03-24 Thread Lance Andersen
On Thu, 24 Mar 2022 18:21:05 GMT, Joe Wang wrote: > The issue was caused by the difference on handling control characters between > the parser and serializer. The parser rejected control characters while the > serializer converted them to NCRs. The fix is for the later to be aligned > with the

Re: RFR: 8283349 : Robustness improvements to java/util/prefs/AddNodeChangeListener.jar [v2]

2022-03-25 Thread Lance Andersen
On Thu, 24 Mar 2022 20:59:20 GMT, Brent Christian wrote: >> Please review this change to the java/util/prefs/AddNodeChangeListener.jar >> test. >> >> Although the test specifies "-Djava.util.prefs.userRoot=." to ensure a fresh >> Preferences on each test run, MacOS does not seem to honor this,

Re: RFR: 8282819: Deprecate Locale class constructors [v3]

2022-03-26 Thread Lance Andersen
On Fri, 25 Mar 2022 22:51:23 GMT, Naoto Sato wrote: >> Proposing to deprecate the constructors in the `java.util.Locale` class. >> There is already a factory method and a builder to return singletons, so >> there is no need to have constructors anymore unless one purposefully wants >> to creat

Re: RFR: 8283758: Problems due to conflicting specification of Inflater::inflate(..) and InflaterInputStream::read(..)

2022-03-28 Thread Lance Andersen
On Mon, 28 Mar 2022 09:37:58 GMT, Volker Simonis wrote: > Add an API note to `InflaterInputStream::read(byte[] b, int off, int len)` to > highlight that it might write more bytes than the returned number of > inflated bytes into the buffer `b`. > > The superclass `java.io.InputStream` specifi

Re: RFR: 8282508: Updating ASM to 9.2 for JDK 19

2022-03-28 Thread Lance Andersen
On Mon, 28 Mar 2022 16:49:58 GMT, Vicente Romero wrote: > Please review this PR which is updating the ASM included in the JDK to ASM > 9.2. This version should be included in JDK19. There are basically two > commits here, one that was automatically generated and that mostly changes > file head

Re: RFR: 8282819: Deprecate Locale class constructors [v4]

2022-03-28 Thread Lance Andersen
On Mon, 28 Mar 2022 17:02:33 GMT, Naoto Sato wrote: >> Proposing to deprecate the constructors in the `java.util.Locale` class. >> There is already a factory method and a builder to return singletons, so >> there is no need to have constructors anymore unless one purposefully wants >> to creat

Re: RFR: 8282648: Problems due to conflicting specification of Inflater::inflate(..) and InflaterInputStream::read(..) [v2]

2022-03-28 Thread Lance Andersen
On Mon, 28 Mar 2022 17:21:40 GMT, Alan Bateman wrote: >> src/java.base/share/classes/java/util/zip/InflaterInputStream.java line 133: >> >>> 131: * Unlike the {@link InputStream#read(byte[],int,int) overridden >>> method} >>> 132: * of {@code InputStream}, this method might write more

Re: RFR: 8282819: Deprecate Locale class constructors [v5]

2022-03-28 Thread Lance Andersen
On Mon, 28 Mar 2022 18:51:30 GMT, Naoto Sato wrote: >> Proposing to deprecate the constructors in the `java.util.Locale` class. >> There is already a factory method and a builder to return singletons, so >> there is no need to have constructors anymore unless one purposefully wants >> to creat

RFR: 8283889: Fix typo in package-info.java

2022-03-29 Thread Lance Andersen
Hi all, Please review this trivial fix which addresses a typo in src/java.sql/share/classes/java/sql/package-info.java make docs is clean and I am also running mach5 tier1 as an extra sanity check so there are no surprises when the patch is pushed Best Lance - Commit messages: -

Integrated: 8283889: Fix Typo in open/src/java.sql/share/classes/java/sql/package-info.java

2022-03-29 Thread Lance Andersen
On Tue, 29 Mar 2022 18:23:31 GMT, Lance Andersen wrote: > Hi all, > > Please review this trivial fix which addresses a typo in > src/java.sql/share/classes/java/sql/package-info.java > > make docs is clean and I am also running mach5 tier1 as an extra sanity check > so t

<    2   3   4   5   6   7   8   9   10   11   >