Rich Gillam [Wed, 31 Aug 2022 00:43:30 +0000 (17:43 -0700)]
ICU-22081 More API-review fixes: Hoisted the PersonName object to the top level (in its own source file) and moved
NameField and FieldModifier there, plus a number of smaller changes.
Rich Gillam [Sat, 27 Aug 2022 01:21:21 +0000 (18:21 -0700)]
ICU-22081 Addressed review comments:
- Changed all public Javadoc to use the proper verbiage for identifying this code as
a tech preview.
- Changed all references to ULocale in the API to use Locale instead.
- Changed PersonNameFormatter and SimplePersonName so that they're constructed by way
of separate builder objects.
- Added an internal constructor for PersonNameFormatter just for the use of the unit tests,
and added some unit tests that take advantage of the new constructor to test the internals
more thoroughly.
- Renamed format() to formatToString(), to make room to add a format() method later that
returns a FormattedPersonName.
- Added logic to guess the locale of a name object when the name object doesn't supply
a locale.
- Moved the function that constructs a SimplePersonName from a single string containing
key-value pairs out of the API and into the unit tests.
- Various smaller changes in response to API- and code-review comments.
The makefile hardcodes paths to the build directory into icu-config. It doesn’t
need to do this and it unnecessarily breaks build reproducibility. This patch
makes a simple change to avoid this.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Andy Heninger [Tue, 10 May 2022 00:29:04 +0000 (17:29 -0700)]
ICU-21946 RBBI Break Cache Optimizations
Adjust RuleBasedBreakIterator::BreakCache::populateNear() to retain the cache
the cache contents in additional cases where are still useful, resulting in
improved performance.
This change is related to PR #2039, which addressed the same problem. This one
retains the cache contents in more situations.
Mihai Nita [Thu, 28 Jul 2022 22:23:39 +0000 (15:23 -0700)]
ICU-22101 Error prone reports "StringSplitter" error in PluralRules.java
String.split(String) and Pattern.split(CharSequence) have surprising behaviour.
"a::b:".split(":") produces ["a", "b"], when one would expect ["a", "", "b", ""]
The recommended fix is to use the Guava Splitter, or setting an explicit limit:
String.split(String,int limit) and Pattern.split(CharSequence,int limit)
ICU-22075 Adds a random waiting period (0 - 179 secs) to each test that runs as
part of a high concurrency performance test setup. This will disperse commits
of performance test results into the data branch over a wider time frame and
drastically reduces the chance of data uploads failing after ten unsuccesful
commit attempts.
Test runs showed a huge drop in failed commits/retry, from a high of 113
without wait down to only 4 with the extra wait.
ICU-22075 Add comment explaining the rationale of the random
sleep period prior to test execution.
Cyndy Ishida [Mon, 6 Jun 2022 23:18:50 +0000 (16:18 -0700)]
ICU-22054 Remove declarations for unimplemented APIs
This patch also includes marking `=delete` on specific `normal` member functions, as opposed to compiler generated functions,
based on the description of such functions' surrounding comments.
gnrunge [Wed, 8 Jun 2022 21:26:47 +0000 (14:26 -0700)]
ICU-21997 Fixes currency code retrieval for locale: instead of selecting the
first currency in the list now select the first legal tender currency in the
list. Or the first currency if the list has no legal tender currencies (which
is the previous behaviour).
ICU-21997 Removed an overlooked earlier unit test attempt.
ICU-21997 Shields C++ unit test from compilation when configuration flag
UCONFIG_NO_FORMATTING is set.
gnrunge [Wed, 8 Jun 2022 22:25:37 +0000 (15:25 -0700)]
ICU-22036 Modify ICU4J performance test framework to work when executed by
GitHub Action. This includes introducing a new flag (-a) to indicate
invocation from command line/GHA shell, moving elements of the workflow
from Perl into the Java framework (calculation of iteration numbers), and
generating NDJSON output for GitHub Benchmark processing.
Backward compatibility with the Perl script invocation has been preserved.
ICU-22036 Adds a comment clarifying the reason why NDJSON output is generated.
agrieve [Mon, 2 May 2022 17:13:41 +0000 (13:13 -0400)]
ICU-21960 Add missing "const" to kAttributeKey
This variable was flagged by a chromium check that looks for variables named like constants that end up in the `.data` ELF section (rather than in `.rodata`).
Peter Edberg [Wed, 25 May 2022 22:39:19 +0000 (15:39 -0700)]
ICU-21957 integrate CLDR release-42-m1 (early milestone) to ICU main for 72 (rebased on main) +
FormattedStringBuilderTest::testInsertOverflow infolns,logKnownIssue skip for CI exhaustive crash
gnrunge [Fri, 13 May 2022 22:21:41 +0000 (15:21 -0700)]
ICU-22030 Modifies GHA CI performance testing so that existing files in the
performance results publishing repository are no longer deleted when the test
results are forwarded. This concretely affects the README file in the icu-perf
repository, which got deleted with the first data transfer.
Restoring the README file in icu-perf will be a complementary PR.
ICU-21984 Fix DateIntervalFormat.normalizeHourMetacharacters() so that it doesn't require the hour and day-period
fields to appear in any particular order or position in the skeleton string.
Markus Scherer [Wed, 23 Mar 2022 20:42:34 +0000 (13:42 -0700)]
ICU-21953 remove outdated ucdterms.txt
This is an old version of the Unicode license from 2004,
when the ICU license was different from the Unicode license.
We should have removed this file in 2016,
when the Unicode license was revised,
and when the ICU project became a project of the Unicode Consortium,
adopting the Unicode license for all of ICU.
Since 2016, the Unicode data files are covered by the same license as the
top license text in the ICU LICENSE file.