Re: RFR: 8333833: UUID toString removes the use of ByteArrayLittleEndian [v2]

2024-06-08 Thread Bernd
On Sat, 8 Jun 2024 06:40:39 GMT, Shaojin Wen wrote: >> After PR #16245, C2 optimizes stores into primitive arrays by combining >> values ​​into larger stores. In the UUID.toString method, >> ByteArrayLittleEndian can be removed, making the code more elegant and >> faster. > > Shaojin Wen has

Re: Status of ZIP64 InputStream bug JDK-8298530?

2024-05-10 Thread Bernd Eckenfels
Hello Archie, Archie Cobbs wrote on 09.05.2024 20:09 (GMT +02:00): FWIW when I run the test case in that bug on the latest JDK 23 (jdk-23+21-110-g0a4eeeaa3c6), it does not report any exception. So this bug may have gotten fixed by recent changes and just needs to be closed... ? Interesting

Status of ZIP64 InputStream bug JDK-8298530?

2024-05-09 Thread Bernd Eckenfels
Hello, I remember to have seen a few ZIP64 compatibility bug fixed in the past. But this one here is still open: * [JDK-8298530] ZipInputStream.readEnd fails for certain ZIP64 archives with small files - Java Bug System (openjdk.org) There seem to be unofficial patches. We seem to be bothered by

Re: RFR: 8330998: System.console() writes to stderr when stdout is redirected [v2]

2024-04-29 Thread Bernd
On Mon, 29 Apr 2024 14:56:23 GMT, Jan Lahoda wrote: >> Consider code like: >> >> public class ConsoleTest { >> public static void main(String... args) { >> System.console().printf("Hello!"); >> } >> } >> >> >> When run as: >> >> $ java ConsoleTest.java >/dev/null >> >> >>

Re: RFR: 8329581: Java launcher no longer prints a stack trace

2024-04-23 Thread Bernd
On Tue, 23 Apr 2024 18:21:30 GMT, Sonia Zaldana Calles wrote: > The JNI error message didn’t previously get reported before the regression > was introduced, so I just wanted to make sure we were okay with this. I think such errors have a very high potential to confuse the hell out of the

Usage of iconv()

2024-04-23 Thread Bernd Eckenfels
this particular globe weakness, but I still wonder if that dependency is needed. For some platforms like AIX it even drags on an additional library dependency. (Not to mention different charger tables and especially ugly locale dependencies for containers). Gruß Bernd — https

Re: InetAddress API extension proposal

2024-03-26 Thread Bernd Eckenfels
Would be helpful to point to the posix standard/requirement which mandates this. Do you mean a single Unix api description or a posix command spec? I don’t think I know of any such things. Wikipedia claims A POSIX-conforming variant of inet_aton, the inet_pton() function, supports only the

Re: RFR: 8328812: Update and move siphash license

2024-03-25 Thread Bernd
On Mon, 25 Mar 2024 22:23:03 GMT, Jesper Wilhelmsson wrote: >> The problem is that the project is a joined work and has multiple variants >> of copyrights (see the readme). I don’t think it’s on the safe side to pick >> a single (non recent) copyright - especially if you change attribution

Re: RFR: 8328812: Update and move siphash license

2024-03-25 Thread Bernd
On Mon, 25 Mar 2024 20:34:06 GMT, Kim Barrett wrote: >> The header file contains more claims >> https://github.com/veorq/SipHash/blob/master/halfsiphash.h > > That header only contains a single function declaration for an entry point > into the implementation. > HotSpot doesn't use that

Re: RFR: 8328812: Update and move siphash license

2024-03-25 Thread Bernd
On Mon, 25 Mar 2024 20:07:02 GMT, Kim Barrett wrote: >> src/hotspot/share/legal/siphash.md line 9: >> >>> 7:Copyright (c) 2012-2021 Jean-Philippe Aumasson >>> 8: >>> 9:Copyright (c) 2012-2014 Daniel J. Bernstein >> >> Why would you remove a author or year range? > > To match the

Re: RFR: 8328812: Update and move siphash license

2024-03-24 Thread Bernd
On Fri, 22 Mar 2024 15:18:29 GMT, Jesper Wilhelmsson wrote: > Updated and moved the license file. src/hotspot/share/legal/siphash.md line 9: > 7:Copyright (c) 2012-2021 Jean-Philippe Aumasson > 8: > 9:Copyright (c) 2012-2014 Daniel J. Bernstein Why would you remove a author or

