From 84772c9d1593de6e7b1824b2d937abf994ecd764 Mon Sep 17 00:00:00 2001 From: Theresa Mammarella Date: Thu, 28 Mar 2024 08:19:14 -0400 Subject: [PATCH] Add missing call to initCompressionFlag() Signed-off-by: Theresa Mammarella --- src/java.base/share/classes/java/lang/String.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/java.base/share/classes/java/lang/String.java b/src/java.base/share/classes/java/lang/String.java index 472ca115333..57f76ded084 100644 --- a/src/java.base/share/classes/java/lang/String.java +++ b/src/java.base/share/classes/java/lang/String.java @@ -25,7 +25,7 @@ /* * =========================================================================== - * (c) Copyright IBM Corp. 2021, 2022 All Rights Reserved + * (c) Copyright IBM Corp. 2021, 2024 All Rights Reserved * =========================================================================== */ @@ -5579,6 +5579,9 @@ void getBytes(byte[] dst, int srcPos, int dstBegin, byte coder, int length) { String(byte[] value, byte coder) { this.value = value; this.coder = coder; + if (COMPACT_STRINGS && UTF16 == coder) { + initCompressionFlag(); + } } byte coder() {