Skip to content

Commit 89fe16e

Browse files
committed
ICU-22142 Deprecate ICU4C createMetricTon/getMetricTon, ICU4J METRIC_TON
1 parent e1f13e1 commit 89fe16e

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

icu4c/source/i18n/unicode/measunit.h

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2847,29 +2847,25 @@ class U_I18N_API MeasureUnit: public UObject {
28472847
*/
28482848
static MeasureUnit getTonne();
28492849

2850+
#ifndef U_HIDE_DEPRECATED_API
28502851
/**
28512852
* Returns by pointer, unit of mass: metric-ton
28522853
* (renamed to tonne in CLDR 42 / ICU 72).
28532854
* Caller owns returned value and must free it.
2854-
* Note: In ICU 74 this will be deprecated in favor of
2855-
* createTonne(), which is currently draft but will
2856-
* become stable in ICU 74, and which uses the preferred naming.
28572855
* Also see {@link #getMetricTon()} and {@link #createTonne()}.
28582856
* @param status ICU error code.
2859-
* @stable ICU 54
2857+
* @deprecated ICU 78 use createTonne(UErrorCode &status)
28602858
*/
28612859
static MeasureUnit *createMetricTon(UErrorCode &status);
28622860

28632861
/**
28642862
* Returns by value, unit of mass: metric-ton
28652863
* (renamed to tonne in CLDR 42 / ICU 72).
2866-
* Note: In ICU 74 this will be deprecated in favor of
2867-
* getTonne(), which is currently draft but will
2868-
* become stable in ICU 74, and which uses the preferred naming.
28692864
* Also see {@link #createMetricTon()} and {@link #getTonne()}.
2870-
* @stable ICU 64
2865+
* @deprecated ICU 78 use getTonne()
28712866
*/
28722867
static MeasureUnit getMetricTon();
2868+
#endif /* U_HIDE_DEPRECATED_API */
28732869

28742870
/**
28752871
* Returns by pointer, unit of power: gigawatt.

icu4j/main/core/src/main/java/com/ibm/icu/util/MeasureUnit.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1776,10 +1776,10 @@ protected synchronized static MeasureUnit addUnit(String type, String unitName,
17761776

17771777
/**
17781778
* Constant for unit of mass: metric-ton (renamed to tonne in CLDR 42 / ICU 72).
1779-
* Note: In ICU 74 this will be deprecated in favor of TONNE, which is currently
1780-
* draft but will become stable in ICU 74, and which uses the preferred naming.
1781-
* @stable ICU 54
1779+
* @internal
1780+
* @deprecated This API is ICU internal only.
17821781
*/
1782+
@Deprecated
17831783
public static final MeasureUnit METRIC_TON = MeasureUnit.internalGetInstance("mass", "tonne");
17841784

17851785
/**

0 commit comments

Comments
 (0)