From a9218d23e673f9931463769a5dfa2da3d79375c1 Mon Sep 17 00:00:00 2001 From: Robin Leroy Date: Fri, 31 May 2024 20:06:39 +0200 Subject: [PATCH] no inner loop --- .../org/unicode/text/UCD/TestUnicodeInvariants.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/unicodetools/src/main/java/org/unicode/text/UCD/TestUnicodeInvariants.java b/unicodetools/src/main/java/org/unicode/text/UCD/TestUnicodeInvariants.java index d45f526da..320b7d120 100644 --- a/unicodetools/src/main/java/org/unicode/text/UCD/TestUnicodeInvariants.java +++ b/unicodetools/src/main/java/org/unicode/text/UCD/TestUnicodeInvariants.java @@ -357,19 +357,19 @@ private static void propertywiseLine(ParsePosition pp, String line, String file, } final var iup = IndexUnicodeProperties.make(Settings.latestVersion); final List errorMessageLines = new ArrayList<>(); - properties: for (var p : UcdProperty.values()) { final var property = iup.getProperty(p); - for (String alias : property.getNameAliases()) { - if (excludedProperties.contains(alias)) { - continue properties; - } + if (property.getNameAliases().stream() + .anyMatch(alias -> excludedProperties.contains(alias))) { + continue; } final int first = set.charAt(0); String p1 = property.getValue(first); for (var range : set.ranges()) { for (int c = range.codepoint; c <= range.codepointEnd; ++c) { - if (c == first) { continue; } + if (c == first) { + continue; + } String p2 = property.getValue(c); if (!Objects.equals(p1, p2)) { if (IndexUnicodeProperties.getResolvedDefaultValueType(p)