RFR: 8261123: Augment discussion of equivalence classes in Object.equals and comparison methods

2021-02-08 Thread Joe Darcy
A follow-up of sorts to JDK-8257086, this change aims to improve the discussion of the relationship between Object.equals and compareTo and compare methods. The not-consistent-with-equals natural ordering of BigDecimal get more explication too. While updating Object, I added some uses of

Re: RFR: 8223188: Consider rewriting in C++ or moving to ".c" files

2021-02-08 Thread Ioi Lam
On Mon, 8 Feb 2021 22:26:22 GMT, Alexey Semenyuk wrote: > Remove needless `#ifdef __cplusplus` from .cpp sources The Bug Synopsis of 'Consider rewriting in C++ or moving to ".c" files' is unclear. I would request that the Bug Synopsis to be changed to "removed unnecessary #ifdef __cplusplus"

Re: RFR: 8261279: sun/util/resources/cldr/TimeZoneNamesTest.java timed out

2021-02-08 Thread Joe Wang
On Mon, 8 Feb 2021 21:42:36 GMT, Naoto Sato wrote: > Please review this simple test case fix. By sampling locales to test, it > reduces the possibility of the time out. Marked as reviewed by joehw (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/2465

Re: RFR: 8261279: sun/util/resources/cldr/TimeZoneNamesTest.java timed out

2021-02-08 Thread Joe Wang
On Tue, 9 Feb 2021 00:04:44 GMT, Naoto Sato wrote: >> The fix looks ok to me. Just an interesting note that this test took such a >> long time to run. Given the amount of locales, limit(30) would reduce the >> time to approximately 1/5 of the time, that would still be about 100,000ms >>

Re: RFR: 8261306: ServiceLoader documentation has malformed Unicode escape

2021-02-08 Thread Naoto Sato
On Tue, 9 Feb 2021 00:11:52 GMT, Brian Burkhalter wrote: > Please review this really small correction to the class level documentation > of `java.util.ServiceLoader`. Marked as reviewed by naoto (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/2468

Re: RFR: 8223188: Consider rewriting in C++ or moving to ".c" files

2021-02-08 Thread Alexander Matveev
On Mon, 8 Feb 2021 22:26:22 GMT, Alexey Semenyuk wrote: > Remove needless `#ifdef __cplusplus` from .cpp sources Marked as reviewed by almatvee (Committer). - PR: https://git.openjdk.java.net/jdk/pull/2466

Re: RFR: 8261306: ServiceLoader documentation has malformed Unicode escape

2021-02-08 Thread Iris Clark
On Tue, 9 Feb 2021 00:11:52 GMT, Brian Burkhalter wrote: > Please review this really small correction to the class level documentation > of `java.util.ServiceLoader`. Marked as reviewed by iris (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/2468

Re: RFR: 8261306: ServiceLoader documentation has malformed Unicode escape

2021-02-08 Thread Lance Andersen
On Tue, 9 Feb 2021 00:11:52 GMT, Brian Burkhalter wrote: > Please review this really small correction to the class level documentation > of `java.util.ServiceLoader`. I think this is fine. You could also probably use given this is HTML I believe - Marked as reviewed by lancea

Re: RFR: 8261298: LinuxPackage.c, getJvmLauncherLibPath RPM->DEB typo

2021-02-08 Thread Alexander Matveev
On Mon, 8 Feb 2021 08:49:17 GMT, Aleksey Shipilev wrote: > SonarCloud instance reports as new warning after JDK-8254702: > > This branch can not be reached because the condition duplicates a previous > condition in the same sequence of "if/else if" statements. > > char*

RFR: 8261306: ServiceLoader documentation has malformed Unicode escape

2021-02-08 Thread Brian Burkhalter
Please review this really small correction to the class level documentation of `java.util.ServiceLoader`. - Commit messages: - 8261306: ServiceLoader documentation has malformed Unicode escape Changes: https://git.openjdk.java.net/jdk/pull/2468/files Webrev:

Re: RFR: 8261300: jpackage: rewrite while(0)/while(false) to proper blocks [v2]

2021-02-08 Thread Alexander Matveev
On Mon, 8 Feb 2021 15:25:02 GMT, Aleksey Shipilev wrote: >> After JDK-8254702, SonarCloud instance complains about blocks like these: >> "Change this loop body so that it can be executed more than once." >> >> int initJvmlLauncherData(JvmlLauncherData* ptr) const { >> // Store path

Re: RFR: 8261279: sun/util/resources/cldr/TimeZoneNamesTest.java timed out

2021-02-08 Thread Naoto Sato
On Mon, 8 Feb 2021 23:42:04 GMT, Joe Wang wrote: >> Marked as reviewed by lancea (Reviewer). > > The fix looks ok to me. Just an interesting note that this test took such a > long time to run. Given the amount of locales, limit(30) would reduce the > time to approximately 1/5 of the time, that

Re: RFR: 8261279: sun/util/resources/cldr/TimeZoneNamesTest.java timed out

2021-02-08 Thread Joe Wang
On Mon, 8 Feb 2021 21:52:45 GMT, Lance Andersen wrote: >> Please review this simple test case fix. By sampling locales to test, it >> reduces the possibility of the time out. > > Marked as reviewed by lancea (Reviewer). The fix looks ok to me. Just an interesting note that this test took such

Re: RFR: 8247918: Clarify Reader.skip behavior for end of stream

2021-02-08 Thread Naoto Sato
On Mon, 8 Feb 2021 22:58:13 GMT, Brian Burkhalter wrote: >> src/java.base/share/classes/java/io/FilterReader.java line 81: >> >>> 79: * {@inheritDoc} >>> 80: * >>> 81: * @throws IllegalArgumentException If {@code n} is negative >>> and the >> >> Does this have to be

Re: RFR: 8223188: Consider rewriting in C++ or moving to ".c" files

2021-02-08 Thread Andy Herrick
On Mon, 8 Feb 2021 22:26:22 GMT, Alexey Semenyuk wrote: > Remove needless `#ifdef __cplusplus` from .cpp sources Marked as reviewed by herrick (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/2466

Re: RFR: 8247918: Clarify Reader.skip behavior for end of stream

2021-02-08 Thread Brian Burkhalter
On Mon, 8 Feb 2021 22:51:43 GMT, Naoto Sato wrote: >> Please review this clarification of the specification of the method >> `skip(long)` in `java.io.Reader` and its subclasses. Specifically, the >> behavior of the method is made clear for the case when the `Reader` is >> already at the end

Re: RFR: 8252971: WindowsFileAttributes does not know about Unix domain sockets [v7]

2021-02-08 Thread Michael McMahon
> Could I get the following change reviewed please? It fixes a problem (in > JEP380) on Windows where some file operations on Unix domain sockets were not > working and led to the feature being disabled on Windows 2019 Server in JDK > 16. So, the fix re-enables the feature on all versions of

Re: RFR: 8247918: Clarify Reader.skip behavior for end of stream

2021-02-08 Thread Naoto Sato
On Thu, 28 Jan 2021 02:22:55 GMT, Brian Burkhalter wrote: > Please review this clarification of the specification of the method > `skip(long)` in `java.io.Reader` and its subclasses. Specifically, the > behavior of the method is made clear for the case when the `Reader` is > already at the

Re: RFR: 8252971: WindowsFileAttributes does not know about Unix domain sockets [v6]

2021-02-08 Thread Michael McMahon
> Could I get the following change reviewed please? It fixes a problem (in > JEP380) on Windows where some file operations on Unix domain sockets were not > working and led to the feature being disabled on Windows 2019 Server in JDK > 16. So, the fix re-enables the feature on all versions of

RFR: 8223188: Consider rewriting in C++ or moving to ".c" files

2021-02-08 Thread Alexey Semenyuk
Remove needless `#ifdef __cplusplus` from .cpp sources - Commit messages: - 8223188: Consider rewriting in C++ or moving to ".c" files Changes: https://git.openjdk.java.net/jdk/pull/2466/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk=2466=00 Issue:

Re: RFR: 8247918: Clarify Reader.skip behavior for end of stream

2021-02-08 Thread Brian Burkhalter
On Thu, 28 Jan 2021 02:22:55 GMT, Brian Burkhalter wrote: > Please review this clarification of the specification of the method > `skip(long)` in `java.io.Reader` and its subclasses. Specifically, the > behavior of the method is made clear for the case when the `Reader` is > already at the

Re: RFR: 8252971: WindowsFileAttributes does not know about Unix domain sockets [v4]

2021-02-08 Thread Michael McMahon
On Mon, 8 Feb 2021 21:59:53 GMT, Michael McMahon wrote: >> src/java.base/windows/classes/sun/nio/fs/WindowsPath.java line 862: >> >>> 860: * and a handle to the socket file if it is. >>> 861: */ >>> 862: private long openSocketForReadAttributeAccess() { >> >> The methods here

Re: RFR: 8252971: WindowsFileAttributes does not know about Unix domain sockets [v4]

2021-02-08 Thread Michael McMahon
On Mon, 8 Feb 2021 16:50:02 GMT, Alan Bateman wrote: >> Michael McMahon 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 11 additional >>

Re: RFR: 8252971: WindowsFileAttributes does not know about Unix domain sockets [v5]

2021-02-08 Thread Michael McMahon
> Could I get the following change reviewed please? It fixes a problem (in > JEP380) on Windows where some file operations on Unix domain sockets were not > working and led to the feature being disabled on Windows 2019 Server in JDK > 16. So, the fix re-enables the feature on all versions of

Re: RFR: 8261279: sun/util/resources/cldr/TimeZoneNamesTest.java timed out

2021-02-08 Thread Lance Andersen
On Mon, 8 Feb 2021 21:42:36 GMT, Naoto Sato wrote: > Please review this simple test case fix. By sampling locales to test, it > reduces the possibility of the time out. Marked as reviewed by lancea (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/2465

Re: RFR: 8261279: sun/util/resources/cldr/TimeZoneNamesTest.java timed out

2021-02-08 Thread Brian Burkhalter
On Mon, 8 Feb 2021 21:42:36 GMT, Naoto Sato wrote: > Please review this simple test case fix. By sampling locales to test, it > reduces the possibility of the time out. Marked as reviewed by bpb (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/2465

Integrated: 8240632: Note differences between IEEE 754-2019 math lib special cases and java.lang.Math

2021-02-08 Thread Joe Darcy
On Thu, 4 Feb 2021 02:08:12 GMT, Joe Darcy wrote: > Recent revisions of the IEEE 754 floating-point standard have added guidance > on how typical math library methods (sin, cos, tan, etc.) should behave in > terms of their general quality of implementation as well as on special values. > >

Re: RFR: 8240632: Note differences between IEEE 754-2019 math lib special cases and java.lang.Math [v3]

2021-02-08 Thread Brian Burkhalter
On Sun, 7 Feb 2021 00:45:03 GMT, Joe Darcy wrote: >> Recent revisions of the IEEE 754 floating-point standard have added guidance >> on how typical math library methods (sin, cos, tan, etc.) should behave in >> terms of their general quality of implementation as well as on special >> values.

Re: RFR: 8252971: WindowsFileAttributes does not know about Unix domain sockets [v4]

2021-02-08 Thread Michael McMahon
On Mon, 8 Feb 2021 16:48:44 GMT, Alan Bateman wrote: >> Michael McMahon 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 11 additional >>

RFR: 8261279: sun/util/resources/cldr/TimeZoneNamesTest.java timed out

2021-02-08 Thread Naoto Sato
Please review this simple test case fix. By sampling locales to test, it reduces the possibility of the time out. - Commit messages: - 8261279: sun/util/resources/cldr/TimeZoneNamesTest.java timed out Changes: https://git.openjdk.java.net/jdk/pull/2465/files Webrev:

Re: RFR: 4926314: Optimize Reader.read(CharBuffer) [v5]

2021-02-08 Thread Brian Burkhalter
On Tue, 26 Jan 2021 18:22:02 GMT, Philippe Marschall wrote: >> Implement three optimiztations for Reader.read(CharBuffer) >> >> * Add a code path for heap buffers in Reader#read to use the backing array >> instead of allocating a new one. >> * Change the code path for direct buffers in

Re: RFR: 4926314: Optimize Reader.read(CharBuffer) [v3]

2021-02-08 Thread Brian Burkhalter
On Tue, 5 Jan 2021 17:44:20 GMT, Philippe Marschall wrote: >> Implement three optimiztations for Reader.read(CharBuffer) >> >> * Add a code path for heap buffers in Reader#read to use the backing array >> instead of allocating a new one. >> * Change the code path for direct buffers in

Re: RFR: 8080272 Refactor I/O stream copying to use InputStream.transferTo/readAllBytes and Files.copy [v9]

2021-02-08 Thread Philippe Marschall
On Mon, 8 Feb 2021 20:58:01 GMT, Andrey Turbanov wrote: >> 8080272 Refactor I/O stream copying to use >> InputStream.transferTo/readAllBytes and Files.copy > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8080272:

Re: RFR: 8080272 Refactor I/O stream copying to use InputStream.transferTo/readAllBytes and Files.copy [v9]

2021-02-08 Thread Andrey Turbanov
> 8080272 Refactor I/O stream copying to use > InputStream.transferTo/readAllBytes and Files.copy Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8080272: Refactor I/O stream copying to use java.io.InputStream.transferTo fix

Re: RFR: 8080272 Refactor I/O stream copying to use InputStream.transferTo/readAllBytes and Files.copy [v7]

2021-02-08 Thread Andrey Turbanov
On Mon, 8 Feb 2021 16:19:17 GMT, Julia Boes wrote: >> Andrey Turbanov has refreshed the contents of this pull request, and >> previous commits have been removed. The incremental views will show >> differences compared to the previous content of the PR. > >

Re: RFR: 8080272 Refactor I/O stream copying to use InputStream.transferTo/readAllBytes and Files.copy [v8]

2021-02-08 Thread Andrey Turbanov
On Mon, 8 Feb 2021 14:38:52 GMT, Weijun Wang wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8080272: Refactor I/O stream copying to use java.io.InputStream.transferTo >> revert changes in Apache Santuario >

Re: RFR: 8080272 Refactor I/O stream copying to use java.io.InputStream.transferTo [v8]

2021-02-08 Thread Andrey Turbanov
On Mon, 8 Feb 2021 14:01:34 GMT, Alan Bateman wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8080272: Refactor I/O stream copying to use java.io.InputStream.transferTo >> revert changes in Apache Santuario >

Re: RFR: 8259267: Refactor LoaderLeak shell test as java test. [v5]

2021-02-08 Thread Ivan Šipka
> Refactor `test/jdk/java/lang/annotation/loaderLeak/LoaderLeak.sh` as java > test. Ivan Šipka has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits: - 8166026: Refactor java/lang shell tests to java - 8166026: Refactor

Re: RFR: 8198540: Dynalink leaks memory when generating type converters [v7]

2021-02-08 Thread Hannes Wallnöfer
On Sun, 7 Feb 2021 15:45:00 GMT, Peter Levart wrote: >> Attila Szegedi has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Rename ClassLoaderRelation to RetentionDirection; it is better >> self-documenting this way. > > I think this looks

Re: RFR: 8261254: Initialize charset mapping data lazily

2021-02-08 Thread Claes Redestad
On Mon, 8 Feb 2021 17:40:00 GMT, Naoto Sato wrote: >> This patch refactor JDK internal charsets to initialize charset mapping data >> lazily when needed via holder classes. This means both a startup improvement >> in some cases, and possible throughput improvements for all DoubleByte-based >>

Integrated: 8261254: Initialize charset mapping data lazily

2021-02-08 Thread Claes Redestad
On Sun, 7 Feb 2021 19:08:18 GMT, Claes Redestad wrote: > This patch refactor JDK internal charsets to initialize charset mapping data > lazily when needed via holder classes. This means both a startup improvement > in some cases, and possible throughput improvements for all DoubleByte-based >

Integrated: 8259074: regex benchmarks and tests

2021-02-08 Thread Martin Buchholz
On Tue, 5 Jan 2021 03:15:56 GMT, Martin Buchholz wrote: > 8259074: regex benchmarks and tests This pull request has now been integrated. Changeset: 351d7888 Author:Martin Buchholz URL: https://git.openjdk.java.net/jdk/commit/351d7888 Stats: 483 lines in 5 files changed: 473 ins;

Re: RFR: 8259074: regex benchmarks and tests [v5]

2021-02-08 Thread Martin Buchholz
On Tue, 2 Feb 2021 13:10:29 GMT, Claes Redestad wrote: >> Martin Buchholz has updated the pull request incrementally with one >> additional commit since the last revision: >> >> fix imports > > Marked as reviewed by redestad (Reviewer). @cl4es Your comment sent me back to jmh re-education

Re: RFR: 8261254: Initialize charset mapping data lazily

2021-02-08 Thread Naoto Sato
On Sun, 7 Feb 2021 19:08:18 GMT, Claes Redestad wrote: > This patch refactor JDK internal charsets to initialize charset mapping data > lazily when needed via holder classes. This means both a startup improvement > in some cases, and possible throughput improvements for all DoubleByte-based >

Re: JDK-6824466 java.lang.reflect.Method should use java.lang.invoke.MethodHandle

2021-02-08 Thread Johannes Kuhn
I now implemented a prototype for JDK-6824466: [1] The goal I set here was to remove the old AccessorGenerator. The good news: - It works - all tier1 tests pass, except one that requires the old implementation. - A lot of code has been removed. And even more could be removed. The bad news:

Re: RFR: 8252971: WindowsFileAttributes does not know about Unix domain sockets [v4]

2021-02-08 Thread Alan Bateman
On Sun, 7 Feb 2021 20:16:08 GMT, Michael McMahon wrote: >> Could I get the following change reviewed please? It fixes a problem (in >> JEP380) on Windows where some file operations on Unix domain sockets were >> not working and led to the feature being disabled on Windows 2019 Server in >>

Re: RFR: JDK-8261237: isClassPathAttributePresent use try with resources with JarFile

2021-02-08 Thread Claes Redestad
On Mon, 8 Feb 2021 14:25:45 GMT, Christoph Langer wrote: >> src/java.base/share/classes/jdk/internal/vm/VMSupport.java line 87: >> >>> 85: * path is not a JAR file or some other error occurs. >>> 86: */ >>> 87: public static boolean isClassPathAttributePresent(String path) { >>

Re: RFR: 8080272 Refactor I/O stream copying to use java.io.InputStream.transferTo [v8]

2021-02-08 Thread Julia Boes
On Mon, 8 Feb 2021 14:40:16 GMT, Weijun Wang wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8080272: Refactor I/O stream copying to use java.io.InputStream.transferTo >> revert changes in Apache Santuario >

Re: RFR: 8261300: jpackage: rewrite while(0)/while(false) to proper blocks [v2]

2021-02-08 Thread Alexey Semenyuk
On Mon, 8 Feb 2021 15:25:02 GMT, Aleksey Shipilev wrote: >> After JDK-8254702, SonarCloud instance complains about blocks like these: >> "Change this loop body so that it can be executed more than once." >> >> int initJvmlLauncherData(JvmlLauncherData* ptr) const { >> // Store path

Re: RFR: 8261298: LinuxPackage.c, getJvmLauncherLibPath RPM->DEB typo

2021-02-08 Thread Alexey Semenyuk
On Mon, 8 Feb 2021 08:49:17 GMT, Aleksey Shipilev wrote: > SonarCloud instance reports as new warning after JDK-8254702: > > This branch can not be reached because the condition duplicates a previous > condition in the same sequence of "if/else if" statements. > > char*

Re: RFR: 8080272 Refactor I/O stream copying to use java.io.InputStream.transferTo [v7]

2021-02-08 Thread Julia Boes
On Mon, 21 Dec 2020 08:19:08 GMT, Andrey Turbanov wrote: >> 8080272 Refactor I/O stream copying to use java.io.InputStream.transferTo > > Andrey Turbanov has refreshed the contents of this pull request, and previous > commits have been removed. The incremental views will show differences >

Re: RFR: 8261300: jpackage: rewrite while(0)/while(false) to proper blocks [v2]

2021-02-08 Thread Andy Herrick
On Mon, 8 Feb 2021 15:25:02 GMT, Aleksey Shipilev wrote: >> After JDK-8254702, SonarCloud instance complains about blocks like these: >> "Change this loop body so that it can be executed more than once." >> >> int initJvmlLauncherData(JvmlLauncherData* ptr) const { >> // Store path

Re: RFR: 8261300: jpackage: rewrite while(0)/while(false) to proper blocks

2021-02-08 Thread Aleksey Shipilev
On Mon, 8 Feb 2021 14:31:32 GMT, Andy Herrick wrote: > There are also instances of "while(0)" (without space) in app.cpp, > tstrings.cpp. and ErrorHandling.h Right. I removed more things in `tstrings.cpp`, but in other places, `while(0)` are in `#define`-s, and that is one place where those

Re: RFR: 8261300: jpackage: rewrite while(0)/while(false) to proper blocks [v2]

2021-02-08 Thread Aleksey Shipilev
> After JDK-8254702, SonarCloud instance complains about blocks like these: > "Change this loop body so that it can be executed more than once." > > int initJvmlLauncherData(JvmlLauncherData* ptr) const { > // Store path to JLI library just behind JvmlLauncherData header. >

Re: RFR: 8260621: Avoid memory leak in ImageBufferCache [v2]

2021-02-08 Thread Jim Laskey
On Wed, 3 Feb 2021 01:29:02 GMT, Bo Zhang wrote: >> Previously, `ImageBufferCache` contains a ThreadLocal field which holds >> strong reference to `ImageBufferCache$BufferReference.class`. When loaded >> from `jrt-fs.jar`, this will keep `JrtFileSystemProvider$JrtFsLoader` >> in memory forever

Re: RFR: 8080272 Refactor I/O stream copying to use java.io.InputStream.transferTo [v8]

2021-02-08 Thread Weijun Wang
On Mon, 21 Dec 2020 09:16:11 GMT, Andrey Turbanov wrote: >> 8080272 Refactor I/O stream copying to use java.io.InputStream.transferTo > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8080272: Refactor I/O stream

Re: RFR: 8261300: jpackage: rewrite while(0)/while(false) to proper blocks

2021-02-08 Thread Andy Herrick
On Mon, 8 Feb 2021 09:17:46 GMT, Aleksey Shipilev wrote: > After JDK-8254702, SonarCloud instance complains about blocks like these: > "Change this loop body so that it can be executed more than once." > > int initJvmlLauncherData(JvmlLauncherData* ptr) const { > // Store path to

Re: RFR: JDK-8261237: isClassPathAttributePresent use try with resources with JarFile

2021-02-08 Thread Christoph Langer
On Mon, 8 Feb 2021 13:41:17 GMT, Alan Bateman wrote: >> Hello, >> Currently in jdk/internal/vm/VMSupport.java , we create a JarFile without a >> related finally clause or try with resources. That should better be changed. >> See also the Sonar check result : >> >>

Re: RFR: 8080272 Refactor I/O stream copying to use java.io.InputStream.transferTo [v8]

2021-02-08 Thread Alan Bateman
On Mon, 21 Dec 2020 09:16:11 GMT, Andrey Turbanov wrote: >> 8080272 Refactor I/O stream copying to use java.io.InputStream.transferTo > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8080272: Refactor I/O stream

Re: RFR: JDK-8261237: isClassPathAttributePresent use try with resources with JarFile

2021-02-08 Thread Alan Bateman
On Fri, 5 Feb 2021 15:23:59 GMT, Matthias Baesken wrote: > Hello, > Currently in jdk/internal/vm/VMSupport.java , we create a JarFile without a > related finally clause or try with resources. That should better be changed. > See also the Sonar check result : > >

Re: RFR: 8261254: Initialize charset mapping data lazily

2021-02-08 Thread Сергей Цыпанов
On Mon, 8 Feb 2021 12:16:23 GMT, Claes Redestad wrote: >> src/jdk.charsets/share/classes/sun/nio/cs/ext/AbstractCharsetProvider.java >> line 75: >> >>> 73: >>> 74: protected AbstractCharsetProvider(String pkgPrefixName) { >>> 75: packagePrefix = pkgPrefixName.concat("."); >> >>

Re: RFR: 8261254: Initialize charset mapping data lazily

2021-02-08 Thread Claes Redestad
On Sun, 7 Feb 2021 19:44:41 GMT, Johannes Kuhn wrote: >> This patch refactor JDK internal charsets to initialize charset mapping data >> lazily when needed via holder classes. This means both a startup improvement >> in some cases, and possible throughput improvements for all DoubleByte-based

Re: RFR: 8261254: Initialize charset mapping data lazily

2021-02-08 Thread Claes Redestad
On Mon, 8 Feb 2021 11:42:23 GMT, Сергей Цыпанов wrote: >> This patch refactor JDK internal charsets to initialize charset mapping data >> lazily when needed via holder classes. This means both a startup improvement >> in some cases, and possible throughput improvements for all

Re: RFR: 8261254: Initialize charset mapping data lazily

2021-02-08 Thread Johannes Kuhn
On Sun, 7 Feb 2021 19:08:18 GMT, Claes Redestad wrote: > This patch refactor JDK internal charsets to initialize charset mapping data > lazily when needed via holder classes. This means both a startup improvement > in some cases, and possible throughput improvements for all DoubleByte-based >

Re: RFR: 8261254: Initialize charset mapping data lazily

2021-02-08 Thread Сергей Цыпанов
On Sun, 7 Feb 2021 19:08:18 GMT, Claes Redestad wrote: > This patch refactor JDK internal charsets to initialize charset mapping data > lazily when needed via holder classes. This means both a startup improvement > in some cases, and possible throughput improvements for all DoubleByte-based >

Re: RFR: 8261254: Initialize charset mapping data lazily

2021-02-08 Thread Claes Redestad
On Mon, 8 Feb 2021 08:36:21 GMT, Alan Bateman wrote: >> This patch refactor JDK internal charsets to initialize charset mapping data >> lazily when needed via holder classes. This means both a startup improvement >> in some cases, and possible throughput improvements for all DoubleByte-based

Re: RFR: JDK-8261237: isClassPathAttributePresent use try with resources with JarFile

2021-02-08 Thread Claes Redestad
On Fri, 5 Feb 2021 15:23:59 GMT, Matthias Baesken wrote: > Hello, > Currently in jdk/internal/vm/VMSupport.java , we create a JarFile without a > related finally clause or try with resources. That should better be changed. > See also the Sonar check result : > >

Re: RFR: JDK-8261237: isClassPathAttributePresent use try with resources with JarFile

2021-02-08 Thread Christoph Langer
On Fri, 5 Feb 2021 15:23:59 GMT, Matthias Baesken wrote: > Hello, > Currently in jdk/internal/vm/VMSupport.java , we create a JarFile without a > related finally clause or try with resources. That should better be changed. > See also the Sonar check result : > >

Re: RFR: 8261299: Use-after-free on failure path in LinuxPackage.c, getJvmLauncherLibPath

2021-02-08 Thread Thomas Stuefe
On Mon, 8 Feb 2021 09:05:23 GMT, Aleksey Shipilev wrote: > SonarCloud instance reports a new warning after JDK-8254702: > "Use of memory after it is freed" > > char* getJvmLauncherLibPath(void) { >... > popenStatus = popenCommand(pkgQueryCmd, pkg->name, findLauncherLib, >

Re: RFR: 8261299: Use-after-free on failure path in LinuxPackage.c, getJvmLauncherLibPath

2021-02-08 Thread Thomas Stuefe
On Mon, 8 Feb 2021 09:05:23 GMT, Aleksey Shipilev wrote: > SonarCloud instance reports a new warning after JDK-8254702: > "Use of memory after it is freed" > > char* getJvmLauncherLibPath(void) { >... > popenStatus = popenCommand(pkgQueryCmd, pkg->name, findLauncherLib, >

RFR: 8261300: jpackage: rewrite while(0)/while(false) to proper blocks

2021-02-08 Thread Aleksey Shipilev
After JDK-8254702, SonarCloud instance complains about blocks like these: "Change this loop body so that it can be executed more than once." int initJvmlLauncherData(JvmlLauncherData* ptr) const { // Store path to JLI library just behind JvmlLauncherData header. char* curPtr

RFR: 8261299: Use-after-free on failure path in LinuxPackage.c, getJvmLauncherLibPath

2021-02-08 Thread Aleksey Shipilev
SonarCloud instance reports a new warning after JDK-8254702: "Use of memory after it is freed" char* getJvmLauncherLibPath(void) { ... popenStatus = popenCommand(pkgQueryCmd, pkg->name, findLauncherLib, ); if

RFR: 8261298: LinuxPackage.c, getJvmLauncherLibPath RPM->DEB typo

2021-02-08 Thread Aleksey Shipilev
SonarCloud instance reports as new warning after JDK-8254702: This branch can not be reached because the condition duplicates a previous condition in the same sequence of "if/else if" statements. char* getJvmLauncherLibPath(void) { ... if (PACKAGE_TYPE_RPM == pkg->type) {

Re: RFR: 8261254: Initialize charset mapping data lazily

2021-02-08 Thread Alan Bateman
On Sun, 7 Feb 2021 19:08:18 GMT, Claes Redestad wrote: > This patch refactor JDK internal charsets to initialize charset mapping data > lazily when needed via holder classes. This means both a startup improvement > in some cases, and possible throughput improvements for all DoubleByte-based >

Re: RFR: JDK-8261237: isClassPathAttributePresent use try with resources with JarFile

2021-02-08 Thread Aleksey Shipilev
On Fri, 5 Feb 2021 15:23:59 GMT, Matthias Baesken wrote: > Hello, > Currently in jdk/internal/vm/VMSupport.java , we create a JarFile without a > related finally clause or try with resources. That should better be changed. > See also the Sonar check result : > >