-
-
Notifications
You must be signed in to change notification settings - Fork 758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICU-20119 Update ICU4C #ifndef U_HIDE_XXX guard conditionals #183
ICU-20119 Update ICU4C #ifndef U_HIDE_XXX guard conditionals #183
Conversation
…ash while executing. (#12) Fix the `icucheck.bat` script (used to run the ICU4C tests on Windows) so that it handles the case where a test crashes while executing.
… conversion from the scripts. Also add some comments for others, and use the diff helpers for better diffs.
- Updated javac/javadoc source and target Java version to 1.7. - Eclipse projects to use execution environment JavaSE-1.7. - Replaced java6.bootclasspath with java7.bootclasspath. - Removed pre-Java 7 conditional build targets. - Deleted stylesheet for JDK6 build.
Previously, some developers accidentally introduced Java 7 Objects class utility methods. At that time, we once added Java 6 compatible implementation in com.ibm.icu.impl.Utility class. Now, we use Java 7 as the minimum supported Java version, so we can use Java 7 Objects class and methods. There are some extra changes dropping generics type from constructor. For example from `ArrayList<String> output = new ArrayList<String>();` to `ArrayList<String> output = new ArrayList<>();`. The updated syntax is allowed since Java 7. We have eclipse project configured to normalize such expression, therefore, files touched by this commit were automatically updated. These changes are not directly related to Java 7 Objects method replacement.
…es in this directory.
Previously, ULocale had to work on Java 6, therefore, Java 7 specific Locale methods needed to be invoked by reflection. For the next release, we can directly call Java 7 Locale APIs, so rather complicated reflection implementation were replaced with simple API calls.
ICU-13829 Languagematcher: Fixes straightforward code issues.
ICU-13810 Doxygen warning cleanup.
…tToBogus when out-of-memory (OOM) failure occurs. (#15)
- 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.
…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.
- There are a few locations in the RBNF class that don't check for out-of-memory (OOM) failures. - Using LocalPointer to clean up the manual deletes. - Change to use nullptr instead of NULL. - A few minor typo fixes as well.
Both the number of installed locales and the name of the last locale change with updates to and customizations of CLDR/ICU data so test expectations on these values will cause bogus test failures.
ICU-20036 CurrencyPluralInfo class doesn't always check/handle OOM errors. Changes include: - Using LocalPointer instead of raw new/delete, in order to make the code cleaner. - Using nullptr instead of NULL. - Inspired by Andy's review feedback PluralRules changes, this change sets fPluralRules and fLocale to nullptr in the assignment operator in order to prevent possible double deletes in the failure case. - More consistent about not checking for nullptr when calling delete. - Using LocalUResourceBundlePointer in order to simply the code and not need manual deletes. - Reduce memory usage by using the same LocalUResourceBundle with .getAlias() instead of allocating new ones.
At the moment, CLDR pseudolocale region codes don't have display names. As long as that is so, ICU must not require them to exist in order to not cause bogus test failures when building with pseudolocales.
ICU-20119 Fix NumberFormat failures (by shane)
ICU-20119 Integrate CLDR release-34-alpha2, adjust code & test, update MeasureUnit
… names. This reverts commit 1dccd74.
…169) otherwise includes entry points that should not be included.
uloc_forLanguageTag has a few mapping tables to map grandfathered language tags and deprecated language subtags to their preferred or modern values. Update them based on the latest version of the IANA language subtag registry. [1] Five grandfathered tags without a preferred value are still mapped to what ICU has mapped them to for backward compatibility until the wisdom of continuing to do so is reviewed. In addition, map redundant language tags to their preferred values regardless of whether they're followed by other subtags or not. (e.g. zh-yue vs zh-yue-u-co-pinyin) . Similary, ja-latn-hepburn-heploc is mapped to ja-latn-alaic97 (the variant subtag 'hepburn-helploc' with the prefix 'ja-latn' has the preferred value, 'alaic97') . Update the mapping for deprecated language subtags (e.g. 'jw' to 'jv' and a bunch of 3-letter language codes). Add a new table for deprecated region subtags to map them to their modern values. (e.g. 'DD' to 'DE'). Add a new test case for deprecated language and region mapping and a few more cases for updated grandfathered and redundant tag mapping. [1] https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry
…177) check was needed in the test cases to prevent a segmentation fault.
It looks like @pedberg-icu's workspace is still not configured correctly. Looking at git flow, it seems like there is an automatic merge from the old head to the branch. Pull requests with 219 commits are harmful, in part because they confuse Jira. This pull request is linked to every issue in the 219 commits. Peter, can you run |
Hi Shane
On Oct 1, 2018, at 1:27 PM, Shane F. Carr ***@***.***> wrote:
It looks like @pedberg-icu <https://github.com/pedberg-icu>'s workspace is still not configured correctly. Looking at git flow, it seems like there is an automatic merge from the old head to the branch.
Pull requests with 219 commits are harmful, in part because they confuse Jira. This pull request is linked to every issue in the 219 commits.
Peter, can you run git checkout master followed by git log and confirm that master, origin/master, and upstream/master are all pointing to the same sha? Also make sure that you don't have any local branches that are hanging onto the old head. If necessary, upstream/master is the source of truth, and you should reset local master or force-push to origin/master to get them in sync
I get the following, which seems to be a problem:
commit 8873b10 (HEAD -> master, origin/master, origin/HEAD)
Merge: 63252eb bac4c96
Author: Peter Edberg <pedberg@unicode.org>
Date: Sat Sep 29 10:26:40 2018 -0700
Synch pedberg-icu/icu master to unicode-org/icu master
commit bac4c96 (upstream/master)
Author: pedberg-icu <42151464+pedberg-icu@users.noreply.github.com>
Date: Fri Sep 28 16:09:15 2018 -0700
ICU-20119 cldr release-34-alpha3 integration (#181)
ICU-20119 cldr release-34-alpha3 integration (PR #181):
* ICU-20119 63rc BRS, cldr 34-alpha3: add ku,xh; fixes for de/it CompactDec, availFmts yw amd MW patterns
* ICU-20119 Skip & log_knownIssue for Windows LCID mapping problem with ckb/ku
But is seems to be the last commit to "Synch pedberg-icu/icu master to unicode-org/icu master" should have updated properly; it was done using these commands and checks, with results as (partially) shown::
git remote -v
origin https://github.com/pedberg-icu/icu.git (fetch)
origin https://github.com/pedberg-icu/icu.git (push)
upstream https://github.com/unicode-org/icu.git (fetch)
upstream https://github.com/unicode-org/icu.git (push)
git fetch upstream
remote: Enumerating objects: 297, done.
remote: Counting objects: 100% (297/297), done.
remote: Total 383 (delta 296), reused 297 (delta 296), pack-reused 86
.....
git checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.
git merge upstream/master
Filtering content: 100% (39/39), 12.63 MiB | 1.29 MiB/s, done.
...
Merge made by the 'recursive' strategy.
...
362 files changed, 4019 insertions(+), 1499 deletions(-)
...
git push origin master
Uploading LFS objects: 100% (39/39), 13 MB | 0 B/s, done
Counting objects: 358, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (83/83), done.
Writing objects: 100% (358/358), 142.26 KiB | 9.48 MiB/s, done.
Total 358 (delta 274), reused 333 (delta 258)
remote: Resolving deltas: 100% (274/274), completed with 245 local objects.
To https://github.com/pedberg-icu/icu.git
63252eb..8873b10 master -> master
Appeared to work OK.
- Peter E
|
Okay. So I think the problem is that you are running
git *merge* upstream/master
Normally this is okay, but since we have a new head, this creates a merge
commit the histories are not the same. You can start using merge again
after you get your local repository back to a correct state.
Please run
git checkout master
git *reset* upstream/master
git push *-f* origin master
At the end of the day, your "git log" should show you a sha and all of your
remotes pointing to the same thing.
…On Tue, Oct 2, 2018 at 1:57 AM, Peter Edberg ***@***.***> wrote:
Hi Shane
On Oct 1, 2018, at 1:27 PM, Shane F. Carr ***@***.***>
wrote:
It looks like @pedberg-icu <https://github.com/pedberg-icu>'s workspace
is still not configured correctly. Looking at git flow, it seems like there
is an automatic merge from the old head to the branch.
Pull requests with 219 commits are harmful, in part because they confuse
Jira. This pull request is linked to every issue in the 219 commits.
Peter, can you run git checkout master followed by git log and confirm
that master, origin/master, and upstream/master are all pointing to the
same sha? Also make sure that you don't have any local branches that are
hanging onto the old head. If necessary, upstream/master is the source of
truth, and you should reset local master or force-push to origin/master to
get them in sync
I get the following, which seems to be a problem:
commit 8873b10 (*HEAD -> **master*,
*origin/master*, *origin/HEAD*)
Merge: 63252eb bac4c96
Author: Peter Edberg ***@***.***>
Date: Sat Sep 29 10:26:40 2018 -0700
Synch pedberg-icu/icu master to unicode-org/icu master
commit bac4c96 (*upstream/master*)
Author: pedberg-icu ***@***.***>
Date: Fri Sep 28 16:09:15 2018 -0700
ICU-20119 cldr release-34-alpha3 integration (#181)
ICU-20119 cldr release-34-alpha3 integration (PR #181):
* ICU-20119 63rc BRS, cldr 34-alpha3: add ku,xh; fixes for de/it
CompactDec, availFmts yw amd MW patterns
* ICU-20119 Skip & log_knownIssue for Windows LCID mapping problem
with ckb/ku
But is seems to be the last commit to "Synch pedberg-icu/icu master to
unicode-org/icu master" should have updated properly; it was done using
these commands and checks, with results as (partially) shown::
git remote -v
origin https://github.com/pedberg-icu/icu.git (fetch)
origin https://github.com/pedberg-icu/icu.git (push)
upstream https://github.com/unicode-org/icu.git (fetch)
upstream https://github.com/unicode-org/icu.git (push)
git fetch upstream
remote: Enumerating objects: 297, done.
remote: Counting objects: 100% (297/297), done.
remote: Total 383 (delta 296), reused 297 (delta 296), pack-reused 86
.....
git checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.
git merge upstream/master
Filtering content: 100% (39/39), 12.63 MiB | 1.29 MiB/s, done.
...
Merge made by the 'recursive' strategy.
...
362 files changed, 4019 insertions(+), 1499 deletions(-)
...
git push origin master
Uploading LFS objects: 100% (39/39), 13 MB | 0 B/s, done
Counting objects: 358, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (83/83), done.
Writing objects: 100% (358/358), 142.26 KiB | 9.48 MiB/s, done.
Total 358 (delta 274), reused 333 (delta 258)
remote: Resolving deltas: 100% (274/274), completed with 245 local objects.
To https://github.com/pedberg-icu/icu.git
63252eb..8873b10 master -> master
Appeared to work OK.
- Peter E
|
Thanks, that worked:
RedMBPB:icu-pedberg pkedberg$ git log
commit bac4c96 (HEAD -> master, upstream/master, origin/master, origin/HEAD)
Author: pedberg-icu <42151464+pedberg-icu@users.noreply.github.com>
Date: Fri Sep 28 16:09:15 2018 -0700
- Peter
… On Oct 2, 2018, at 2:49 AM, Shane Carr ***@***.***> wrote:
Okay. So I think the problem is that you are running
git merge upstream/master
Normally this is okay, but since we have a new head, this creates a merge commit the histories are not the same. You can start using merge again after you get your local repository back to a correct state.
Please run
git checkout master
git reset upstream/master
git push -f origin master
At the end of the day, your "git log" should show you a sha and all of your remotes pointing to the same thing.
On Tue, Oct 2, 2018 at 1:57 AM, Peter Edberg ***@***.*** ***@***.***>> wrote:
Hi Shane
> On Oct 1, 2018, at 1:27 PM, Shane F. Carr ***@***.*** ***@***.***>> wrote:
>
> It looks like @pedberg-icu <https://github.com/pedberg-icu>'s workspace is still not configured correctly. Looking at git flow, it seems like there is an automatic merge from the old head to the branch.
>
> Pull requests with 219 commits are harmful, in part because they confuse Jira. This pull request is linked to every issue in the 219 commits.
>
> Peter, can you run git checkout master followed by git log and confirm that master, origin/master, and upstream/master are all pointing to the same sha? Also make sure that you don't have any local branches that are hanging onto the old head. If necessary, upstream/master is the source of truth, and you should reset local master or force-push to origin/master to get them in sync
>
I get the following, which seems to be a problem:
commit 8873b10 (HEAD -> master, origin/master, origin/HEAD)
Merge: 63252eb bac4c96
Author: Peter Edberg ***@***.*** ***@***.***>>
Date: Sat Sep 29 10:26:40 2018 -0700
Synch pedberg-icu/icu master to unicode-org/icu master
commit bac4c96 (upstream/master)
Author: pedberg-icu ***@***.*** ***@***.***>>
Date: Fri Sep 28 16:09:15 2018 -0700
ICU-20119 cldr release-34-alpha3 integration (#181)
ICU-20119 cldr release-34-alpha3 integration (PR #181):
* ICU-20119 63rc BRS, cldr 34-alpha3: add ku,xh; fixes for de/it CompactDec, availFmts yw amd MW patterns
* ICU-20119 Skip & log_knownIssue for Windows LCID mapping problem with ckb/ku
But is seems to be the last commit to "Synch pedberg-icu/icu master to unicode-org/icu master" should have updated properly; it was done using these commands and checks, with results as (partially) shown::
git remote -v
origin https://github.com/pedberg-icu/icu.git <https://github.com/pedberg-icu/icu.git> (fetch)
origin https://github.com/pedberg-icu/icu.git <https://github.com/pedberg-icu/icu.git> (push)
upstream https://github.com/unicode-org/icu.git <https://github.com/unicode-org/icu.git> (fetch)
upstream https://github.com/unicode-org/icu.git <https://github.com/unicode-org/icu.git> (push)
git fetch upstream
remote: Enumerating objects: 297, done.
remote: Counting objects: 100% (297/297), done.
remote: Total 383 (delta 296), reused 297 (delta 296), pack-reused 86
.....
git checkout master
Already on 'master'
Your branch is up to date with 'origin/master'.
git merge upstream/master
Filtering content: 100% (39/39), 12.63 MiB | 1.29 MiB/s, done.
...
Merge made by the 'recursive' strategy.
...
362 files changed, 4019 insertions(+), 1499 deletions(-)
...
git push origin master
Uploading LFS objects: 100% (39/39), 13 MB | 0 B/s, done
Counting objects: 358, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (83/83), done.
Writing objects: 100% (358/358), 142.26 KiB | 9.48 MiB/s, done.
Total 358 (delta 274), reused 333 (delta 258)
remote: Resolving deltas: 100% (274/274), completed with 245 local objects.
To https://github.com/pedberg-icu/icu.git <https://github.com/pedberg-icu/icu.git>
63252eb..8873b10 master -> master
Appeared to work OK.
- Peter E
|
Mostly just adjusting comments as noted below; the only real change is in unumberformatter.h (last item):
Checklist