From f843aff9d268559f5c9fda361a471aaa1eca68cf Mon Sep 17 00:00:00 2001 From: Shane Carr Date: Wed, 20 Mar 2019 17:24:11 -0700 Subject: [PATCH 1/7] ICU-20507 Adding virtual destructor to PathFilter --- icu4c/source/tools/genrb/filterrb.cpp | 3 +++ icu4c/source/tools/genrb/filterrb.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/icu4c/source/tools/genrb/filterrb.cpp b/icu4c/source/tools/genrb/filterrb.cpp index f0dbebc0b7..d62d185d77 100644 --- a/icu4c/source/tools/genrb/filterrb.cpp +++ b/icu4c/source/tools/genrb/filterrb.cpp @@ -63,6 +63,9 @@ std::ostream& operator<<(std::ostream& out, const ResKeyPath& value) { } +PathFilter::~PathFilter() = default; + + void SimpleRuleBasedPathFilter::addRule(const std::string& ruleLine, UErrorCode& status) { if (ruleLine.empty()) { std::cerr << "genrb error: empty filter rules are not allowed" << std::endl; diff --git a/icu4c/source/tools/genrb/filterrb.h b/icu4c/source/tools/genrb/filterrb.h index ce9c1c2d10..cf54766041 100644 --- a/icu4c/source/tools/genrb/filterrb.h +++ b/icu4c/source/tools/genrb/filterrb.h @@ -51,6 +51,8 @@ public: static const char* kEInclusionNames[]; + virtual ~PathFilter(); + /** * Returns an EInclusion on whether or not the given path should be included. * From b596462d5acc55d70d3eb33b2f7067d3493a9450 Mon Sep 17 00:00:00 2001 From: Shane Carr Date: Fri, 22 Mar 2019 13:58:36 -0700 Subject: [PATCH 2/7] ICU-20508 Fixing -Wextra-semi in library code. --- icu4c/source/common/cmemory.h | 2 +- icu4c/source/common/dictbe.cpp | 10 +++++----- icu4c/source/common/dictionarydata.h | 2 +- icu4c/source/common/rbbi.cpp | 2 +- icu4c/source/common/rbbi_cache.h | 4 ++-- icu4c/source/common/rbbiscan.h | 2 +- icu4c/source/common/umutex.h | 4 ++-- icu4c/source/common/unifiedcache.h | 2 +- icu4c/source/i18n/csdetect.cpp | 4 ++-- icu4c/source/i18n/number_decimalquantity.h | 2 +- icu4c/source/i18n/number_patternstring.h | 2 +- icu4c/source/i18n/numparse_types.h | 2 +- icu4c/source/i18n/scriptset.h | 2 +- icu4c/source/i18n/tzgnames.h | 2 +- icu4c/source/i18n/tznames.cpp | 2 +- icu4c/source/i18n/unicode/alphaindex.h | 2 +- icu4c/source/i18n/unicode/dtitvfmt.h | 2 +- icu4c/source/i18n/unicode/formattedvalue.h | 8 ++++---- icu4c/source/i18n/unicode/listformatter.h | 2 +- icu4c/source/i18n/unicode/numberformatter.h | 2 +- icu4c/source/i18n/unicode/numberrangeformatter.h | 2 +- icu4c/source/i18n/unicode/reldatefmt.h | 2 +- 22 files changed, 32 insertions(+), 32 deletions(-) diff --git a/icu4c/source/common/cmemory.h b/icu4c/source/common/cmemory.h index f121bcb8f1..f19715caf4 100644 --- a/icu4c/source/common/cmemory.h +++ b/icu4c/source/common/cmemory.h @@ -298,7 +298,7 @@ public: */ MaybeStackArray(int32_t newCapacity) : MaybeStackArray() { if (capacity < newCapacity) { resize(newCapacity); } - }; + } /** * Destructor deletes the array (if owned). */ diff --git a/icu4c/source/common/dictbe.cpp b/icu4c/source/common/dictbe.cpp index 0c2612ad3c..c769138ae4 100644 --- a/icu4c/source/common/dictbe.cpp +++ b/icu4c/source/common/dictbe.cpp @@ -103,8 +103,8 @@ private: int32_t cpLengths[POSSIBLE_WORD_LIST_MAX]; // Word Lengths, in code points. public: - PossibleWord() : count(0), prefix(0), offset(-1), mark(0), current(0) {}; - ~PossibleWord() {}; + PossibleWord() : count(0), prefix(0), offset(-1), mark(0), current(0) {} + ~PossibleWord() {} // Fill the list of candidates if needed, select the longest, and return the number found int32_t candidates( UText *text, DictionaryMatcher *dict, int32_t rangeEnd ); @@ -118,13 +118,13 @@ public: // Return the longest prefix this candidate location shares with a dictionary word // Return value is in code points. - int32_t longestPrefix() { return prefix; }; + int32_t longestPrefix() { return prefix; } // Mark the current candidate as the one we like - void markCurrent() { mark = current; }; + void markCurrent() { mark = current; } // Get length in code points of the marked word. - int32_t markedCPLength() { return cpLengths[mark]; }; + int32_t markedCPLength() { return cpLengths[mark]; } }; diff --git a/icu4c/source/common/dictionarydata.h b/icu4c/source/common/dictionarydata.h index 73b7d6753b..0d303d9a8d 100644 --- a/icu4c/source/common/dictionarydata.h +++ b/icu4c/source/common/dictionarydata.h @@ -68,7 +68,7 @@ public: */ class U_COMMON_API DictionaryMatcher : public UMemory { public: - DictionaryMatcher() {}; + DictionaryMatcher() {} virtual ~DictionaryMatcher(); // this should emulate CompactTrieDictionary::matches() /* @param text The text in which to look for matching words. Matching begins diff --git a/icu4c/source/common/rbbi.cpp b/icu4c/source/common/rbbi.cpp index 41490250b0..3c2f7203e3 100644 --- a/icu4c/source/common/rbbi.cpp +++ b/icu4c/source/common/rbbi.cpp @@ -720,7 +720,7 @@ struct LookAheadResults { int32_t fPositions[8]; int16_t fKeys[8]; - LookAheadResults() : fUsedSlotLimit(0), fPositions(), fKeys() {}; + LookAheadResults() : fUsedSlotLimit(0), fPositions(), fKeys() {} int32_t getPosition(int16_t key) { for (int32_t i=0; ifPosition = fBoundaries[fBufIdx]; fBI->fRuleStatusIndex = fStatuses[fBufIdx]; } - }; + } void nextOL(); @@ -178,7 +178,7 @@ class RuleBasedBreakIterator::BreakCache: public UMemory { void dumpCache(); private: - static inline int32_t modChunkSize(int index) { return index & (CACHE_SIZE - 1); }; + static inline int32_t modChunkSize(int index) { return index & (CACHE_SIZE - 1); } static constexpr int32_t CACHE_SIZE = 128; static_assert((CACHE_SIZE & (CACHE_SIZE-1)) == 0, "CACHE_SIZE must be power of two."); diff --git a/icu4c/source/common/rbbiscan.h b/icu4c/source/common/rbbiscan.h index 8bec8234e5..c51b4cf2a6 100644 --- a/icu4c/source/common/rbbiscan.h +++ b/icu4c/source/common/rbbiscan.h @@ -54,7 +54,7 @@ public: struct RBBIRuleChar { UChar32 fChar; UBool fEscaped; - RBBIRuleChar() : fChar(0), fEscaped(FALSE) {}; + RBBIRuleChar() : fChar(0), fEscaped(FALSE) {} }; RBBIRuleScanner(RBBIRuleBuilder *rb); diff --git a/icu4c/source/common/umutex.h b/icu4c/source/common/umutex.h index 7858b89378..d0a7e7afc5 100755 --- a/icu4c/source/common/umutex.h +++ b/icu4c/source/common/umutex.h @@ -95,8 +95,8 @@ inline int32_t umtx_atomic_dec(u_atomic_int32_t *var) { struct UInitOnce { u_atomic_int32_t fState; UErrorCode fErrCode; - void reset() {fState = 0;}; - UBool isReset() {return umtx_loadAcquire(fState) == 0;}; + void reset() {fState = 0;} + UBool isReset() {return umtx_loadAcquire(fState) == 0;} // Note: isReset() is used by service registration code. // Thread safety of this usage needs review. }; diff --git a/icu4c/source/common/unifiedcache.h b/icu4c/source/common/unifiedcache.h index 4c9992be25..d6c9945126 100644 --- a/icu4c/source/common/unifiedcache.h +++ b/icu4c/source/common/unifiedcache.h @@ -137,7 +137,7 @@ class LocaleCacheKey : public CacheKey { protected: Locale fLoc; public: - LocaleCacheKey(const Locale &loc) : fLoc(loc) {}; + LocaleCacheKey(const Locale &loc) : fLoc(loc) {} LocaleCacheKey(const LocaleCacheKey &other) : CacheKey(other), fLoc(other.fLoc) { } virtual ~LocaleCacheKey() { } diff --git a/icu4c/source/i18n/csdetect.cpp b/icu4c/source/i18n/csdetect.cpp index 36552c4b76..2436760a9b 100644 --- a/icu4c/source/i18n/csdetect.cpp +++ b/icu4c/source/i18n/csdetect.cpp @@ -36,9 +36,9 @@ U_NAMESPACE_BEGIN struct CSRecognizerInfo : public UMemory { CSRecognizerInfo(CharsetRecognizer *recognizer, UBool isDefaultEnabled) - : recognizer(recognizer), isDefaultEnabled(isDefaultEnabled) {}; + : recognizer(recognizer), isDefaultEnabled(isDefaultEnabled) {} - ~CSRecognizerInfo() {delete recognizer;}; + ~CSRecognizerInfo() {delete recognizer;} CharsetRecognizer *recognizer; UBool isDefaultEnabled; diff --git a/icu4c/source/i18n/number_decimalquantity.h b/icu4c/source/i18n/number_decimalquantity.h index 13613cf569..06cc836c77 100644 --- a/icu4c/source/i18n/number_decimalquantity.h +++ b/icu4c/source/i18n/number_decimalquantity.h @@ -275,7 +275,7 @@ class U_I18N_API DecimalQuantity : public IFixedDecimal, public UMemory { inline bool isUsingBytes() { return usingBytes; } /** Visible for testing */ - inline bool isExplicitExactDouble() { return explicitExactDouble; }; + inline bool isExplicitExactDouble() { return explicitExactDouble; } bool operator==(const DecimalQuantity& other) const; diff --git a/icu4c/source/i18n/number_patternstring.h b/icu4c/source/i18n/number_patternstring.h index 387f41bfd1..0c908679f3 100644 --- a/icu4c/source/i18n/number_patternstring.h +++ b/icu4c/source/i18n/number_patternstring.h @@ -98,7 +98,7 @@ struct U_I18N_API ParsedPatternInfo : public AffixPatternProvider, public UMemor int32_t offset = 0; explicit ParserState(const UnicodeString& _pattern) - : pattern(_pattern) {}; + : pattern(_pattern) {} ParserState& operator=(ParserState&& src) U_NOEXCEPT { // Leave pattern reference alone; it will continue to point to the same place in memory, diff --git a/icu4c/source/i18n/numparse_types.h b/icu4c/source/i18n/numparse_types.h index 0fd70faca9..f837d8d279 100644 --- a/icu4c/source/i18n/numparse_types.h +++ b/icu4c/source/i18n/numparse_types.h @@ -347,7 +347,7 @@ class U_I18N_API NumberParseMatcher { */ virtual void postProcess(ParsedNumber&) const { // Default implementation: no-op - }; + } // String for debugging virtual UnicodeString toString() const = 0; diff --git a/icu4c/source/i18n/scriptset.h b/icu4c/source/i18n/scriptset.h index 385c3e3e53..99a71ec803 100644 --- a/icu4c/source/i18n/scriptset.h +++ b/icu4c/source/i18n/scriptset.h @@ -40,7 +40,7 @@ class U_I18N_API ScriptSet: public UMemory { ~ScriptSet(); UBool operator == (const ScriptSet &other) const; - UBool operator != (const ScriptSet &other) const {return !(*this == other);}; + UBool operator != (const ScriptSet &other) const {return !(*this == other);} ScriptSet & operator = (const ScriptSet &other); UBool test(UScriptCode script, UErrorCode &status) const; diff --git a/icu4c/source/i18n/tzgnames.h b/icu4c/source/i18n/tzgnames.h index 2bd76135d8..71d9d84dc0 100644 --- a/icu4c/source/i18n/tzgnames.h +++ b/icu4c/source/i18n/tzgnames.h @@ -46,7 +46,7 @@ public: static TimeZoneGenericNames* createInstance(const Locale& locale, UErrorCode& status); virtual UBool operator==(const TimeZoneGenericNames& other) const; - virtual UBool operator!=(const TimeZoneGenericNames& other) const {return !operator==(other);}; + virtual UBool operator!=(const TimeZoneGenericNames& other) const {return !operator==(other);} virtual TimeZoneGenericNames* clone() const; UnicodeString& getDisplayName(const TimeZone& tz, UTimeZoneGenericNameType type, diff --git a/icu4c/source/i18n/tznames.cpp b/icu4c/source/i18n/tznames.cpp index 36d27ca699..acd6aecdc0 100644 --- a/icu4c/source/i18n/tznames.cpp +++ b/icu4c/source/i18n/tznames.cpp @@ -108,7 +108,7 @@ public: virtual ~TimeZoneNamesDelegate(); virtual UBool operator==(const TimeZoneNames& other) const; - virtual UBool operator!=(const TimeZoneNames& other) const {return !operator==(other);}; + virtual UBool operator!=(const TimeZoneNames& other) const {return !operator==(other);} virtual TimeZoneNames* clone() const; StringEnumeration* getAvailableMetaZoneIDs(UErrorCode& status) const; diff --git a/icu4c/source/i18n/unicode/alphaindex.h b/icu4c/source/i18n/unicode/alphaindex.h index 1c50ba217f..91524a1ae5 100644 --- a/icu4c/source/i18n/unicode/alphaindex.h +++ b/icu4c/source/i18n/unicode/alphaindex.h @@ -651,7 +651,7 @@ private: /** * No assignment. */ - AlphabeticIndex &operator =(const AlphabeticIndex & /*other*/) { return *this;}; + AlphabeticIndex &operator =(const AlphabeticIndex & /*other*/) { return *this;} /** * No Equality operators. diff --git a/icu4c/source/i18n/unicode/dtitvfmt.h b/icu4c/source/i18n/unicode/dtitvfmt.h index d4b9f93657..42d77d041f 100644 --- a/icu4c/source/i18n/unicode/dtitvfmt.h +++ b/icu4c/source/i18n/unicode/dtitvfmt.h @@ -60,7 +60,7 @@ class U_I18N_API FormattedDateInterval : public UMemory, public FormattedValue { * Default constructor; makes an empty FormattedDateInterval. * @draft ICU 64 */ - FormattedDateInterval() : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {}; + FormattedDateInterval() : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {} /** * Move constructor: Leaves the source FormattedDateInterval in an undefined state. diff --git a/icu4c/source/i18n/unicode/formattedvalue.h b/icu4c/source/i18n/unicode/formattedvalue.h index ce59335e5f..60f97edd4b 100644 --- a/icu4c/source/i18n/unicode/formattedvalue.h +++ b/icu4c/source/i18n/unicode/formattedvalue.h @@ -122,7 +122,7 @@ class U_I18N_API ConstrainedFieldPosition : public UMemory { */ inline int32_t getCategory() const { return fCategory; - }; + } /** * Gets the field for the current position. @@ -135,7 +135,7 @@ class U_I18N_API ConstrainedFieldPosition : public UMemory { */ inline int32_t getField() const { return fField; - }; + } /** * Gets the INCLUSIVE start index for the current position. @@ -147,7 +147,7 @@ class U_I18N_API ConstrainedFieldPosition : public UMemory { */ inline int32_t getStart() const { return fStart; - }; + } /** * Gets the EXCLUSIVE end index stored for the current position. @@ -159,7 +159,7 @@ class U_I18N_API ConstrainedFieldPosition : public UMemory { */ inline int32_t getLimit() const { return fLimit; - }; + } //////////////////////////////////////////////////////////////////// //// The following methods are for FormattedValue implementers; //// diff --git a/icu4c/source/i18n/unicode/listformatter.h b/icu4c/source/i18n/unicode/listformatter.h index 121dd192ce..9ce8ec8617 100644 --- a/icu4c/source/i18n/unicode/listformatter.h +++ b/icu4c/source/i18n/unicode/listformatter.h @@ -85,7 +85,7 @@ class U_I18N_API FormattedList : public UMemory, public FormattedValue { * Default constructor; makes an empty FormattedList. * @draft ICU 64 */ - FormattedList() : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {}; + FormattedList() : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {} /** * Move constructor: Leaves the source FormattedList in an undefined state. diff --git a/icu4c/source/i18n/unicode/numberformatter.h b/icu4c/source/i18n/unicode/numberformatter.h index 4fd6830518..72f474886a 100644 --- a/icu4c/source/i18n/unicode/numberformatter.h +++ b/icu4c/source/i18n/unicode/numberformatter.h @@ -2411,7 +2411,7 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue { * @draft ICU 64 */ FormattedNumber() - : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {}; + : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {} /** * Move constructor: Leaves the source FormattedNumber in an undefined state. diff --git a/icu4c/source/i18n/unicode/numberrangeformatter.h b/icu4c/source/i18n/unicode/numberrangeformatter.h index 4a386b8039..a67ee72666 100644 --- a/icu4c/source/i18n/unicode/numberrangeformatter.h +++ b/icu4c/source/i18n/unicode/numberrangeformatter.h @@ -481,7 +481,7 @@ class U_I18N_API NumberRangeFormatterSettings { } fMacros.copyErrorTo(outErrorCode); return U_FAILURE(outErrorCode); - }; + } // NOTE: Uses default copy and move constructors. diff --git a/icu4c/source/i18n/unicode/reldatefmt.h b/icu4c/source/i18n/unicode/reldatefmt.h index 84d7c0a34d..32344cd5f1 100644 --- a/icu4c/source/i18n/unicode/reldatefmt.h +++ b/icu4c/source/i18n/unicode/reldatefmt.h @@ -264,7 +264,7 @@ class U_I18N_API FormattedRelativeDateTime : public UMemory, public FormattedVal * Default constructor; makes an empty FormattedRelativeDateTime. * @draft ICU 64 */ - FormattedRelativeDateTime() : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {}; + FormattedRelativeDateTime() : fData(nullptr), fErrorCode(U_INVALID_STATE_ERROR) {} /** * Move constructor: Leaves the source FormattedRelativeDateTime in an undefined state. From b5ad35dda8089d798f05508bf7f17a3049e9eca0 Mon Sep 17 00:00:00 2001 From: Jeff Genovy <29107334+jefgen@users.noreply.github.com> Date: Fri, 22 Mar 2019 17:43:28 -0700 Subject: [PATCH 3/7] ICU-20516 Fix MSVC Warning C4003: not enough arguments for function-like macro invocation --- icu4c/source/i18n/number_output.cpp | 5 +++-- icu4c/source/i18n/numrange_fluent.cpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/icu4c/source/i18n/number_output.cpp b/icu4c/source/i18n/number_output.cpp index 1e86f2f983..6f4e248204 100644 --- a/icu4c/source/i18n/number_output.cpp +++ b/icu4c/source/i18n/number_output.cpp @@ -16,6 +16,7 @@ namespace number { UPRV_FORMATTED_VALUE_SUBCLASS_AUTO_IMPL(FormattedNumber) +#define UPRV_NOARG UBool FormattedNumber::nextFieldPosition(FieldPosition& fieldPosition, UErrorCode& status) const { UPRV_FORMATTED_VALUE_METHOD_GUARD(FALSE) @@ -30,12 +31,12 @@ void FormattedNumber::getAllFieldPositions(FieldPositionIterator& iterator, UErr void FormattedNumber::getAllFieldPositionsImpl(FieldPositionIteratorHandler& fpih, UErrorCode& status) const { - UPRV_FORMATTED_VALUE_METHOD_GUARD() + UPRV_FORMATTED_VALUE_METHOD_GUARD(UPRV_NOARG) fData->getStringRef().getAllFieldPositions(fpih, status); } void FormattedNumber::getDecimalQuantity(impl::DecimalQuantity& output, UErrorCode& status) const { - UPRV_FORMATTED_VALUE_METHOD_GUARD() + UPRV_FORMATTED_VALUE_METHOD_GUARD(UPRV_NOARG) output = fData->quantity; } diff --git a/icu4c/source/i18n/numrange_fluent.cpp b/icu4c/source/i18n/numrange_fluent.cpp index 079d5194b0..b284561cdc 100644 --- a/icu4c/source/i18n/numrange_fluent.cpp +++ b/icu4c/source/i18n/numrange_fluent.cpp @@ -377,6 +377,7 @@ LocalizedNumberRangeFormatter::getFormatter(UErrorCode& status) const { UPRV_FORMATTED_VALUE_SUBCLASS_AUTO_IMPL(FormattedNumberRange) +#define UPRV_NOARG UBool FormattedNumberRange::nextFieldPosition(FieldPosition& fieldPosition, UErrorCode& status) const { UPRV_FORMATTED_VALUE_METHOD_GUARD(FALSE) @@ -391,7 +392,7 @@ void FormattedNumberRange::getAllFieldPositions(FieldPositionIterator& iterator, void FormattedNumberRange::getAllFieldPositionsImpl( FieldPositionIteratorHandler& fpih, UErrorCode& status) const { - UPRV_FORMATTED_VALUE_METHOD_GUARD() + UPRV_FORMATTED_VALUE_METHOD_GUARD(UPRV_NOARG) fData->getStringRef().getAllFieldPositions(fpih, status); } From e318c0c374330906a561933cd54304a665d1b22e Mon Sep 17 00:00:00 2001 From: Shane Carr Date: Tue, 12 Mar 2019 18:06:21 -0700 Subject: [PATCH 4/7] ICU-20494 Fixes to very large magnitude exponents in number parsing. - Do not depend on ArithmeticException string in ICU4J. - Return correct string in ICU4C. - Fix related issue in applyMaxInteger. --- icu4c/source/i18n/fmtable.cpp | 6 ++++- icu4c/source/i18n/number_decimalquantity.cpp | 6 +++++ icu4c/source/test/intltest/numbertest_api.cpp | 25 ++++++++++++++++++ icu4c/source/test/intltest/numfmtst.cpp | 26 +++++++++++++++++++ .../number/DecimalQuantity_AbstractBCD.java | 7 +++++ .../DecimalQuantity_DualStorageBCD.java | 16 ++++++------ .../icu/dev/test/format/NumberFormatTest.java | 26 +++++++++++++++++++ .../test/number/NumberFormatterApiTest.java | 25 ++++++++++++++++++ 8 files changed, 128 insertions(+), 9 deletions(-) diff --git a/icu4c/source/i18n/fmtable.cpp b/icu4c/source/i18n/fmtable.cpp index 82456f94df..d813424494 100644 --- a/icu4c/source/i18n/fmtable.cpp +++ b/icu4c/source/i18n/fmtable.cpp @@ -732,7 +732,11 @@ CharString *Formattable::internalGetCharString(UErrorCode &status) { // Older ICUs called uprv_decNumberToString here, which is not exactly the same as // DecimalQuantity::toScientificString(). The biggest difference is that uprv_decNumberToString does // not print scientific notation for magnitudes greater than -5 and smaller than some amount (+5?). - if (fDecimalQuantity->isZero()) { + if (fDecimalQuantity->isInfinite()) { + fDecimalStr->append("Infinity", status); + } else if (fDecimalQuantity->isNaN()) { + fDecimalStr->append("NaN", status); + } else if (fDecimalQuantity->isZero()) { fDecimalStr->append("0", -1, status); } else if (fType==kLong || fType==kInt64 || // use toPlainString for integer types (fDecimalQuantity->getMagnitude() != INT32_MIN && std::abs(fDecimalQuantity->getMagnitude()) < 5)) { diff --git a/icu4c/source/i18n/number_decimalquantity.cpp b/icu4c/source/i18n/number_decimalquantity.cpp index 2fde292a08..d899c27671 100644 --- a/icu4c/source/i18n/number_decimalquantity.cpp +++ b/icu4c/source/i18n/number_decimalquantity.cpp @@ -160,6 +160,11 @@ void DecimalQuantity::applyMaxInteger(int32_t maxInt) { return; } + if (maxInt <= scale) { + setBcdToZero(); + return; + } + int32_t magnitude = getMagnitude(); if (maxInt <= magnitude) { popFromLeft(magnitude - maxInt + 1); @@ -983,6 +988,7 @@ void DecimalQuantity::shiftRight(int32_t numDigits) { } void DecimalQuantity::popFromLeft(int32_t numDigits) { + U_ASSERT(numDigits <= precision); if (usingBytes) { int i = precision - 1; for (; i >= precision - numDigits; i--) { diff --git a/icu4c/source/test/intltest/numbertest_api.cpp b/icu4c/source/test/intltest/numbertest_api.cpp index 902d27f127..68a0e7ba1c 100644 --- a/icu4c/source/test/intltest/numbertest_api.cpp +++ b/icu4c/source/test/intltest/numbertest_api.cpp @@ -1657,6 +1657,31 @@ void NumberFormatterApiTest::integerWidth() { u"00.08765", u"00.008765", u"00"); + + assertFormatSingle( + u"Integer Width Remove All A", + u"integer-width/00", + NumberFormatter::with().integerWidth(IntegerWidth::zeroFillTo(2).truncateAt(2)), + "en", + 2500, + u"00"); + + assertFormatSingle( + u"Integer Width Remove All B", + u"integer-width/00", + NumberFormatter::with().integerWidth(IntegerWidth::zeroFillTo(2).truncateAt(2)), + "en", + 25000, + u"00"); + + assertFormatSingle( + u"Integer Width Remove All B, Bytes Mode", + u"integer-width/00", + NumberFormatter::with().integerWidth(IntegerWidth::zeroFillTo(2).truncateAt(2)), + "en", + // Note: this double produces all 17 significant digits + 10000000000000002000.0, + u"00"); } void NumberFormatterApiTest::symbols() { diff --git a/icu4c/source/test/intltest/numfmtst.cpp b/icu4c/source/test/intltest/numfmtst.cpp index 7dd66e580a..5c0e849076 100644 --- a/icu4c/source/test/intltest/numfmtst.cpp +++ b/icu4c/source/test/intltest/numfmtst.cpp @@ -9443,6 +9443,32 @@ void NumberFormatTest::Test20037_ScientificIntegerOverflow() { assertEquals(u"Should not overflow", u"3E-2147483648", {sp.data(), sp.length(), US_INV}); + + // Test largest parseable exponent + result = Formattable(); + nf->parse(u"9876e2147483643", result, status); + sp = result.getDecimalNumber(status); + assertEquals(u"Should not overflow", + u"9.876E+2147483646", + {sp.data(), sp.length(), US_INV}); + + // Test max value as well + const char16_t* infinityInputs[] = { + u"9876e2147483644", + u"9876e2147483645", + u"9876e2147483646", + u"9876e2147483647", + u"9876e2147483648", + u"9876e2147483649", + }; + for (const auto& input : infinityInputs) { + result = Formattable(); + nf->parse(input, result, status); + sp = result.getDecimalNumber(status); + assertEquals(UnicodeString("Should become Infinity: ") + input, + u"Infinity", + {sp.data(), sp.length(), US_INV}); + } } void NumberFormatTest::Test13840_ParseLongStringCrash() { diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java index 87434932a8..58a04c8452 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java @@ -141,6 +141,11 @@ public abstract class DecimalQuantity_AbstractBCD implements DecimalQuantity { return; } + if (maxInt <= scale) { + setBcdToZero(); + return; + } + int magnitude = getMagnitude(); if (maxInt <= magnitude) { popFromLeft(magnitude - maxInt + 1); @@ -205,6 +210,8 @@ public abstract class DecimalQuantity_AbstractBCD implements DecimalQuantity { if (precision != 0) { scale = Utility.addExact(scale, delta); origDelta = Utility.addExact(origDelta, delta); + // Make sure that precision + scale won't overflow, either + Utility.addExact(scale, precision); } } diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_DualStorageBCD.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_DualStorageBCD.java index 791538c938..47f0d978c0 100644 --- a/icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_DualStorageBCD.java +++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_DualStorageBCD.java @@ -156,6 +156,7 @@ public final class DecimalQuantity_DualStorageBCD extends DecimalQuantity_Abstra @Override protected void popFromLeft(int numDigits) { + assert numDigits <= precision; if (usingBytes) { int i = precision - 1; for (; i >= precision - numDigits; i--) { @@ -252,17 +253,16 @@ public final class DecimalQuantity_DualStorageBCD extends DecimalQuantity_Abstra tempLong = tempLong * 10 + getDigitPos(shift); } BigDecimal result = BigDecimal.valueOf(tempLong); - try { + // Test that the new scale fits inside the BigDecimal + long newScale = result.scale() + scale; + if (newScale <= Integer.MIN_VALUE) { + result = BigDecimal.ZERO; + } else { result = result.scaleByPowerOfTen(scale); - } catch (ArithmeticException e) { - if (e.getMessage().contains("Underflow")) { - result = BigDecimal.ZERO; - } else { - throw e; - } } - if (isNegative()) + if (isNegative()) { result = result.negate(); + } return result; } } diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/NumberFormatTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/NumberFormatTest.java index 0c76bd002e..f6b5752314 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/NumberFormatTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/NumberFormatTest.java @@ -6511,6 +6511,32 @@ public class NumberFormatTest extends TestFmwk { result = nf.parse(".0003e-2147483644"); assertEquals("Should not overflow", "0", result.toString()); + + // Test largest parseable exponent + // This is limited by ICU's BigDecimal implementation + result = nf.parse("1e999999999"); + assertEquals("Should not overflow", + "1E+999999999", result.toString()); + + // Test max value as well + String[] infinityInputs = { + "9876e1000000000", + "9876e2147483640", + "9876e2147483641", + "9876e2147483642", + "9876e2147483643", + "9876e2147483644", + "9876e2147483645", + "9876e2147483646", + "9876e2147483647", + "9876e2147483648", + "9876e2147483649", + }; + for (String input : infinityInputs) { + result = nf.parse(input); + assertEquals("Should become Infinity: " + input, + "Infinity", result.toString()); + } } @Test diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/number/NumberFormatterApiTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/number/NumberFormatterApiTest.java index 9421097eca..e0ad131b36 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/number/NumberFormatterApiTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/number/NumberFormatterApiTest.java @@ -1591,6 +1591,31 @@ public class NumberFormatterApiTest { "00.08765", "00.008765", "00"); + + assertFormatSingle( + "Integer Width Remove All A", + "integer-width/00", + NumberFormatter.with().integerWidth(IntegerWidth.zeroFillTo(2).truncateAt(2)), + ULocale.ENGLISH, + 2500, + "00"); + + assertFormatSingle( + "Integer Width Remove All B", + "integer-width/00", + NumberFormatter.with().integerWidth(IntegerWidth.zeroFillTo(2).truncateAt(2)), + ULocale.ENGLISH, + 25000, + "00"); + + assertFormatSingle( + "Integer Width Remove All B, Bytes Mode", + "integer-width/00", + NumberFormatter.with().integerWidth(IntegerWidth.zeroFillTo(2).truncateAt(2)), + ULocale.ENGLISH, + // Note: this double produces all 17 significant digits + 10000000000000002000.0, + "00"); } @Test From c86028c70c45ab0d8f3d8cbcc26c703f95fb6aec Mon Sep 17 00:00:00 2001 From: Shane Carr Date: Fri, 22 Mar 2019 21:34:56 -0700 Subject: [PATCH 5/7] ICU-20439 Fix internal and draft headers. --- icu4c/source/i18n/numsys.cpp | 4 ++-- icu4c/source/i18n/unicode/numberformatter.h | 8 ++++---- icu4c/source/i18n/unicode/numsys.h | 20 ++++++++------------ icu4c/source/i18n/unicode/reldatefmt.h | 2 ++ icu4c/source/test/hdrtst/cxxfiles.txt | 2 ++ 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/icu4c/source/i18n/numsys.cpp b/icu4c/source/i18n/numsys.cpp index 50be63e7b9..d420151b1b 100644 --- a/icu4c/source/i18n/numsys.cpp +++ b/icu4c/source/i18n/numsys.cpp @@ -260,8 +260,8 @@ void NumberingSystem::setName(const char *n) { if ( n == nullptr ) { name[0] = (char) 0; } else { - uprv_strncpy(name,n,NUMSYS_NAME_CAPACITY); - name[NUMSYS_NAME_CAPACITY] = '\0'; // Make sure it is null terminated. + uprv_strncpy(name,n,kInternalNumSysNameCapacity); + name[kInternalNumSysNameCapacity] = '\0'; // Make sure it is null terminated. } } UBool NumberingSystem::isAlgorithmic() const { diff --git a/icu4c/source/i18n/unicode/numberformatter.h b/icu4c/source/i18n/unicode/numberformatter.h index 72f474886a..e9fe39a931 100644 --- a/icu4c/source/i18n/unicode/numberformatter.h +++ b/icu4c/source/i18n/unicode/numberformatter.h @@ -112,7 +112,7 @@ class IntegerWidth; namespace impl { -#ifndef U_HIDE_INTERNAL_API +// can't be #ifndef U_HIDE_INTERNAL_API; referenced throughout this file in public classes /** * Datatype for minimum/maximum fraction digits. Must be able to hold kMaxIntFracSig. * @@ -120,14 +120,14 @@ namespace impl { */ typedef int16_t digits_t; +// can't be #ifndef U_HIDE_INTERNAL_API; needed for struct initialization /** * Use a default threshold of 3. This means that the third time .format() is called, the data structures get built * using the "safe" code path. The first two calls to .format() will trigger the unsafe code path. * * @internal */ -static constexpr int32_t DEFAULT_THRESHOLD = 3; -#endif /* U_HIDE_INTERNAL_API */ +static constexpr int32_t kInternalDefaultThreshold = 3; // Forward declarations: class Padder; @@ -1411,7 +1411,7 @@ struct U_I18N_API MacroProps : public UMemory { const CurrencySymbols* currencySymbols = nullptr; // no ownership /** @internal */ - int32_t threshold = DEFAULT_THRESHOLD; + int32_t threshold = kInternalDefaultThreshold; /** @internal */ Locale locale; diff --git a/icu4c/source/i18n/unicode/numsys.h b/icu4c/source/i18n/unicode/numsys.h index 5e14ea5c31..0ced6f4cfa 100644 --- a/icu4c/source/i18n/unicode/numsys.h +++ b/icu4c/source/i18n/unicode/numsys.h @@ -20,16 +20,6 @@ #include "unicode/utypes.h" -#ifndef U_HIDE_INTERNAL_API -/** - * \def NUMSYS_NAME_CAPACITY - * Size of a numbering system name. - * @internal - */ -#define NUMSYS_NAME_CAPACITY 8 -#endif /* U_HIDE_INTERNAL_API */ - - /** * \file * \brief C++ API: NumberingSystem object @@ -37,12 +27,18 @@ #if !UCONFIG_NO_FORMATTING - #include "unicode/format.h" #include "unicode/uobject.h" U_NAMESPACE_BEGIN +// can't be #ifndef U_HIDE_INTERNAL_API; needed for char[] field size +/** + * Size of a numbering system name. + * @internal + */ +constexpr const size_t kInternalNumSysNameCapacity = 8; + /** * Defines numbering systems. A numbering system describes the scheme by which * numbers are to be presented to the end user. In its simplest form, a numbering @@ -195,7 +191,7 @@ private: UnicodeString desc; int32_t radix; UBool algorithmic; - char name[NUMSYS_NAME_CAPACITY+1]; + char name[kInternalNumSysNameCapacity+1]; void setRadix(int32_t radix); diff --git a/icu4c/source/i18n/unicode/reldatefmt.h b/icu4c/source/i18n/unicode/reldatefmt.h index 32344cd5f1..16ae91ad03 100644 --- a/icu4c/source/i18n/unicode/reldatefmt.h +++ b/icu4c/source/i18n/unicode/reldatefmt.h @@ -708,11 +708,13 @@ private: UErrorCode& status, Args... args) const; +#ifndef U_HIDE_DRAFT_API // for FormattedRelativeDateTime template FormattedRelativeDateTime doFormatToValue( F callback, UErrorCode& status, Args... args) const; +#endif // U_HIDE_DRAFT_API void formatImpl( double quantity, diff --git a/icu4c/source/test/hdrtst/cxxfiles.txt b/icu4c/source/test/hdrtst/cxxfiles.txt index 4c06badc6b..02151debd6 100644 --- a/icu4c/source/test/hdrtst/cxxfiles.txt +++ b/icu4c/source/test/hdrtst/cxxfiles.txt @@ -53,11 +53,13 @@ fieldpos.h filteredbrk.h fmtable.h format.h +formattedvalue.h fpositer.h gender.h gregocal.h idna.h listformatter.h +localebuilder.h locdspnm.h locid.h measfmt.h From 1033a64b733555bdb3a508375ea6701ab8358d5e Mon Sep 17 00:00:00 2001 From: Andy Heninger Date: Sun, 24 Mar 2019 11:50:35 -0700 Subject: [PATCH 6/7] ICU-20439 API Change Report for ICU 64 regenerated. --- icu4c/APIChangeReport.html | 180 ++++++++++++++++++------------------- 1 file changed, 88 insertions(+), 92 deletions(-) diff --git a/icu4c/APIChangeReport.html b/icu4c/APIChangeReport.html index d279fbfdae..5fd720da6c 100644 --- a/icu4c/APIChangeReport.html +++ b/icu4c/APIChangeReport.html @@ -181,22 +181,6 @@ dtptngen.hUnicodeString icu::DateTimePatternGenerator::getFieldDisplayName(UDateTimePatternField, UDateTimePGDisplayWidth) constDraft→Stable
ICU 61 -numberformatter.hAppendable& icu::number::FormattedNumber::appendTo(Appendable&, UErrorCode&) constDraft
ICU 62Draft
-ICU 64 - - -numberformatter.hUnicodeString icu::number::FormattedNumber::toString(UErrorCode&) constDraft
ICU 62Draft
-ICU 64 - - -numberrangeformatter.hAppendable& icu::number::FormattedNumberRange::appendTo(Appendable&, UErrorCode&) constDraft
ICU 63Draft
-ICU 64 - - -numberrangeformatter.hUnicodeString icu::number::FormattedNumberRange::toString(UErrorCode&) constDraft
ICU 63Draft
-ICU 64 - - ucurr.henum UCurrNameStyle::UCURR_NARROW_SYMBOL_NAMEDraft→Stable
ICU 61 @@ -1883,155 +1867,161 @@ nounit.hstatic UClassID icu::NoUnit::getStaticClassID()Draft
ICU 60 +numberformatter.hAppendable& icu::number::FormattedNumber::appendTo(Appendable&, UErrorCode&) constDraft
ICU 62 + + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::adoptPerUnit(icu::MeasureUnit*) const&Draft
ICU 61 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::adoptPerUnit(icu::MeasureUnit*)&&Draft
ICU 62 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::adoptSymbols(NumberingSystem*) const&Draft
ICU 60 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::adoptSymbols(NumberingSystem*)&&Draft
ICU 62 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::adoptUnit(icu::MeasureUnit*) const&Draft
ICU 60 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::adoptUnit(icu::MeasureUnit*)&&Draft
ICU 62 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::decimal(UNumberDecimalSeparatorDisplay) const&Draft
ICU 60 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::decimal(UNumberDecimalSeparatorDisplay)&&Draft
ICU 62 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::grouping(UNumberGroupingStrategy) const&Draft
ICU 61 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::grouping(UNumberGroupingStrategy)&&Draft
ICU 62 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::integerWidth(const IntegerWidth&) const&Draft
ICU 60 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::integerWidth(const IntegerWidth&)&&Draft
ICU 62 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::notation(const Notation&) const&Draft
ICU 60 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::notation(const Notation&)&&Draft
ICU 62 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::perUnit(const icu::MeasureUnit&) const&Draft
ICU 61 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::perUnit(const icu::MeasureUnit&)&&Draft
ICU 62 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::precision(const Precision&) const&Draft
ICU 62 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::precision(const Precision&)&&Draft
ICU 62 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::roundingMode(UNumberFormatRoundingMode) const&Draft
ICU 62 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::roundingMode(UNumberFormatRoundingMode)&&Draft
ICU 62 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::scale(const Scale&) const&Draft
ICU 62 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::scale(const Scale&)&&Draft
ICU 62 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::sign(UNumberSignDisplay) const&Draft
ICU 60 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::sign(UNumberSignDisplay)&&Draft
ICU 62 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::symbols(const DecimalFormatSymbols&) const&Draft
ICU 60 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::symbols(const DecimalFormatSymbols&)&&Draft
ICU 62 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::unit(const icu::MeasureUnit&) const&Draft
ICU 60 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::unit(const icu::MeasureUnit&)&&Draft
ICU 62 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::unitWidth(UNumberUnitWidth) const&Draft
ICU 60 - + numberformatter.hDerived icu::number::NumberFormatterSettings< Derived >::unitWidth(UNumberUnitWidth)&&Draft
ICU 62 - + numberformatter.hFormat* icu::number::LocalizedNumberFormatter::toFormat(UErrorCode&) constDraft
ICU 62 - + numberformatter.hFormattedNumber icu::number::LocalizedNumberFormatter::formatDecimal(StringPiece, UErrorCode&) constDraft
ICU 60 - + numberformatter.hFormattedNumber icu::number::LocalizedNumberFormatter::formatDouble(double, UErrorCode&) constDraft
ICU 60 - + numberformatter.hFormattedNumber icu::number::LocalizedNumberFormatter::formatInt(int64_t, UErrorCode&) constDraft
ICU 60 - + numberformatter.hFormattedNumber& icu::number::FormattedNumber::operator=(FormattedNumber&&)Draft
ICU 62 - + numberformatter.hIntegerWidth icu::number::IntegerWidth::truncateAt(int32_t)Draft
ICU 60 - + numberformatter.hLocalizedNumberFormatter icu::number::UnlocalizedNumberFormatter::locale(const icu::Locale&) const&Draft
ICU 60 - + numberformatter.hLocalizedNumberFormatter icu::number::UnlocalizedNumberFormatter::locale(const icu::Locale&)&&Draft
ICU 62 - + numberformatter.hLocalizedNumberFormatter& icu::number::LocalizedNumberFormatter::operator=(LocalizedNumberFormatter&&)Draft
ICU 62 - + numberformatter.hLocalizedNumberFormatter& icu::number::LocalizedNumberFormatter::operator=(const LocalizedNumberFormatter&)Draft
ICU 62 - + numberformatter.hPrecision icu::number::CurrencyPrecision::withCurrency(const CurrencyUnit&) constDraft
ICU 60 - + numberformatter.hPrecision icu::number::FractionPrecision::withMaxDigits(int32_t) constDraft
ICU 60 - + numberformatter.hPrecision icu::number::FractionPrecision::withMinDigits(int32_t) constDraft
ICU 60 - + numberformatter.hPrecision icu::number::IncrementPrecision::withMinFraction(int32_t) constDraft
ICU 60 - + numberformatter.hScale& icu::number::Scale::operator=(Scale&&)Draft
ICU 62 - + numberformatter.hScale& icu::number::Scale::operator=(const Scale&)Draft
ICU 62 - + numberformatter.hScientificNotation icu::number::ScientificNotation::withExponentSignDisplay(UNumberSignDisplay) constDraft
ICU 60 - + numberformatter.hScientificNotation icu::number::ScientificNotation::withMinExponentDigits(int32_t) constDraft
ICU 60 - + numberformatter.hUBool icu::number::FormattedNumber::nextFieldPosition(FieldPosition&, UErrorCode&) constDraft
ICU 62 - + numberformatter.hUBool icu::number::NumberFormatterSettings< Derived >::copyErrorTo(UErrorCode&) constDraft
ICU 60 + +numberformatter.hUnicodeString icu::number::FormattedNumber::toString(UErrorCode&) constDraft
ICU 62 + numberformatter.hUnicodeString icu::number::NumberFormatterSettings< Derived >::toSkeleton(UErrorCode&) constDraft
ICU 62 @@ -2159,86 +2149,92 @@ numberformatter.hvoid icu::number::FormattedNumber::getAllFieldPositions(FieldPositionIterator&, UErrorCode&) constDraft
ICU 62 +numberrangeformatter.hAppendable& icu::number::FormattedNumberRange::appendTo(Appendable&, UErrorCode&) constDraft
ICU 63 + + numberrangeformatter.hDerived icu::number::NumberRangeFormatterSettings< Derived >::collapse(UNumberRangeCollapse) const&Draft
ICU 63 - + numberrangeformatter.hDerived icu::number::NumberRangeFormatterSettings< Derived >::collapse(UNumberRangeCollapse)&&Draft
ICU 63 - + numberrangeformatter.hDerived icu::number::NumberRangeFormatterSettings< Derived >::identityFallback(UNumberRangeIdentityFallback) const&Draft
ICU 63 - + numberrangeformatter.hDerived icu::number::NumberRangeFormatterSettings< Derived >::identityFallback(UNumberRangeIdentityFallback)&&Draft
ICU 63 - + numberrangeformatter.hDerived icu::number::NumberRangeFormatterSettings< Derived >::numberFormatterBoth(UnlocalizedNumberFormatter&&) const&Draft
ICU 63 - + numberrangeformatter.hDerived icu::number::NumberRangeFormatterSettings< Derived >::numberFormatterBoth(UnlocalizedNumberFormatter&&)&&Draft
ICU 63 - + numberrangeformatter.hDerived icu::number::NumberRangeFormatterSettings< Derived >::numberFormatterBoth(const UnlocalizedNumberFormatter&) const&Draft
ICU 63 - + numberrangeformatter.hDerived icu::number::NumberRangeFormatterSettings< Derived >::numberFormatterBoth(const UnlocalizedNumberFormatter&)&&Draft
ICU 63 - + numberrangeformatter.hDerived icu::number::NumberRangeFormatterSettings< Derived >::numberFormatterFirst(UnlocalizedNumberFormatter&&) const&Draft
ICU 63 - + numberrangeformatter.hDerived icu::number::NumberRangeFormatterSettings< Derived >::numberFormatterFirst(UnlocalizedNumberFormatter&&)&&Draft
ICU 63 - + numberrangeformatter.hDerived icu::number::NumberRangeFormatterSettings< Derived >::numberFormatterFirst(const UnlocalizedNumberFormatter&) const&Draft
ICU 63 - + numberrangeformatter.hDerived icu::number::NumberRangeFormatterSettings< Derived >::numberFormatterFirst(const UnlocalizedNumberFormatter&)&&Draft
ICU 63 - + numberrangeformatter.hDerived icu::number::NumberRangeFormatterSettings< Derived >::numberFormatterSecond(UnlocalizedNumberFormatter&&) const&Draft
ICU 63 - + numberrangeformatter.hDerived icu::number::NumberRangeFormatterSettings< Derived >::numberFormatterSecond(UnlocalizedNumberFormatter&&)&&Draft
ICU 63 - + numberrangeformatter.hDerived icu::number::NumberRangeFormatterSettings< Derived >::numberFormatterSecond(const UnlocalizedNumberFormatter&) const&Draft
ICU 63 - + numberrangeformatter.hDerived icu::number::NumberRangeFormatterSettings< Derived >::numberFormatterSecond(const UnlocalizedNumberFormatter&)&&Draft
ICU 63 - + numberrangeformatter.hFormattedNumberRange icu::number::LocalizedNumberRangeFormatter::formatFormattableRange(const Formattable&, const Formattable&, UErrorCode&) constDraft
ICU 63 - + numberrangeformatter.hFormattedNumberRange& icu::number::FormattedNumberRange::operator=(FormattedNumberRange&&)Draft
ICU 63 - + numberrangeformatter.hLocalizedNumberRangeFormatter icu::number::UnlocalizedNumberRangeFormatter::locale(const icu::Locale&) const&Draft
ICU 63 - + numberrangeformatter.hLocalizedNumberRangeFormatter icu::number::UnlocalizedNumberRangeFormatter::locale(const icu::Locale&)&&Draft
ICU 63 - + numberrangeformatter.hLocalizedNumberRangeFormatter& icu::number::LocalizedNumberRangeFormatter::operator=(LocalizedNumberRangeFormatter&&)Draft
ICU 63 - + numberrangeformatter.hLocalizedNumberRangeFormatter& icu::number::LocalizedNumberRangeFormatter::operator=(const LocalizedNumberRangeFormatter&)Draft
ICU 63 - + numberrangeformatter.hUBool icu::number::FormattedNumberRange::nextFieldPosition(FieldPosition&, UErrorCode&) constDraft
ICU 63 - + numberrangeformatter.hUBool icu::number::NumberRangeFormatterSettings< Derived >::copyErrorTo(UErrorCode&) constDraft
ICU 63 - + numberrangeformatter.hUNumberRangeIdentityResult icu::number::FormattedNumberRange::getIdentityResult(UErrorCode&) constDraft
ICU 63 - + numberrangeformatter.hUnicodeString icu::number::FormattedNumberRange::getFirstDecimal(UErrorCode&) constDraft
ICU 63 - + numberrangeformatter.hUnicodeString icu::number::FormattedNumberRange::getSecondDecimal(UErrorCode&) constDraft
ICU 63 + +numberrangeformatter.hUnicodeString icu::number::FormattedNumberRange::toString(UErrorCode&) constDraft
ICU 63 + numberrangeformatter.hUnlocalizedNumberRangeFormatter& icu::number::UnlocalizedNumberRangeFormatter::operator=(UnlocalizedNumberRangeFormatter&&)Draft
ICU 63 @@ -2531,7 +2527,7 @@ (jump back to top)

-Contents generated by StableAPI tool on Wed Feb 27 14:05:03 PST 2019
Copyright (C) 2019, International Business Machines Corporation, All Rights Reserved.
+Contents generated by StableAPI tool on Sun Mar 24 10:57:24 PDT 2019
Copyright (C) 2019, International Business Machines Corporation, All Rights Reserved.

From 2f2aec5f91cffe49b7526d9b0d18a9acbdd0cc89 Mon Sep 17 00:00:00 2001 From: yumaoka Date: Mon, 25 Mar 2019 16:18:16 -0400 Subject: [PATCH 7/7] ICU-20439 Update ICU4J API change report for 64.1 GA. --- icu4j/APIChangeReport.html | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/icu4j/APIChangeReport.html b/icu4j/APIChangeReport.html index 7832d2530a..0d3cfe3035 100644 --- a/icu4j/APIChangeReport.html +++ b/icu4j/APIChangeReport.html @@ -182,7 +182,7 @@ DateFormatSymbols DateIntervalFormat
  • (draft) public DateIntervalFormat.FormattedDateInterval formatToValue(Calendar, Calendar)
  • -
  • (draft) public final DateIntervalFormat.FormattedDateInterval formatToValue(DateInterval)
  • +
  • (draft) public DateIntervalFormat.FormattedDateInterval formatToValue(DateInterval)
DecimalFormat
    @@ -234,8 +234,26 @@ CharsTrie
MeasureUnit
    +
  • (draft) public static final MeasureUnit BARREL
  • +
  • (draft) public static final MeasureUnit BRITISH_THERMAL_UNIT
  • +
  • (draft) public static final MeasureUnit DALTON
  • (draft) public static final MeasureUnit DAY_PERSON
  • +
  • (draft) public static final MeasureUnit DUNAM
  • +
  • (draft) public static final MeasureUnit EARTH_MASS
  • +
  • (draft) public static final MeasureUnit ELECTRONVOLT
  • +
  • (draft) public static final MeasureUnit FLUID_OUNCE_IMPERIAL
  • +
  • (draft) public static final MeasureUnit KILOPASCAL
  • +
  • (draft) public static final MeasureUnit MEGAPASCAL
  • +
  • (draft) public static final MeasureUnit MOLE
  • (draft) public static final MeasureUnit MONTH_PERSON
  • +
  • (draft) public static final MeasureUnit NEWTON
  • +
  • (draft) public static final MeasureUnit NEWTON_METER
  • +
  • (draft) public static final MeasureUnit PERMYRIAD
  • +
  • (draft) public static final MeasureUnit POUND_FOOT
  • +
  • (draft) public static final MeasureUnit POUND_FORCE
  • +
  • (draft) public static final MeasureUnit SOLAR_LUMINOSITY
  • +
  • (draft) public static final MeasureUnit SOLAR_MASS
  • +
  • (draft) public static final MeasureUnit SOLAR_RADIUS
  • (draft) public static final MeasureUnit WEEK_PERSON
  • (draft) public static final MeasureUnit YEAR_PERSON
@@ -246,7 +264,6 @@ VersionInfo
-

Contents generated by ReportAPI tool on Fri Feb 22 16:33:29 EST 2019
© 2019 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html#License

+

Contents generated by ReportAPI tool on Mon Mar 25 15:50:58 EDT 2019
© 2019 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html#License

- \ No newline at end of file