diff --git a/src/java.base/share/classes/jdk/internal/icu/impl/NormalizerImpl.java b/src/java.base/share/classes/jdk/internal/icu/impl/NormalizerImpl.java index 291653f9995d3..82f294c31cf26 100644 --- a/src/java.base/share/classes/jdk/internal/icu/impl/NormalizerImpl.java +++ b/src/java.base/share/classes/jdk/internal/icu/impl/NormalizerImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -172,7 +172,7 @@ public void append(CharSequence s, int start, int limit, boolean isNFD, start+=Character.charCount(c); if(start>DELTA_SHIFT)-MAX_DELTA-1; + assert((minMaybeNo&7)==0); // 8-aligned for noNoDelta bit fields + centerNoNoDelta=(minMaybeNo>>DELTA_SHIFT)-MAX_DELTA-1; // Read the normTrie. int offset=inIndexes[IX_NORM_TRIE_OFFSET]; @@ -413,8 +415,7 @@ public NormalizerImpl load(ByteBuffer bytes) { nextOffset=inIndexes[IX_SMALL_FCD_OFFSET]; int numChars=(nextOffset-offset)/2; if(numChars!=0) { - maybeYesCompositions=ICUBinary.getString(bytes, numChars, 0); - extraData=maybeYesCompositions.substring((MIN_NORMAL_MAYBE_YES-minMaybeYes)>>OFFSET_SHIFT); + extraData=ICUBinary.getString(bytes, numChars, 0); } // smallFCD: new in formatVersion 2 @@ -437,8 +438,8 @@ public int getNorm16(int c) { return UTF16Plus.isLeadSurrogate(c) ? INERT : normTrie.get(c); } public int getRawNorm16(int c) { return normTrie.get(c); } - public boolean isAlgorithmicNoNo(int norm16) { return limitNoNo<=norm16 && norm16> OFFSET_SHIFT) & 0xff; } - public static int getCCFromYesOrMaybe(int norm16) { + public static int getCCFromYesOrMaybeYes(int norm16) { return norm16>=MIN_NORMAL_MAYBE_YES ? getCCFromNormalYesOrMaybe(norm16) : 0; } - public int getCCFromYesOrMaybeCP(int c) { + public int getCCFromYesOrMaybeYesCP(int c) { if (c < minCompNoMaybeCP) { return 0; } - return getCCFromYesOrMaybe(getNorm16(c)); + return getCCFromYesOrMaybeYes(getNorm16(c)); } /** @@ -492,7 +493,7 @@ public int getFCD16FromNormData(int c) { return norm16|(norm16<<8); } else if(norm16>=minMaybeYes) { return 0; - } else { // isDecompNoAlgorithmic(norm16) + } else if(norm16> OFFSET_SHIFT; @@ -507,7 +508,7 @@ public int getFCD16FromNormData(int c) { return 0; } // c decomposes, get everything from the variable-length extra data - int mapping=norm16>>OFFSET_SHIFT; + int mapping=getData(norm16); int firstUnit=extraData.charAt(mapping); int fcd16=firstUnit>>8; // tccc if((firstUnit&MAPPING_HAS_CCC_LCCC_WORD)!=0) { @@ -516,6 +517,24 @@ public int getFCD16FromNormData(int c) { return fcd16; } + private int getFCD16FromMaybeOrNonZeroCC(int norm16) { + assert norm16 >= minMaybeNo; + if (norm16 >= MIN_NORMAL_MAYBE_YES) { + // combining mark + norm16 = getCCFromNormalYesOrMaybe(norm16); + return norm16 | (norm16<<8); + } else if (norm16 >= minMaybeYes) { + return 0; + } + // c decomposes, get everything from the variable-length extra data + int mapping = getDataForMaybe(norm16); + int firstUnit = extraData.charAt(mapping); + // maybeNo has lccc = 0 + assert (firstUnit & MAPPING_HAS_CCC_LCCC_WORD) == 0 || + (extraData.charAt(mapping - 1) & 0xff00) == 0; + return firstUnit >> 8; // tccc + } + /** * Gets the decomposition for one code point. * @param c code point @@ -523,7 +542,7 @@ public int getFCD16FromNormData(int c) { */ public String getDecomposition(int c) { int norm16; - if(c>OFFSET_SHIFT; + int mapping=getData(norm16); int length=extraData.charAt(mapping++)&MAPPING_LENGTH_MASK; return extraData.substring(mapping, mapping+length); } @@ -603,7 +622,13 @@ public String getDecomposition(int c) { public static final int IX_MIN_NO_NO_EMPTY=17; public static final int IX_MIN_LCCC_CP=18; - public static final int IX_COUNT=20; + + /** Two-way mappings; each starts with a character that combines backward. */ + public static final int IX_MIN_MAYBE_NO=20; + /** Two-way mappings & compositions. */ + public static final int IX_MIN_MAYBE_NO_COMBINES_FWD=21; + + //blic static final int IX_COUNT=22; public static final int MAPPING_HAS_CCC_LCCC_WORD=0x80; public static final int MAPPING_HAS_RAW_MAPPING=0x40; @@ -693,7 +718,7 @@ public int decompose(CharSequence s, int src, int limit, decompose(c, norm16, buffer); } else { if(isDecompYes(norm16)) { - int cc=getCCFromYesOrMaybe(norm16); + int cc=getCCFromYesOrMaybeYes(norm16); if(prevCC<=cc || cc==0) { prevCC=cc; if(cc<=1) { @@ -780,12 +805,12 @@ public boolean compose(CharSequence s, int src, int limit, } // isCompYesAndZeroCC(norm16) is false, that is, norm16>=minNoNo. // The current character is either a "noNo" (has a mapping) - // or a "maybeYes" (combines backward) + // or a "maybeYes" / "maybeNo" (combines backward) // or a "yesYes" with ccc!=0. // It is not a Hangul syllable or Jamo L because those have "yes" properties. // Medium-fast path: Handle cases that do not require full decomposition and recomposition. - if (!isMaybeOrNonZeroCC(norm16)) { // minNoNo <= norm16 < minMaybeYes + if (norm16 < minMaybeNo) { // minNoNo <= norm16 < minMaybeNo if (!doCompose) { return false; } @@ -810,7 +835,7 @@ public boolean compose(CharSequence s, int src, int limit, if (prevBoundary != prevSrc) { buffer.append(s, prevBoundary, prevSrc); } - int mapping = norm16 >> OFFSET_SHIFT; + int mapping = getDataForYesOrNo(norm16); int length = extraData.charAt(mapping++) & MAPPING_LENGTH_MASK; buffer.append(extraData, mapping, mapping + length); prevBoundary = src; @@ -1016,7 +1041,7 @@ public int composeQuickCheck(CharSequence s, int src, int limit, } // isCompYesAndZeroCC(norm16) is false, that is, norm16>=minNoNo. // The current character is either a "noNo" (has a mapping) - // or a "maybeYes" (combines backward) + // or a "maybeYes" / "maybeNo" (combines backward) // or a "yesYes" with ccc!=0. // It is not a Hangul syllable or Jamo L because those have "yes" properties. @@ -1033,8 +1058,9 @@ public int composeQuickCheck(CharSequence s, int src, int limit, } } - if(isMaybeOrNonZeroCC(norm16)) { - int cc=getCCFromYesOrMaybe(norm16); + if (norm16 >= minMaybeNo) { + int fcd16 = getFCD16FromMaybeOrNonZeroCC(norm16); + int cc = (fcd16 >> 8) & 0xff; if (onlyContiguous /* FCC */ && cc != 0 && getTrailCCFromCompYesAndZeroCC(prevNorm16) > cc) { // The [prevBoundary..prevSrc[ character @@ -1054,11 +1080,12 @@ public int composeQuickCheck(CharSequence s, int src, int limit, if (src == limit) { return (src<<1) | qcResult; // "yes" or "maybe" } - int prevCC = cc; + int prevCC = fcd16 & 0xff; c = Character.codePointAt(s, src); norm16 = getNorm16(c); - if (isMaybeOrNonZeroCC(norm16)) { - cc = getCCFromYesOrMaybe(norm16); + if (norm16 >= minMaybeNo) { + fcd16 = getFCD16FromMaybeOrNonZeroCC(norm16); + cc = (fcd16 >> 8) & 0xff; if (!(prevCC <= cc || cc == 0)) { break; } @@ -1244,7 +1271,7 @@ public boolean norm16HasDecompBoundaryBefore(int norm16) { return norm16 <= MIN_NORMAL_MAYBE_YES || norm16 == JAMO_VT; } // c decomposes, get everything from the variable-length extra data - int mapping=norm16>>OFFSET_SHIFT; + int mapping=getDataForYesOrNo(norm16); int firstUnit=extraData.charAt(mapping); // true if leadCC==0 (hasFCDBoundaryBefore()) return (firstUnit&MAPPING_HAS_CCC_LCCC_WORD)==0 || (extraData.charAt(mapping-1)&0xff00)==0; @@ -1263,14 +1290,15 @@ public boolean norm16HasDecompBoundaryAfter(int norm16) { return true; } if (norm16 >= limitNoNo) { - if (isMaybeOrNonZeroCC(norm16)) { + if (isMaybeYesOrNonZeroCC(norm16)) { return norm16 <= MIN_NORMAL_MAYBE_YES || norm16 == JAMO_VT; + } else if (norm16 < minMaybeNo) { + // Maps to an isCompYesAndZeroCC. + return (norm16 & DELTA_TCCC_MASK) <= DELTA_TCCC_1; } - // Maps to an isCompYesAndZeroCC. - return (norm16 & DELTA_TCCC_MASK) <= DELTA_TCCC_1; } // c decomposes, get everything from the variable-length extra data - int mapping=norm16>>OFFSET_SHIFT; + int mapping=getData(norm16); int firstUnit=extraData.charAt(mapping); // decomp after-boundary: same as hasFCDBoundaryAfter(), // fcd16<=1 || trailCC==0 @@ -1293,8 +1321,8 @@ public boolean hasCompBoundaryAfter(int c, boolean onlyContiguous) { return norm16HasCompBoundaryAfter(getNorm16(c), onlyContiguous); } - private boolean isMaybe(int norm16) { return minMaybeYes<=norm16 && norm16<=JAMO_VT; } - private boolean isMaybeOrNonZeroCC(int norm16) { return norm16>=minMaybeYes; } + private boolean isMaybe(int norm16) { return minMaybeNo<=norm16 && norm16<=JAMO_VT; } + private boolean isMaybeYesOrNonZeroCC(int norm16) { return norm16>=minMaybeYes; } private static boolean isInert(int norm16) { return norm16==INERT; } private static boolean isJamoVT(int norm16) { return norm16==JAMO_VT; } private int hangulLVT() { return minYesNoMappingsOnly|HAS_COMP_BOUNDARY_AFTER; } @@ -1307,7 +1335,7 @@ private boolean isHangulLVT(int norm16) { // return norm16>=MIN_YES_YES_WITH_CC || norm16=limitNoNo; } + /** Since formatVersion 5: same as isAlgorithmicNoNo() */ + private boolean isDecompNoAlgorithmic(int norm16) { + return limitNoNo<=norm16 && norm16=MIN_YES_YES_WITH_CC ? getCCFromNormalYesOrMaybe(norm16) : 0; // } private int getCCFromNoNo(int norm16) { - int mapping=norm16>>OFFSET_SHIFT; + int mapping=getDataForYesOrNo(norm16); if((extraData.charAt(mapping)&MAPPING_HAS_CCC_LCCC_WORD)!=0) { return extraData.charAt(mapping-1)&0xff; } else { @@ -1345,7 +1375,7 @@ int getTrailCCFromCompYesAndZeroCC(int norm16) { return 0; // yesYes and Hangul LV have ccc=tccc=0 } else { // For Hangul LVT we harmlessly fetch a firstUnit with tccc=0 here. - return extraData.charAt(norm16>>OFFSET_SHIFT)>>8; // tccc from yesNo + return extraData.charAt(getDataForYesOrNo(norm16))>>8; // tccc from yesNo } } @@ -1354,23 +1384,28 @@ private int mapAlgorithmic(int c, int norm16) { return c+(norm16>>DELTA_SHIFT)-centerNoNoDelta; } - // Requires minYesNo>OFFSET_SHIFT); } + private int getDataForYesOrNo(int norm16) { + return norm16>>OFFSET_SHIFT; + } + private int getDataForMaybe(int norm16) { + return (norm16-minMaybeNo+limitNoNo)>>OFFSET_SHIFT; + } + private int getData(int norm16) { + if(norm16>=minMaybeNo) { + norm16=norm16-minMaybeNo+limitNoNo; + } + return norm16>>OFFSET_SHIFT; + } /** - * @return index into maybeYesCompositions, or -1 + * @return index into extraData, or -1 */ private int getCompositionsListForDecompYes(int norm16) { if(norm16>OFFSET_SHIFT; + // if yesYes: if Jamo L: harmless empty list + return getData(norm16); } } /** @@ -1378,8 +1413,8 @@ private int getCompositionsListForDecompYes(int norm16) { */ private int getCompositionsListForComposite(int norm16) { // A composite has both mapping & compositions list. - int list=((MIN_NORMAL_MAYBE_YES-minMaybeYes)+norm16)>>OFFSET_SHIFT; - int firstUnit=maybeYesCompositions.charAt(list); + int list=getData(norm16); + int firstUnit=extraData.charAt(list); return list+ // mapping in maybeYesCompositions 1+ // +1 to skip the first unit with the mapping length (firstUnit&MAPPING_LENGTH_MASK); // + mapping length @@ -1414,13 +1449,14 @@ private int decomposeShort( private void decompose(int c, int norm16, ReorderingBuffer buffer) { // get the decomposition and the lead and trail cc's if (norm16 >= limitNoNo) { - if (isMaybeOrNonZeroCC(norm16)) { - buffer.append(c, getCCFromYesOrMaybe(norm16)); + if (isMaybeYesOrNonZeroCC(norm16)) { + buffer.append(c, getCCFromYesOrMaybeYes(norm16)); return; + } else if (norm16 < minMaybeNo) { + // Maps to an isCompYesAndZeroCC. + c=mapAlgorithmic(c, norm16); + norm16 = getRawNorm16(c); } - // Maps to an isCompYesAndZeroCC. - c=mapAlgorithmic(c, norm16); - norm16=getRawNorm16(c); } if (norm16 < minYesNo) { // c does not decompose @@ -1430,7 +1466,7 @@ private void decompose(int c, int norm16, ReorderingBuffer buffer) { Hangul.decompose(c, buffer); } else { // c decomposes, get everything from the variable-length extra data - int mapping=norm16>>OFFSET_SHIFT; + int mapping=getData(norm16); int firstUnit=extraData.charAt(mapping); int length=firstUnit&MAPPING_LENGTH_MASK; int leadCC, trailCC; @@ -1469,20 +1505,20 @@ private void decompose(int c, int norm16, ReorderingBuffer buffer) { *

See normalizer2impl.h for a more detailed description * of the compositions list format. */ - private static int combine(String compositions, int list, int trail) { + private int combine(int list, int trail) { int key1, firstUnit; if(trail(firstUnit=compositions.charAt(list))) { + while(key1>(firstUnit=extraData.charAt(list))) { list+=2+(firstUnit&COMP_1_TRIPLE); } if(key1==(firstUnit&COMP_1_TRAIL_MASK)) { if((firstUnit&COMP_1_TRIPLE)!=0) { - return (compositions.charAt(list+1)<<16)|compositions.charAt(list+2); + return (extraData.charAt(list+1)<<16)|extraData.charAt(list+2); } else { - return compositions.charAt(list+1); + return extraData.charAt(list+1); } } } else { @@ -1492,17 +1528,17 @@ private static int combine(String compositions, int list, int trail) { int key2=(trail<(firstUnit=compositions.charAt(list))) { + if(key1>(firstUnit=extraData.charAt(list))) { list+=2+(firstUnit&COMP_1_TRIPLE); } else if(key1==(firstUnit&COMP_1_TRAIL_MASK)) { - if(key2>(secondUnit=compositions.charAt(list+1))) { + if(key2>(secondUnit=extraData.charAt(list+1))) { if((firstUnit&COMP_1_LAST_TUPLE)!=0) { break; } else { list+=3; } } else if(key2==(secondUnit&COMP_2_TRAIL_MASK)) { - return ((secondUnit&~COMP_2_TRAIL_MASK)<<16)|compositions.charAt(list+2); + return ((secondUnit&~COMP_2_TRAIL_MASK)<<16)|extraData.charAt(list+2); } else { break; } @@ -1550,7 +1586,7 @@ private void recompose(ReorderingBuffer buffer, int recomposeStartIndex, c=sb.codePointAt(p); p+=Character.charCount(c); norm16=getNorm16(c); - cc=getCCFromYesOrMaybe(norm16); + cc=getCCFromYesOrMaybeYes(norm16); if( // this character combines backward and isMaybe(norm16) && // we have seen a starter that combines forward and @@ -1591,7 +1627,7 @@ private void recompose(ReorderingBuffer buffer, int recomposeStartIndex, } compositionsList=-1; continue; - } else if((compositeAndFwd=combine(maybeYesCompositions, compositionsList, c))>=0) { + } else if((compositeAndFwd=combine(compositionsList, c))>=0) { // The starter and the combining mark (c) do combine. int composite=compositeAndFwd>>1; @@ -1696,7 +1732,8 @@ private boolean hasCompBoundaryAfter(CharSequence s, int start, int p, boolean o /** For FCC: Given norm16 HAS_COMP_BOUNDARY_AFTER, does it have tccc<=1? */ private boolean isTrailCC01ForCompBoundaryAfter(int norm16) { return isInert(norm16) || (isDecompNoAlgorithmic(norm16) ? - (norm16 & DELTA_TCCC_MASK) <= DELTA_TCCC_1 : extraData.charAt(norm16 >> OFFSET_SHIFT) <= 0x1ff); + (norm16 & DELTA_TCCC_MASK) <= DELTA_TCCC_1 : + extraData.charAt(getDataForYesOrNo(norm16)) <= 0x1ff); } private int findPreviousCompBoundary(CharSequence s, int p, boolean onlyContiguous) { @@ -2184,10 +2221,11 @@ private int getPreviousTrailCC(CharSequence s, int start, int p) { private int minNoNoEmpty; private int limitNoNo; private int centerNoNoDelta; + private int minMaybeNo; + private int minMaybeNoCombinesFwd; private int minMaybeYes; private CodePointTrie.Fast16 normTrie; - private String maybeYesCompositions; - private String extraData; // mappings and/or compositions for yesYes, yesNo & noNo characters + private String extraData; // mappings and/or compositions private byte[] smallFCD; // [0x100] one bit per 32 BMP code points, set if any FCD!=0 } diff --git a/src/java.base/share/classes/jdk/internal/icu/impl/UCharacterProperty.java b/src/java.base/share/classes/jdk/internal/icu/impl/UCharacterProperty.java index 474b169e6e208..f439ae23d0f34 100644 --- a/src/java.base/share/classes/jdk/internal/icu/impl/UCharacterProperty.java +++ b/src/java.base/share/classes/jdk/internal/icu/impl/UCharacterProperty.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -40,6 +40,7 @@ import jdk.internal.icu.lang.UCharacter.NumericType; import jdk.internal.icu.text.UTF16; import jdk.internal.icu.text.UnicodeSet; +import jdk.internal.icu.util.CodePointTrie; import jdk.internal.icu.util.VersionInfo; /** @@ -136,10 +137,8 @@ public int getAdditional(int codepoint, int column) { */ public VersionInfo getAge(int codepoint) { - int version = getAdditional(codepoint, 0) >> AGE_SHIFT_; - return VersionInfo.getInstance( - (version >> FIRST_NIBBLE_SHIFT_) & LAST_NIBBLE_MASK_, - version & LAST_NIBBLE_MASK_, 0, 0); + int version = getAdditional(codepoint, 0) >>> AGE_SHIFT_; + return VersionInfo.getInstance(version >> 2, version & 3, 0, 0); } // int-value and enumerated properties --------------------------------- *** @@ -150,7 +149,11 @@ public int getType(int c) { /* * Map some of the Grapheme Cluster Break values to Hangul Syllable Types. - * Hangul_Syllable_Type is fully redundant with a subset of Grapheme_Cluster_Break. + * Hangul_Syllable_Type used to be fully redundant with a subset of Grapheme_Cluster_Break. + * + * Starting with Unicode 16, this is no longer true for HST=V vs. GCB=V in some cases: + * Some Kirat Rai vowels are given GCB=V for proper grapheme clustering, but + * they are of course not related to Hangul syllables. */ private static final int /* UHangulSyllableType */ gcbToHst[]={ HangulSyllableType.NOT_APPLICABLE, /* U_GCB_OTHER */ @@ -310,11 +313,16 @@ public int digit(int c) { * 0 */ int m_maxJTGValue_; + /** maximum values for other code values */ + int m_maxValuesOther_; + /** * Script_Extensions data */ public char[] m_scriptExtensions_; + CodePointTrie m_blockTrie_; + // private variables ------------------------------------------------- /** @@ -534,12 +542,13 @@ private UCharacterProperty() throws IOException int additionalVectorsOffset = bytes.getInt(); m_additionalColumnsCount_ = bytes.getInt(); int scriptExtensionsOffset = bytes.getInt(); - int reservedOffset7 = bytes.getInt(); - /* reservedOffset8 = */ bytes.getInt(); + int blockTrieOffset = bytes.getInt(); + int reservedOffset8 = bytes.getInt(); /* dataTopOffset = */ bytes.getInt(); m_maxBlockScriptValue_ = bytes.getInt(); m_maxJTGValue_ = bytes.getInt(); - ICUBinary.skipBytes(bytes, (16 - 12) << 2); + m_maxValuesOther_ = bytes.getInt(); + ICUBinary.skipBytes(bytes, (16 - 13) << 2); // read the main properties trie m_trie_ = Trie2_16.createFromSerialized(bytes); @@ -574,19 +583,29 @@ private UCharacterProperty() throws IOException } // Script_Extensions - int numChars = (reservedOffset7 - scriptExtensionsOffset) * 2; + int numChars = (blockTrieOffset - scriptExtensionsOffset) * 2; if(numChars > 0) { m_scriptExtensions_ = new char[numChars]; for(int i = 0; i < numChars; ++i) { m_scriptExtensions_[i] = bytes.getChar(); } } + + // Read the blockTrie. + int partLength = (reservedOffset8 - blockTrieOffset) * 4; + int triePosition = bytes.position(); + m_blockTrie_ = CodePointTrie.fromBinary(null, CodePointTrie.ValueWidth.BITS_16, bytes); + trieLength = bytes.position() - triePosition; + if (trieLength > partLength) { + throw new IOException("uprops.icu: not enough bytes for blockTrie"); + } + ICUBinary.skipBytes(bytes, partLength - trieLength); // skip padding after trie bytes } private static final class IsAcceptable implements ICUBinary.Authenticate { // @Override when we switch to Java 6 public boolean isDataVersionAcceptable(byte version[]) { - return version[0] == 7; + return version[0] == 9; } } diff --git a/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt74b/nfc.nrm b/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt74b/nfc.nrm deleted file mode 100644 index 9228eebbd170e..0000000000000 Binary files a/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt74b/nfc.nrm and /dev/null differ diff --git a/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt74b/nfkc.nrm b/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt74b/nfkc.nrm deleted file mode 100644 index 001a2c5ca7524..0000000000000 Binary files a/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt74b/nfkc.nrm and /dev/null differ diff --git a/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt74b/uprops.icu b/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt74b/uprops.icu deleted file mode 100644 index 2cfd5a784e52d..0000000000000 Binary files a/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt74b/uprops.icu and /dev/null differ diff --git a/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt76b/nfc.nrm b/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt76b/nfc.nrm new file mode 100644 index 0000000000000..2782c84bbcbbb Binary files /dev/null and b/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt76b/nfc.nrm differ diff --git a/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt76b/nfkc.nrm b/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt76b/nfkc.nrm new file mode 100644 index 0000000000000..62a3940a2ae2f Binary files /dev/null and b/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt76b/nfkc.nrm differ diff --git a/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt74b/ubidi.icu b/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt76b/ubidi.icu similarity index 55% rename from src/java.base/share/classes/jdk/internal/icu/impl/data/icudt74b/ubidi.icu rename to src/java.base/share/classes/jdk/internal/icu/impl/data/icudt76b/ubidi.icu index d5c81de1b1948..894255967962d 100644 Binary files a/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt74b/ubidi.icu and b/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt76b/ubidi.icu differ diff --git a/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt76b/uprops.icu b/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt76b/uprops.icu new file mode 100644 index 0000000000000..83fcf68c47921 Binary files /dev/null and b/src/java.base/share/classes/jdk/internal/icu/impl/data/icudt76b/uprops.icu differ diff --git a/src/java.base/share/classes/jdk/internal/icu/util/VersionInfo.java b/src/java.base/share/classes/jdk/internal/icu/util/VersionInfo.java index 12228446e54fd..b7a52b74ae17a 100644 --- a/src/java.base/share/classes/jdk/internal/icu/util/VersionInfo.java +++ b/src/java.base/share/classes/jdk/internal/icu/util/VersionInfo.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,7 +36,7 @@ package jdk.internal.icu.util; -import java.util.HashMap; +import java.util.concurrent.ConcurrentHashMap; /** * Class to store version numbers of the form major.minor.milli.micro. @@ -48,13 +48,13 @@ public final class VersionInfo // public data members ------------------------------------------------- /** - * Data version string for ICU's internal data. - * Used for appending to data path (e.g. icudt43b) + * Data version string for ICU's data file. + * Not used when loading from resources packaged in the .jar. * @internal * @deprecated This API is ICU internal only. */ @Deprecated - public static final String ICU_DATA_VERSION_PATH = "74b"; + public static final String ICU_DATA_VERSION_PATH = "76b"; // public methods ------------------------------------------------------ @@ -171,7 +171,7 @@ public int compareTo(VersionInfo other) /** * Map of singletons */ - private static final HashMap MAP_ = new HashMap<>(); + private static final ConcurrentHashMap MAP_ = new ConcurrentHashMap<>(); /** * Error statement string */