From 1bf6bf774dbc8c6c2051963a81100ea1114b497f Mon Sep 17 00:00:00 2001 From: Robin Leroy Date: Wed, 26 Mar 2025 12:36:22 +0100 Subject: [PATCH] ICU-23087 Pass null to applyPropertyAlias for a unary property query --- .../main/core/src/main/java/com/ibm/icu/text/UnicodeSet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/icu4j/main/core/src/main/java/com/ibm/icu/text/UnicodeSet.java b/icu4j/main/core/src/main/java/com/ibm/icu/text/UnicodeSet.java index 0d1f957bfb6..b0da1f337ab 100644 --- a/icu4j/main/core/src/main/java/com/ibm/icu/text/UnicodeSet.java +++ b/icu4j/main/core/src/main/java/com/ibm/icu/text/UnicodeSet.java @@ -3601,7 +3601,7 @@ public class UnicodeSet extends UnicodeFilter implements Iterable, Compa } } - if (valueAlias.length() > 0) { + if (valueAlias != null && !valueAlias.isEmpty()) { p = UCharacter.getPropertyEnum(propertyAlias); // Treat gc as gcm @@ -3835,7 +3835,7 @@ public class UnicodeSet extends UnicodeFilter implements Iterable, Compa else { // Handle case where no '=' is seen, and \N{} propName = pattern.substring(pos, close); - valueName = ""; + valueName = null; // Handle \N{name} if (isName) {