From c81cd956a25af3b062426c3084707acea2b990a5 Mon Sep 17 00:00:00 2001 From: Theresa Mammarella Date: Wed, 27 Mar 2024 15:16:57 -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 22995dc5d58..860f3d9fa0f 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 * =========================================================================== */ @@ -5309,6 +5309,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() {