Skip to content

Commit

Permalink
ICU-22769 Rename of the ICU4J data folder to not contain a version (c…
Browse files Browse the repository at this point in the history
…ode)
  • Loading branch information
mihnita committed May 8, 2024
1 parent 9720a21 commit 2962061
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion icu4j/main/core/src/main/java/com/ibm/icu/impl/ICUData.java
Expand Up @@ -33,12 +33,13 @@ public final class ICUData {
* The ICU data package name.
* This is normally the name of the .dat package, and the prefix (plus '/')
* of the package entry names.
* Not used when loading from resources packaged in the .jar.
*/
static final String PACKAGE_NAME = "icudt" + VersionInfo.ICU_DATA_VERSION_PATH;
/**
* The data path to be used with Class.getResourceAsStream().
*/
public static final String ICU_BUNDLE = "data/" + PACKAGE_NAME;
public static final String ICU_BUNDLE = "data/icudata";

/**
* The base name of ICU data to be used with ClassLoader.getResourceAsStream(),
Expand Down
Expand Up @@ -9,6 +9,7 @@

package com.ibm.icu.util;

import com.ibm.icu.impl.ICUData;
import java.util.concurrent.ConcurrentHashMap;

/**
Expand Down Expand Up @@ -230,7 +231,8 @@ public final class VersionInfo implements Comparable<VersionInfo>
public static final VersionInfo ICU_VERSION;

/**
* Data version string for ICU's internal data.
* Data version string for ICU's data file.
* Not used when loading from resources packaged in the .jar.
* Used for appending to data path (e.g. icudt43b)
* @internal
* @deprecated This API is ICU internal only.
Expand Down Expand Up @@ -703,8 +705,8 @@ static String getTZDataVersion() {
if (TZDATA_VERSION == null) {
synchronized (VersionInfo.class) {
if (TZDATA_VERSION == null) {
UResourceBundle tzbundle = UResourceBundle.getBundleInstance("com/ibm/icu/impl/data/icudt"
+ VersionInfo.ICU_DATA_VERSION_PATH, "zoneinfo64");
UResourceBundle tzbundle =
UResourceBundle.getBundleInstance("com/ibm/icu/impl/" + ICUData.ICU_BUNDLE, "zoneinfo64");
TZDATA_VERSION = tzbundle.getString("TZVersion");
}
}
Expand Down

0 comments on commit 2962061

Please sign in to comment.