From c06837255a161db18f9dcb55f07f04e6dc1dc680 Mon Sep 17 00:00:00 2001 From: Mark Rotteveel Date: Fri, 27 Oct 2023 17:39:28 +0200 Subject: [PATCH] Post-fix for #770: restore Java 8 compatibility --- src/test/org/firebirdsql/jdbc/field/FBStringFieldTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/org/firebirdsql/jdbc/field/FBStringFieldTest.java b/src/test/org/firebirdsql/jdbc/field/FBStringFieldTest.java index a64381af7..c7408a094 100644 --- a/src/test/org/firebirdsql/jdbc/field/FBStringFieldTest.java +++ b/src/test/org/firebirdsql/jdbc/field/FBStringFieldTest.java @@ -803,7 +803,7 @@ void setString_surrogatePairs_maxLength() throws Exception { assertEquals("UTF-8", encoding.getCharsetName(), "Unexpected charset for field"); // character Smiling Face with Open Mouth; uses surrogate pairs - String surrogatePairsValue = Character.toString(0x1f603); + String surrogatePairsValue = new String(Character.toChars(0x1f603)); assertEquals(2, surrogatePairsValue.length(), "Expected string with 2 characters (surrogate pairs)"); field.setString(surrogatePairsValue); @@ -823,7 +823,7 @@ void getString_surrogatePairs_maxLength() throws Exception { assertEquals("UTF-8", encoding.getCharsetName(), "Unexpected charset for field"); // character Smiling Face with Open Mouth; uses surrogate pairs - String surrogatePairsValue = Character.toString(0x1f603); + String surrogatePairsValue = new String(Character.toChars(0x1f603)); assertEquals(2, surrogatePairsValue.length(), "Expected string with 2 characters (surrogate pairs)"); toReturnStringExpectations(surrogatePairsValue, encoding);