ICU-22142 Deprecate ICU4C createMetricTon/getMetricTon, ICU4J METRIC_TON

This commit is contained in:
Peter Edberg 2025-04-04 10:49:04 -07:00
parent 770c4b8042
commit e6bd55d12d
2 changed files with 7 additions and 11 deletions

View file

@ -2847,29 +2847,25 @@ class U_I18N_API MeasureUnit: public UObject {
*/
static MeasureUnit getTonne();
#ifndef U_HIDE_DEPRECATED_API
/**
* Returns by pointer, unit of mass: metric-ton
* (renamed to tonne in CLDR 42 / ICU 72).
* Caller owns returned value and must free it.
* Note: In ICU 74 this will be deprecated in favor of
* createTonne(), which is currently draft but will
* become stable in ICU 74, and which uses the preferred naming.
* Also see {@link #getMetricTon()} and {@link #createTonne()}.
* @param status ICU error code.
* @stable ICU 54
* @deprecated ICU 78 use createTonne(UErrorCode &status)
*/
static MeasureUnit *createMetricTon(UErrorCode &status);
/**
* Returns by value, unit of mass: metric-ton
* (renamed to tonne in CLDR 42 / ICU 72).
* Note: In ICU 74 this will be deprecated in favor of
* getTonne(), which is currently draft but will
* become stable in ICU 74, and which uses the preferred naming.
* Also see {@link #createMetricTon()} and {@link #getTonne()}.
* @stable ICU 64
* @deprecated ICU 78 use getTonne()
*/
static MeasureUnit getMetricTon();
#endif /* U_HIDE_DEPRECATED_API */
/**
* Returns by pointer, unit of power: gigawatt.

View file

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