| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | |
| |
| |
| |
| |
| | |
Bug: 160356314
Test: atest CtsIcu4cTestCases CtsIcuTestCases CtsLibcoreTestCases CtsLibcoreOjTestCases CtsBionicTestCases CtsTextTestCases
Change-Id: I068d42d5184a169cd5b6291a383e4d161f84a286
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updated javadocs.
Imported methods:
* long dividedBy(Duration divisor)
* long toDaysPart()
* int toHoursPart()
* int toMinutesPart()
* int toSecondsPart()
* int toMillisPart()
* int toNanosPart()
* Duration truncatedTo(TemporalUnit)
Test: atest CtsLibcoreOjTestCases:tck.java.time.TCKDuration
Change-Id: Ie976bec8224cd7eb0e2d91956b081202fdb022a6
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Imported NANOS_PER_MILLI constant, updated javadocs.
Imported methods:
* LocalTime ofInstant(Instant, ZoneId)
* long toEpochSecond(LocalDate, ZoneOffset)
Added unit test from upstream.
Test: n/a
Change-Id: I814f1e9239c5b672e48bd54dabd0703927b91eea
|
| |
|
|
|
|
|
|
| |
No known functional change.
Bug: 139480281
Test: atest CtsLibcoreOjTestCases
Change-Id: I29754bc25541f0b295a97b3a5c0d225f31454dd1
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CLs https://r.android.com/1237091 and https://r.android.com/940636
integrated two upstream OpenJDK commits to finalize support for
new Japanese Era Reiwa:
* http://hg.openjdk.java.net/jdk/jdk/rev/6a4abdb6749c
8174268: Declare a public field in JapaneseEra for the era starting May 2019
* http://hg.openjdk.java.net/jdk/jdk/rev/3d8934bf505a
8205432: Replace the placeholder Japanese era name
This CL adds the appropriate change markers for the differences
relative to the respective upstream revision
(OpenJDK 8u121-b13 or 8u222, depending on the file).
Bug: 149437171
Test: CtsLibcoreTestCases CtsLibcoreOjTestCases
Change-Id: I182bc98a374c127b2e6cee41991427f4fe5b9b54
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Integrate OpenJDK commit for new Japanese Era name:
* 8174268: Declare a public field in JapaneseEra for the era starting May 2019
http://hg.openjdk.java.net/jdk/jdk/rev/6a4abdb6749c
Bug: 149437171
Test: CtsLibcoreTestCases CtsLibcoreOjTestCases
Merged-In: I3e84ed1d809376d2c646ceadc3421b5fb55982b5
Change-Id: I3e84ed1d809376d2c646ceadc3421b5fb55982b5
|
| |
|
|
|
|
|
|
| |
data from icu65.1
Bug: 138853239
Test: atest CtsLibcoreOjTestCases:test.java.time.format.TestDateTimeTextProvider
Change-Id: Ib01fc67914523b81d253db1a2d43d9e17076520c
|
| |
|
|
|
|
|
|
|
|
|
| |
This comment has been removed in the upstream commit
http://hg.openjdk.java.net/jdk/jdk/rev/3d8934bf505a#l15.25 and should
have also been removed in http://r.android.com/940636, but we missed
that during merging.
Bug: 77858319
Test: m droid
Change-Id: Ifa1b08e72328aaefd48a615a445e2331e9407d5f
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change should have been done as a part of
http://r.android.com/940636 but was accidentally missed
during merging. It includes the following upstream commit:
8205432: Replace the placeholder Japanese era name
http://hg.openjdk.java.net/jdk/jdk/rev/3d8934bf505a
Bug: 77858319
Test: cts-tradefed run cts-dev -m CtsLibcoreOjTestCases
Test: cts-tradefed run cts-dev -m CtsLibcoreTestCases
Change-Id: Ie74af5b9cb5559a829cbb671f87fd791d1680d8b
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Integrate OpenJDK commit for new Japanese Era name:
- 8205432: Replace the placeholder Japanese era name
http://hg.openjdk.java.net/jdk/jdk/rev/3d8934bf505a
Bug: 77858319
Test: CtsLibcoreTestCases
Test: CtsLibcoreOjTestCases
Change-Id: Ic07b536e7fd62b2d3e0fe4e9edd36d6c6f183b06
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This integrates all upstream changes up to OpenJDK 8u212-b01
It consists the following commits from upstream
- 8202088: Japanese new era implementation
http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/bc0a3a91a074
- 8212941: Support new Japanese era in java.time.chrono.JapaneseEra
http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/c35f231af17a
- 8171049: Era.getDisplayName doesn't work with non-IsoChronology
http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/3cb43f3afe1c
- 8177678: Overstatement of universality of Era.getDisplayName() implementation
http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/49bcab3213c1
- 8054214: JapaneseEra.getDisplayName doesn't return names if it's an additional era
http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/0d9af9ca16e2
new Android-changed:
- JapaneseImperialCalendar.currentEra is changed to be hard-coded
because Zygote could initialize currentEra with incorrect system time.
- TestNonIsoFormatter#test_lenientEraYear is updated to use CLDR data
Bug: 77858319
Test: CtsLibcoreTestCases
Test: CtsLibcoreOjTestCases
Change-Id: I74b05bcbd39c5caec48c0de13e784127044b19ff
|
| |
|
|
|
|
|
|
|
|
| |
- Blacklist StringTest.test_23831 test until b/69599767 is fixed
- Other tests are changed due to changes in CLDR data (version 31 -> 32)
Bug: 68208236
Test: CtsLibcoreOjTestCases
Test: CtsLibcoreTestCases
Change-Id: Ic295f81c6140441876a3cf53b88affcc0001b9cd
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I accidentally reverted a change in TestFormatter to TestFormatter.java
in commit If50d927265136e8de964b54ae879291c7be85cfc.
Since the original change was unrelated to DecimalFormat, reverting it
was not supposed to happen in that commit.
The issue was not caught because CtsLibcoreOjTestCases wasn't run for
that test (only CtsLibcoreTestCases).
Bug: 69418703
Test: CtsLibcoreOjTestCases
(cherry picked from commit 044bd5e685b4bd9302ace9f77b7339cbe7e6f893)
Change-Id: I4c1935cc120966035e2891a41791fe563e308db1
Merged-In: If6a2dbb615a70739350cbae91cc33754afe2b793
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
java.text.DecimalFormat delegates most behaviour to
android.icu.text.DecimalFormat.
ICU 59 introduced a variety of behaviour changes many of which are not
desireable to inherit for java.text.DecimalFormat.
This changes java.text.DecimalFormat to delegate to
android.icu.text.DecimalFormat_ICU58_Android instead. This class is the
ICU 58 implementation of DecimalFormat that ICU ships for testing
purposes only.
This is a stop-gap measure until we can get the new implementation
configured in a way to be close enough to the old behaviour to use in
java.text.DecimalFormat.
This commit also partially reverts the test that were changed to
accomodate the switch to ICU 59 in commit
51f8d749d3100694d695fa0cd32d2fb99c02ba74.
The reason the revert is only partial is that not all test changes were
caused by code changes. A significant portion was caused by CLDR changes
which still affect us, even if we use DecimalFormat_ICU58.
Bug: 68143370
Test: CtsLibcoreTestCases
Change-Id: If50d927265136e8de964b54ae879291c7be85cfc
|
| |
|
|
|
|
|
|
|
|
| |
A 2017c data change for historic transitions broke one
of the upstream tests. See also
https://bugs.openjdk.java.net/browse/JDK-8190259
Bug: 68878031
Test: run cts -m CtsLibcoreOjTestCases -t tck.java.time.zone.TCKZoneRules
Change-Id: I6c15c0a19202d1ad90ec7d05b6e01750e0815849
|
| |
|
|
|
|
|
| |
Bug: 62410016
Test: CtsLibcoreOjTestCases
Test: CtsLibcoreTestCases
Change-Id: I49de49cd356f6e28429e4fc22d493f77b5efe4c5
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TCKLocalizedPrinterParser checks if java.time.format.DateTimeFormatter
and java.text.DateFormat produce the same output for equivalent input.
java.text.DateFormat takes into account DateFormat.is24Hour which
represents a user-setting forcing a 12- or 24-hour clock. java.time
intentionally doesn't respect that, which causes this test to fail when
either a 12h or a 24h clock is forced.
This commits clears the setting for the duration of the test and re-sets
it to its orginal value afterwards.
Test: cts --primary-abi-only -m CtsLibcoreOjTestCases
Bug: 62651881
Change-Id: I30bab1d5f04cac8bdfc9a455c8ddc3ff39271077
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL consists of an automated and a manual part (originally
reviewed as separate CLs, then squashed together before submitting
in order to minimize the number of times each Android-changed line
is touch, since that makes future git archaeology on these simpler).
Automated part: Run the following command (performs regex replacements):
find ojluni -name \*\.java | xargs sed -i \
-e 's/Android[- ]changed/Android-changed/ig' \
-e 's/Android-changed :/Android-changed:/g' \
-e 's/Android-changed \(BEGIN\|END\)/\1 Android-changed/g' \
-e 's/Android-changed - /Android-changed: /g' \
-e 's/Android[- ]removed/Android-removed/ig' \
-e 's/Android-removed :/Android-removed:/g' \
-e 's/Android-removed \(BEGIN\|END\)/\1 Android-removed/g' \
-e 's/Android-removed - /Android-removed: /g' \
-e 's/Android[- ]added/Android-added/ig' \
-e 's/Android-added :/Android-added:/g' \
-e 's/Android-added \(BEGIN\|END\)/\1 Android-added/g' \
-e 's/Android-added - /Android-added: /g' \
-e 's/----- \(BEGIN\|END\) android\( -----\)\?/\1 Android-changed/g' \
-e 's/\/\* \(BEGIN\|END\) Android-changed \*\//\/\/ \1 Android-changed/g'
Manual part: Move BEGIN Android-* lines out of block comments
Some Android-{changed,removed,added} lines occurred inside block comments.
This CL targets places in ojluni that contained the String "* BEGIN Android-"
Changes made by this CL include:
- Move the "BEGIN Android-" line into a line comment (the style guide
mandates that "Android-" lines are always in line comments). In many
cases, that line comment is immediately followed by a block comment
holding commented-out upstream code.
- Add corresponding "// END Android-" line comments, where missing.
- Drop documented import changes altogether. These create noise for
little benefit:
(1.) Most import problems will be found at compile time
(2.) They generally correspond to documented changes elsewhere in
the file.
- In most cases, the phrasing of comments and the decision whether to
keep commented out upstream code was not changed by this CL.
- Some additional tweaks were made in line with the style guide.
No attempt was made to:
- Verify that commented-out upstream code actually matches the
current upstream.
- Make any fixes (eg. to comments) that would have required
git archaeology (looking up historic commits).
Bug: 35841464
Test: make droid cts update-api
Change-Id: Ibc60979cb6061cfb0e9c7096cc9dcab30ddfa733
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Add missing comments for Android additions/changes
- Clarify the extent of changes with existing comments by
introducing BEGIN/END lines.
- Fix typo in Android-added @hide method name
getJapanesImperialInstance()
Consideration whether each change is correct or should be upstreamed
is not part of this CL.
Bug: 35235723
Test: make droid cts
Change-Id: I5fa9565162b62c1d4ce51875c7b83a000ef1b289
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reapplies commit ca2b1f0f50392f5a8e91a3d5513ea850ba4e686b.
The original commit was reverted. It had broken DateTest because
it changed the minimum/maximum Instant that is convertible to Date.
Those boundaries are undocumented; the old behavior was more
arbitrary and was never launched in Android. Therefore, it's
reasonable to just update the test.
This CL reapplies the original change and updates DateTest accordingly.
Test: DateTest
Test: CtsLibcoreTestCases
Bug: 31028374
Bug: 35245079
This reverts commit 18db57ad9257a1ba0451fa808294066e8f329287.
Change-Id: I8dd24ac6f0d0d5f58d2d0bb51404ba5c8ced2473
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Reason: likely that this CL broke libcore.java.util.DateTest
Bug: 35245079
This reverts commit ca2b1f0f50392f5a8e91a3d5513ea850ba4e686b.
Change-Id: I867b18f3123f45e6fd04bba70c4e44cc8cd402b8
|
| |\| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Ported from openjdk8u121
changeset: 11000:2fdb5825ea0a
user: igerasim
date: Sat Aug 08 03:25:36 2015 +0300
summary: 8133022: Instant.toEpochMilli() silently overflows
changeset: 10999:492f4fb4a130
user: igerasim
date: Sat Aug 08 03:23:52 2015 +0300
summary: 8074032: Instant.ofEpochMilli(millis).toEpochMilli() can throw arithmetic overflow in toEpochMilli()
Test: CtsLibcoreTestCases & CtsLibcoreOjTestCases
Bug: 31028374
Change-Id: If2856c62e60e0cf2330f70e23acecdb23475d5aa
|
| |/
|
|
|
|
|
|
|
|
|
|
|
| |
Ported from openjdk8u121
changeset: 11249:17ed74f96963
user: robm
date: Fri Dec 04 18:40:59 2015 +0000
summary: 8067800: Clarify java.time.chrono.Chronology.isLeapYear for out of range years
Test: CtsLibcoreTestCases & CtsLibcoreOjTestCases
Bug: 31028374
Change-Id: I0f515a82a36af1f6da0186510d2c5ca808f3a41a
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The main change is that it now supports formatting of java.time types.
- Adapt relevant test to Android sepcifics.
- Add Android-changed comments where appropriate
- Removed unused mantissa() and exponent() methods
Bug: 28832222
Test: run cts -m CtsLibcoreOjTestCases
Change-Id: I8a5de3f4bd39b6bad09850d4e5329a54331a2315
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Add necessary resources to CTS target for Chronology tests.
Also modify TestServiceLoader to avoid the assumption that the system
classloader will always see test resources (does not hold true in CTS).
Bug: 28832222
Test: run cts -m LibcoreOj -t test.java.time.chrono.TestServiceLoader
Test: run cts -m LibcoreOj -t tck.java.time.chrono.TCKTestServiceLoader
Change-Id: I831d71d12a47107ef0011a7e171da7639eb34184
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several java.time tests use @BeforeMethod to populate a field that is
used as in @DataProvider methods. @BeforeMethod runs after @DataProvider
is executed, 'though.
The only reason this worked is because the first test that's run in
those tests doesn't use the @DataProvider, so by the time it's executed,
the field will already have been populated.
Change the field initialization to use @BeforeClass and change the
affected fields to static.
Test: CtsLibcoreOjTestCases
Bug: 28832222
Change-Id: I499dde830a456dced8375632c45801640f795e33
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- disable test_ParseText() as it doesn't assert anything and produces a
lot of unnecessary output
- only run one iteration of test_printText(), as the test takes a very
long time to run and has not revealed any problems in any iterations
other than the first.
- skip non-canonical time zone ids, as they have errors in
TimeZone.getDisplayName(): http://b/33197219
- skip locales "ji", as it doesn't seem to correctly load timezone names
in TimeZone.getDisplayName(), possibly due to http://b/8634320
- TimeZone.getDisplayName() will never return strings starting with "GMT",
so accept "GMT+00:00" as equivalent.
- modify order of iteration to iterate over locales before timezones, as
the original order was significantly slower on Android.
Bug: 28832222
Test: ran test.java.time.format.TestZoneTextPrinterParser
Change-Id: I658ab09ba6da5f1a9647bc81614410ba30199b2f
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify test assumptions that are not true on Android, for several
reasons:
- java.time RI uses non-CLDR data sources by default which has slightly
different data, whereas Android basically uses CLDR for almost
everything.
- Arabic locale actually uses arabic digits
- Portuguese month names are not capitalized in CLDR
- Russian month names are not capitalized in CLDR and use a full stop
after abbreviations
- java.time RI uses an older CLDR version, so many data points such as
format patterns have seen significant changes in the one we use
(currently CLDR 31).
- field names use lower case for locale en in CLDR
- change Locale in TCKFormatStyle because en_US doesn't use "CEST" as an
abbreviation for european time zones in CLDR, but en_GB does.
- TCK ZoneRule assumes an optimization that our data source doesn't
contain and are not necessary for correct operation.
Bug: 28832222
Test: artrun testng-time.xml
Change-Id: I42edefb052c9c2f007f971abe70740feb92a3a17
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- move chronology service registration file to directory that's actually
used for tests.
- Update expected calendar names to current CLDR data in TCKChronology
- Disable test that depends on Calendar supporting buddhist calendar
- delete unneeded TEST.properties
Bug: 28832222
Test: artrun testng-time.xml
Change-Id: I294e2dbce88495cbc6c792bb76caecdb5fffe4ff
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The JapaneseChronology class depends on the ImperialJapaneseCalendar
being returned by Calendard.getInstance(). Since Android always returns
a GregorianCalendar from that class, the tests will fail.
This fixes the problem by importing the JapaneseImperialCalendar class
from the OpenJDK (with minor tweaks to remove mentions of the ZoneInfo
class) and adapting the relevant classes to use a new explicit method on
Calendar to request such a calendar instance.
Also apply update LocaleGregorianCalendar to jdk8u60 which fixes an
off-by-one error in calculations related to eras.
Added ChronologyDisplayNameTest to ensure future Chronologies return
sane values for their display name and their eras display names.
Bug: 28832222
Test: artrun testng-time.xml
Test: run cts -m CtsLibcoreTestCases
Change-Id: I3eb5d4509ad03ee3d736c7926c605f378b56d0b2
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a difference in how java.time on the OpenJDK treats time zone
names and how Android as a whole treats them, specifically when it comes
to the short names (abbreviations) of zones.
Android uses the CLDR data exclusively. CLDR only includes time zone
abbreviations in a given locale when that abbreviation is widely used in
that locale (for example: "CST" is "Central Standard Time" in en_US).
Other abbreviations that are arguably correct, but are not widely known
or used are not included in the data, such as "CST" for "Chinese
Standard Time". This means that there are rarely conflicts in the
abbreviations and no resolution mechanism is needed (and in fact ICU
doesn't provide one).
java.time in the OpenJDK (as well as other time zone name handling
methods) has abbreviations for almost every zone, even when the zones
are rarely used. This of course leads to many conflicts (such as CST for
Central Standard Time and Chinese Standard Time).
This port of java.time will stay consistent with how Android as a whole
handles time zone names and will use the ICU/CLDR data. This means that
many tests that expect specific results will fail.
Bug: 28832222
Test: compiles, fewer tests fail
Change-Id: Ic23c2795a440d61d97db8c4c44cfd35a053c0105
|
|
|
This is a verbatim copy of the classes in java.time from the jdk8u60
branch of the OpenJDK.
They are not yet part of the build and wouldn't compile yet (no local
modifications whatsoever).
Bug: 28832222
Test: Not build, not tested.
Change-Id: I8bb148cb1095b08af895c4abffed9f22b107c218
|