Re: RFR: 8325621: Improve jspawnhelper version checks

2024-03-11 Thread Bernd
On Mon, 11 Mar 2024 17:46:14 GMT, Chad Rakoczy wrote: > Fix for [8325621](https://bugs.openjdk.org/browse/JDK-8325621) > > Updates jspawnhelper to check that JDK version and jspawnhelper version are > the same. Updates test to include check for version. Also tested manually by > replacing

Re: reducing the size of multi-architecture applications

2024-03-07 Thread Bernd Eckenfels
hared libraries, possibly the class data archives, and when it comes to multiple OS there are different classes In the JCL and even templates for JDK resources differ by OS. Some modules are OS Specific (like SunMSCAPI provider for 64Bit Windows) Gruss Bernd — https://bernd.eckenfels.net

Re: RFR: 8325576: java/lang/ProcessHandle/InfoTest.java fails on systems with coreutils with --enable-single-binary [v2]

2024-02-13 Thread Bernd
On Tue, 13 Feb 2024 17:54:43 GMT, Roger Riggs wrote: >> Dan Lutker has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Remove unnecessary var. > > test/lib/jdk/test/lib/Platform.java line 145: > >> 143: } >> 144: >> 145: public

Re: RFR: 7036144: GZIPInputStream readTrailer uses faulty available() test for end-of-stream [v4]

2023-12-19 Thread Bernd
On Sat, 16 Dec 2023 17:48:39 GMT, Archie Cobbs wrote: > If what you're saying is "Previously we were implicitly verifying that the > data reported by `available()` was actually there, and now we're no longer > verifying that" then that's not correct. I mean it verified the non-zero behavior,

Re: RFR: 7036144: GZIPInputStream readTrailer uses faulty available() test for end-of-stream [v4]

2023-12-15 Thread Bernd
On Fri, 15 Dec 2023 21:13:07 GMT, Archie Cobbs wrote: >> `GZIPInputStream`, when looking for a concatenated stream, relies on what >> the underlying `InputStream` says is how many bytes are `available()`. But >> this is inappropriate because `InputStream.available()` is just an estimate >>

Re: RFR: 8321206: Make Locale related system properties `StaticProperty` [v2]

2023-12-09 Thread Bernd
On Fri, 8 Dec 2023 21:11:57 GMT, Naoto Sato wrote: > in recent JDK releases. ok, could be that this has changed before. It does make sense to not allow it if the sequence of initialisation can’t be guaranteed. - PR Comment:

Re: RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted [v5]

2023-12-09 Thread Bernd
On Sat, 9 Dec 2023 12:09:37 GMT, Markus KARG wrote: >> @mkarg I guess the method can only be implemented by subclasses residing in >> the same package with `OutputStream`, right? >> >> @AlanBateman fixed > > @stsypanov Yes but still it is just weird to ask any output stream if *it* is >

Re: RFR: 8321206: Make Locale related system properties `StaticProperty` [v2]

2023-12-08 Thread Bernd
On Wed, 6 Dec 2023 20:55:48 GMT, Naoto Sato wrote: >> Currently, Locale-related system properties, such as `user.language` or >> `user.country`, are initialized when the `Locale` class is loaded. Making >> them static properties is safer than relying on the `Locale` class loading >> timing,

Re: RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted [v2]

2023-12-01 Thread Bernd
On Fri, 1 Dec 2023 14:05:37 GMT, Bernd wrote: >> Did you review if all Java.* streams are safe? >> >> There are a few stream adapters in sun.nio.ch, which would benefit this >> optimization too, unfortunately they wrap the arrays with ByteBuffer.wrap, I >

Re: RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted [v2]

2023-12-01 Thread Bernd
On Thu, 30 Nov 2023 09:36:01 GMT, Bernd wrote: >> Sergey Tsypanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8320971: Trust any OutputStream from java.* > > Did you review if all Java.* streams are saf

Re: RFR: 8320971: Use BufferedInputStream.buf directly when param of implTransferTo() is trusted [v2]

