Commit Graph

30335 Commits

Author SHA1 Message Date
Shane Carr
bd1d915c2d
ICU-20056 Adding test for minFrac with maxSig 2018-09-27 14:27:37 -07:00
Jeff Genovy
d07396f94d
ICU-20041 Improve handling of OOM failures in NumberingSystem class. (#19)
ICU-20041 ICU4C NumberingSystem class doesn't handle out-of-memory (OOM) failures.

- Not all code paths in the NumberingSystem class check for OOM failures. This can lead to crashes in some cases as null pointers will be dereferenced without any checks.
- Change to use nullptr instead of NULL.
- Don't stomp on OOM errors when attempting to load resources. We should report back OOM to the caller.
- Use LocalPointer in order simplify the code and for automatic clean-up of memory.
- Use LocalUResourceBundlePointer as well to help simply things even more.
2018-09-27 14:27:37 -07:00
Jeff Genovy
3712aa3d6e
ICU-13810 Fix typo in datefmt.h macro. (#36) 2018-09-27 14:27:37 -07:00
Jeff Genovy
a9a19fc229
ICU-20044 Fix some OOM issues in the NumberFormat class. (#21) 2018-09-27 14:27:37 -07:00
Jeff Genovy
8edc6ba107
ICU-20042 Improve OOM handling in PluralRules class. (#20)
- PluralRules class doesn't handle out-of-memory (OOM) errors in some code paths.
- The clone and assignment operator (operator=) methods of construction don't take an error code  parameter, meaning that if an OOM error occurs during the constructor, it will not reported back to the caller, and the caller has no way to know that the object is in a half-constructed state.
- Using an internal status variable for these above cases.
- Changes to the various PluralRules helper classes to check for OOM as well.
- Using nullptr instead NULL.
- Using LocalPointer instead of raw new/delete in some cases.
- Need to set mRules to nullptr, otherwise we can end up with double deletes in the failure case. (Thanks to Andy for the review).
- Using default member initializers for class members to avoid dangling pointers. Also allows for using default constructors too.
2018-09-27 14:27:37 -07:00
Jeff Genovy
d4fdbb8682
ICU-20035 UnicodeSet constructor(s) and assignment operator should setToBogus when out-of-memory (OOM) failure occurs. (#15) 2018-09-27 14:27:37 -07:00
Jeff Genovy
cbaf075ac1
ICU-20034 ICU4C Locale assignment operator should set the locale to bogus if OOM occurs. (#14)
ICU-20034 ICU4C the Locale class's assignment operator should set the locale to "bogus" if an OOM error occurs when attempting to copy data over from the other locale.
Also need to check strdup, as that calls malloc and it can fail too.
2018-09-27 14:27:37 -07:00
Jeff Genovy
fe9db30ca6
ICU-20005 Clean-up and update the .gitattributes file. Merge pull request #16 from jefgen/jefgen/20005
ICU-20005 Clean-up and update the .gitattributes file
2018-09-27 14:27:37 -07:00
Steven R. Loomis
a33a145ee1
ICU-20033 Add a top-level README.md (#11)
* ICU-20033: add a README.md

- add a basic README.md linking to icu4c and icu4j

PR-URL: https://github.com/unicode-org/icu/pull/11
2018-09-27 14:27:37 -07:00
Jeff Genovy
c20560d19e
ICU-20005 Update/clean-up the .gitattributes file after the automated conversion from the scripts. Also add some comments for others, and use the diff helpers for better diffs. 2018-09-27 14:27:37 -07:00
Andy Heninger
be4e50c762
ICU-13810 Merge pull request #29 from aheninger/ICU-13810-SQ
ICU-13810 Doxygen warning cleanup.
2018-09-27 14:27:37 -07:00
gnrunge
77a1c43f46
ICU-13829 Merge pull request #25 from gnrunge/icu4j_13829
ICU-13829 Languagematcher: Fixes straightforward code issues.
2018-09-27 14:27:37 -07:00
Andy Heninger
35ce5296c1
ICU-13810 Doxygen warning cleanup. 2018-09-27 14:27:37 -07:00
Norbert Runge
95f7cad6b3
ICU-13829 Removes duplicate import statement. 2018-09-27 14:27:37 -07:00
Norbert Runge
f97507dab2
ICU-13829 Revert order of imports to conform with (almost all of) the other files in this directory. 2018-09-27 14:27:37 -07:00
Norbert Runge
298462e5fe
ICU-13829 Languagematcher: Fixes straightforward code issues. 2018-09-27 14:27:37 -07:00
Jeff Genovy
b12a927c93 ICU-13778 DataTimePatternGenerator code refactor. Handle Out-of-Memory (OOM) errors, use LocalPointer to prevent memory leaks when OOM occurs, use an internal error code to better report errors during clone and copy construction, mark helper methods and parameters as const, use nullptr instead of NULL, minor spelling and formatting changes. (Note: All tests pass on Windows and Linux).
X-SVN-Rev: 41552
2018-06-27 19:25:52 +00:00
Jeff Genovy
3b0a30d6e7 ICU-13814 Visual Studio IntelliSense should ignore the 'urename.h' content so that 'Go-to-Definition' (F12) will actually work in the IDE.
X-SVN-Rev: 41551
2018-06-27 19:02:09 +00:00
Markus Scherer
99354ec034 ICU-13851 case mapping data: when fetching delta make sure to read from start of exceptional values
X-SVN-Rev: 41550
2018-06-24 21:12:22 +00:00
Shane Carr
4bc6ad328b ICU-13850 Fixing behavior of ICU4C DecimalFormat#setCurrency() to accept an empty string.
X-SVN-Rev: 41549
2018-06-23 02:09:42 +00:00
Fredrik Roubert
f1d29ce62e ICU-13766 Make UnicodeMapTest#TestUnicodeMapGeneralCategory smaller.
There are 0x10FFFF code points and this test allocates memory for every
code point tested. Testing every single one of them is therefore memory
intensive and slow, without adding any real value to the test.

Instead an equivalent test coverage can be achieved by testing a much
smaller set of ranges of code points that cover all categories.

X-SVN-Rev: 41547
2018-06-21 20:17:22 +00:00
Shane Carr
3f7a4aa202 ICU-13840 Fixing memory overflow issue in number_decimalquantity.cpp and adding tests.
X-SVN-Rev: 41541
2018-06-19 21:52:52 +00:00
Peter Edberg
733e363203 ICU-13823 ICU 62.1 BRS, update measurement unit constants for release-33-1-d03 (deletes VES)
X-SVN-Rev: 41528
2018-06-15 01:12:52 +00:00
Andy Heninger
b2b346c183 ICU-13593 Fix heap-buffer-overflow in TestIDNAMonkeyTest
X-SVN-Rev: 41526
2018-06-14 23:12:42 +00:00
Peter Edberg
7c28a58b1f ICU-13823 Integrate data from cldr/tags/release-33-1-d03 to ICU trunk for ICU62 final
X-SVN-Rev: 41525
2018-06-14 22:33:37 +00:00
Shane Carr
ba800ab7bd ICU-13835 Fixing C++17 compiler error.
X-SVN-Rev: 41523
2018-06-14 20:29:11 +00:00
Fredrik Roubert
1af5762873 ICU-13818 Add virtual destructor for class TokenConsumer.
X-SVN-Rev: 41519
2018-06-13 17:00:44 +00:00
Andy Heninger
04d300adeb ICU-13828 DecimalFormat Error Code handling cleanups.
X-SVN-Rev: 41515
2018-06-11 03:56:58 +00:00
Jeff Genovy
7c45a289d5 ICU-13826 Timezone detection fails on Windows on non-English systems.
X-SVN-Rev: 41514
2018-06-09 01:49:30 +00:00
Yoshito Umaoka
08eed14678 ICU-13822 Updated ICU4J data - removing VES.
X-SVN-Rev: 41512
2018-06-06 23:02:35 +00:00
Yoshito Umaoka
59c7fd4ad3 ICU-13822 Removed VES from currency-numeric data for 62 release. CLDR 33.1 decided to defer this to later time.
X-SVN-Rev: 41511
2018-06-06 22:51:56 +00:00
Andy Heninger
2f534730c9 ICU-13816 Windows compiler warning fix.
X-SVN-Rev: 41504
2018-06-04 21:04:14 +00:00
Andy Heninger
c0f9d2eeef ICU-13807 ICU 62 No Data Testing fixes. Mostly to test code.
X-SVN-Rev: 41500
2018-06-01 01:19:38 +00:00
Shane Carr
4e55f07e42 ICU-13804 Fixing memory leak from r41497.
X-SVN-Rev: 41499
2018-06-01 01:02:49 +00:00
Shane Carr
724e3b4f10 ICU-13804 Fixing test failure from r41497.
X-SVN-Rev: 41498
2018-06-01 00:48:18 +00:00
Shane Carr
dd7667d330 ICU-13804 Making number parsing code more robust when given empty symbol strings.
X-SVN-Rev: 41497
2018-06-01 00:31:54 +00:00
Peter Edberg
9ecddac2b4 ICU-13667 ICU 62rc BRS, edit ICU4C APIChangeReport.html for scale status, group changes for (const enum&) > (enum)
X-SVN-Rev: 41496
2018-05-31 23:11:53 +00:00
Shane Carr
08134fc59e ICU-13667 Making =delete APIdocs consistent in numberformatter.h
X-SVN-Rev: 41495
2018-05-31 22:04:08 +00:00
Norbert Runge
51688fda25 ICU-13667 Fixes compilation errors related to UCONFIG_NO_XXX flag variations.
X-SVN-Rev: 41494
2018-05-31 21:53:43 +00:00
Shane Carr
404a06a0f8 ICU-13667 Fixing incorrect version tag on scale() setter.
X-SVN-Rev: 41493
2018-05-31 21:32:35 +00:00
Peter Edberg
1dc63f042b ICU-13667 ICU 62rc BRS, edit ICU4C APIChangeReport.html to remove const>const& and =delete, add note about Rounder>Precision
X-SVN-Rev: 41492
2018-05-31 19:09:19 +00:00
Peter Edberg
4251b4c8de ICU-13667 ICU 62rc BRS, update guard conditionals for non-stable API part 2 (common,io pass 1)
X-SVN-Rev: 41491
2018-05-30 22:45:26 +00:00
Shane Carr
da165a330f ICU-13667 Updating APIChangeReport.html with Rounder renamed to Precision.
X-SVN-Rev: 41490
2018-05-30 22:11:12 +00:00
Shane Carr
6b7022632b ICU-13667 Making new DecimalFormat constructor private.
X-SVN-Rev: 41489
2018-05-30 21:27:07 +00:00
Shane Carr
0f6bd8d62d ICU-13667 Adding unumberformatter.h to the doxygen front page
X-SVN-Rev: 41488
2018-05-30 19:20:24 +00:00
Markus Scherer
438f1f363b ICU-13667 LocalizedNumberFormatterAsFormat is in the old Format class hierarchy, add ClassID boilerplate; NoUnit move virtual destructor up into first-virtual position, right after constructors
X-SVN-Rev: 41487
2018-05-30 19:15:02 +00:00
Peter Edberg
16519f2643 ICU-13667 ICU 62rc BRS, update guard conditionals for non-stable API part 1 (i18n pass 1)
X-SVN-Rev: 41486
2018-05-30 18:39:29 +00:00
Norbert Runge
781154c113 ICU-13667 Moves digits_t, DEFAULT_THRESHOLD, and copyErrorTo() outside of U_HIDE_INTERNAL_API.
X-SVN-Rev: 41485
2018-05-30 14:40:13 +00:00
Peter Edberg
63d68a159c ICU-13667 ICU 62rc BRS, update ICU4C APIChangeReport.html, generated from r41483
X-SVN-Rev: 41484
2018-05-30 04:37:30 +00:00
Shane Carr
29937704cd ICU-8610 Responding to number skeleton code review feedback.
X-SVN-Rev: 41483
2018-05-30 03:34:41 +00:00