Skip to content

Commit cd38a91

Browse files
committed
ICU-23321 Rename sets/maps to SETS/MAPS in CharacterProperties (static final convention)
1 parent b97f871 commit cd38a91

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

icu4j/main/core/src/main/java/com/ibm/icu/lang/CharacterProperties.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
public final class CharacterProperties {
2626
private CharacterProperties() {} // all-static
2727

28-
private static final AtomicReferenceArray<UnicodeSet> sets =
28+
private static final AtomicReferenceArray<UnicodeSet> SETS =
2929
new AtomicReferenceArray<>(UProperty.BINARY_LIMIT);
30-
private static final AtomicReferenceArray<CodePointMap> maps =
30+
private static final AtomicReferenceArray<CodePointMap> MAPS =
3131
new AtomicReferenceArray<>(UProperty.INT_LIMIT - UProperty.INT_START);
3232

3333
private static UnicodeSet makeSet(int property) {
@@ -130,12 +130,12 @@ public static final UnicodeSet getBinaryPropertySet(int property) {
130130
throw new IllegalArgumentException(
131131
"" + property + " is not a constant for a UProperty binary property");
132132
}
133-
UnicodeSet set = sets.get(property);
133+
UnicodeSet set = SETS.get(property);
134134
if (set == null) {
135135
set = makeSet(property);
136136
// Race is benign: frozen UnicodeSet is immutable, duplicate computation is harmless
137-
if (!sets.compareAndSet(property, null, set)) {
138-
set = sets.get(property);
137+
if (!SETS.compareAndSet(property, null, set)) {
138+
set = SETS.get(property);
139139
}
140140
}
141141
return set;
@@ -163,12 +163,12 @@ public static final CodePointMap getIntPropertyMap(int property) {
163163
"" + property + " is not a constant for a UProperty int property");
164164
}
165165
int idx = property - UProperty.INT_START;
166-
CodePointMap map = maps.get(idx);
166+
CodePointMap map = MAPS.get(idx);
167167
if (map == null) {
168168
map = makeMap(property);
169169
// Race is benign: CodePointMap is immutable, duplicate computation is harmless
170-
if (!maps.compareAndSet(idx, null, map)) {
171-
map = maps.get(idx);
170+
if (!MAPS.compareAndSet(idx, null, map)) {
171+
map = MAPS.get(idx);
172172
}
173173
}
174174
return map;

0 commit comments

Comments
 (0)