2023-11-30 Thread Bernd
On Thu, 30 Nov 2023 08:58:18 GMT, Sergey Tsypanov wrote: >> It looks like we can skip copying of `byte[]` in >> `BufferedInputStream.implTransferTo()` for `OutputStreams` residing in >> `java.io`. >> >> See comment by @vlsi in >>

Re: RFR: JDK-8319626: Override toString() for ZipFile [v4]

2023-11-28 Thread Bernd
On Wed, 15 Nov 2023 18:30:27 GMT, Justin Lu wrote: >> src/java.base/share/classes/java/util/zip/ZipFile.java line 498: >> >>> 496: */ >>> 497: @Override >>> 498: public String toString() { >> >> I don't think the file name on its own is very helpful as it may not be >> unique or

Re: RFR: JDK-8319626: Override toString() for ZipFile [v2]

2023-11-16 Thread Bernd
On Wed, 15 Nov 2023 18:33:47 GMT, Justin Lu wrote: >> Please review this PR and [CSR](https://bugs.openjdk.org/browse/JDK-8319982) >> which overrides and provides an implementation of `toString()` in >> _java.util.zip.ZipFile_ (and by extension, _java.util.jar.JarFile_). >> >> This change is

Re: Adding appendHex method to StringBuilder

2023-09-30 Thread Bernd
Or maybe make it more generic and allow to specify the base as well, that’s more along the line of existing toString() methods of numbers.besides convinience, I wonder if it would actually improve performance, how good is the JIT and EA in that case, did you run some

Re: RFR: JDK-8314272: Improve java.util.prefs.BackingStoreException: Couldn't get file lock.

2023-08-24 Thread Bernd
Hello,I don’t really understand this discussion,is the normal IO and NIO api not already interpreting error codes? (I am quite sure I often see nationalized error messages in

Re: RFR: 6478546: FileInputStream.read() throws OutOfMemoryError when there is plenty available

2023-07-24 Thread Bernd
If you return the short buffer (on IOException), does it need to cache the pending exception or can you just rely on the next read hitting that underlying exception again? (Is there an actual guarantee somewhere that the read position is not altered on IOExceptions or

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-17 Thread Bernd
On Wed, 17 May 2023 12:40:58 GMT, Volker Simonis wrote: > If we do a short read we will work with corrupted `ChildStuff` and > `SpawnInfo` structures. i would agree failing after readFully returns short reads is fine. It won’t stop the method from retrying/completing endlessly in a

Re: RFR: 8307990: jspawnhelper must close its writing side of a pipe before reading from it

2023-05-15 Thread Bernd
On Fri, 12 May 2023 15:24:19 GMT, Volker Simonis wrote: > Since JDK13, executing commands in a sub-process defaults to the so called > `POSIX_SPAWN` launching mechanism (i.e. > `-Djdk.lang.Process.launchMechanism=POSIX_SPAWN`) on Linux. This works by > using `posix_spawn(3)` to firstly start

Re: There is unnecessary resource consumption in `SecureRandom.getInstance()`.

2023-04-28 Thread Bernd
Good finding, but just a related comment: it has been customary to request sha1prng, but that practice should be re-evaluated since all new RNG mode features (including the parameters) are absent in that implementation amd it might sooner or later create compliance issues

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

2023-04-12 Thread Bernd
While we are at it, is Locale.ROOT character types guaranteed to only touch ASCII for case conversion, or could it use latin1 ranges, anyway? (Especially if we think compact strings). How about unassigned or illegal Code units?GrussBernd-- http://bernd.eckenfels.net

Re: RFR: 8304915: Create jdk.internal.util.Architecture enum and apply [v4]

2023-04-05 Thread Bernd
On Wed, 5 Apr 2023 19:20:08 GMT, Roger Riggs wrote: >> Define an internal jdk.internal.util.Architecture enumeration and static >> methods to replace uses of the system property `os.arch`. >> The enumeration values are defined to match those used in the build. >> The initial values are: `X64,

Re: The non-deterministic iteration order of Immutable Collections

2023-03-26 Thread Bernd
If you need order using List instead of Set/Map is perfectly fine decision of your students. It’s good if they learn that early. :) -- http://bernd.eckenfels.net  Von: core-libs-dev im Auftrag von Remi Forax Gesendet: Sonntag, März 26, 2023 1:42 PMAn: Jens

Re: RFR: 8300819: -Dfile.encoding=Cp943C option does not work as expected since jdk18 [v2]

2023-01-22 Thread Bernd
The alternative is to specify the charset you want to use in code explicitely and no longer rely on a platform encoding since it made all kinds of problems for being configurable and therefore intentionally removed.GrussBernd-- http://bernd.eckenfels.net  Von:

Re: RFR: 8292698: Improve performance of DataInputStream [v3]

2022-09-14 Thread Bernd
On Wed, 14 Sep 2022 07:33:32 GMT, Сергей Цыпанов wrote: > > Does that mean there is no explicit test for DataInputStream endianess > > @ecki I think this is not strictly necessary as order of bytes is explicitly > specified in JavaDoc of `DataInput` implemented by `DataInputStream` Hm, maybe

Re: RFR: 8292698: Improve performance of DataInputStream [v3]

2022-09-13 Thread Bernd
On Thu, 25 Aug 2022 09:25:55 GMT, Alan Bateman wrote: > > What is wrong with the change? > > You'll need parentheses to make that work, changing it to use '|' would work > too. Does that mean there is no explicit test for DataInputStream endianess (if only accidential tests checking for

Re: RFR: 8293197: Avoid double racy reads from non-volatile fields in SharedSecrets

2022-09-01 Thread Bernd Eckenfels
BTW, after then ensures it looks like a good candidate for a system-assert for not-null for all of those fields, right? Gruss Bernd -- http://bernd.eckenfels.net Von: core-libs-dev im Auftrag von Andrey Turbanov Gesendet: Thursday, September 1, 2022 8:24:58 AM

Re: RFR: 8290316: Ensure that all directory streams are closed in java.base [v2]

2022-07-15 Thread Bernd
On Fri, 15 Jul 2022 19:33:56 GMT, Ryan Ernst wrote: >> This commit guards uses of Files methods returning path streams in >> java.base to use try-with-resources. > > Ryan Ernst has updated the pull request incrementally with one additional > commit since the last revision: > > address

Re: Case Insensitive DateFormatSymbols for parsing

2022-07-15 Thread Bernd Eckenfels
Hello Roger, Thanks for the Tipp, that’s indeed a good reason why it’s not needed in the legacy SDF API. Gruss Bernd -- http://bernd.eckenfels.net Von: core-libs-dev im Auftrag von Roger Riggs Gesendet: Friday, July 15, 2022 4:14:16 PM An: core-libs-dev

Case Insensitive DateFormatSymbols for parsing

2022-07-15 Thread Bernd Eckenfels
of names like “June,june,JUNE” or have it allow a special case insensitive configuration option. (The list would also allow custom short forms like “ja” “fe” but not “ju”’ Am I missing something? Gruss Bernd -- http://bernd.eckenfels.net

XMLOutputFactory REUSE_INSTANCE property defaults to true

2022-07-14 Thread Bernd Eckenfels
to request the default impl unless you define global config or system property (and this also required the impl class name so you can as well create a instance reflectively). Gruss Bernd -- http://bernd.eckenfels.net

Re: ArrayList grow method optimization and documentation improvement

2022-07-10 Thread Bernd Eckenfels
I think it means for the zero case it should not use the else part if it has not the default sizing, since somebody might have created it with a specific size. Not sure if it matters much either way. -- http://bernd.eckenfels.net Von: core-libs-dev im Auftrag

Re: RFR: 8289834: Add SBCS and DBCS Only EBCDIC charsets

2022-07-08 Thread Bernd Eckenfels
for charset if they are not part of a platform module (optimized string access)? Gruss Bernd -- http://bernd.eckenfels.net Von: core-libs-dev im Auftrag von Alan Bateman Gesendet: Thursday, July 7, 2022 11:50:39 AM An: build-...@openjdk.org ; core-libs-dev

Re: Inconsistencies in the return value (type) of string functions toLower() and toUpper().

2022-06-19 Thread Bernd Eckenfels
instance if not needed, this also applies to replace or escape or similar functions - just don’t rely on it). Gruss Bernd -- https://urldefense.com/v3/__http://bernd.eckenfels.net__;!!ACWV5N9M2RV99hQ!OCDLUrMtQ8iDuN5ZBlmPgMeJIq1GGLAOuq8CauKNxaqHh-RiIaLCGL-ScrHHeUpLQyeWzm4wj0SMmsGK9Lhbcm5T1Q