• Home
  • History
  • Annotate
  • only in /libcore/harmony-tests/src/test/java/
History log of /libcore/harmony-tests/src/test/java/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
a072e981b99e7dd0ecc0be06d8c237e41179a6b4 23-Feb-2018 Andreas Gampe <agampe@google.com> Libcore: Suppress CollectionIncompatibleType in tests

Some tests check the correct behavior for incompatible types.

Bug: 73288226
Test: m javac-check RUN_ERROR_PRONE=true
Change-Id: I10fd4bf48438d4419b3ba82f27f3f73b2429c6f7
rg/apache/harmony/tests/java/util/EnumSetTest.java
rg/apache/harmony/tests/java/util/HashMapTest.java
rg/apache/harmony/tests/java/util/PriorityQueueTest.java
7f0e2447adb88a673df11f9facf722e432310e1e 20-Feb-2018 Andreas Gampe <agampe@google.com> Libcore: Mark test functions with dead threads

Bug: 73644270
Test: m javac-check RUN_ERROR_PRONE=true
Change-Id: Id2db1d6dbae7a0dbd0527bae379a842c79004c71
rg/apache/harmony/tests/java/lang/ThreadGroupTest.java
rg/apache/harmony/tests/java/lang/ThreadTest.java
0c0afb8fbd41051b688f3d06fcd96b89db6d4bce 13-Feb-2018 Andreas Gampe <agampe@google.com> Libcore: Suppress FormatString warnings in tests

Suppress warnings of incorrect format strings in tests.

Bug: 72451126
Test: m javac-check RUN_ERROR_PRONE=true
Change-Id: Ic97b84cbed915b557a2ee83d0d24c46c3bbda6db
rg/apache/harmony/tests/java/lang/String2Test.java
rg/apache/harmony/tests/java/util/FormatterTest.java
3e8ed63d0a4f974f8929cf44d7e77a3baa25f321 07-Feb-2018 Pete Gillin <peteg@google.com> Make NetworkInterface.isUp() test for IFF_RUNNING.

This makes java.net.NetworkInterface.isUp() return true only if the
interface has both IFF_UP and IFF_RUNNING flags set. This restores the
behaviour of nougat[1], and makes the behaviour match the javadoc. The
behaviour in oreo[2] was changed during a rewrite[3] which replaced
the native implementation with a pure java implementation that dropped
the IFF_RUNNING check (compare the new java code with the removed
native code). There is no evidence that this behaviour change was
intentional.

This change also reverts the changes to CTS made for oreo to work
around the behavioural change.

This reverts commit acd3bea08043a3c0a4272f1584f9f5475c550bb2.

[1] https://android.googlesource.com/platform/libcore/+/nougat-release/ojluni/src/main/native/NetworkInterface.c#393
[2] https://android.googlesource.com/platform/libcore/+/oreo-release/ojluni/src/main/java/java/net/NetworkInterface.java#452
[3] https://android-review.googlesource.com/c/platform/libcore/+/231080

Bug: 71977275
Test: cts-tradefed run cts-dev -m CtsLibcoreTestCases
Change-Id: I75066e49c5f864828adc928cc3687311f2f05011
rg/apache/harmony/tests/java/net/MulticastSocketTest.java
0239cd8c6db469d96487c1a56033a39365c9c65b 25-Jan-2018 Andreas Gampe <agampe@google.com> Libcore: Fix or suppress EqualsNaN warning in tests

The FloatTest/DoubleTest explicitly check for NaN comparison. Ignore
the errorprone warning.

Fix incorrect comparison in MathTest.

Bug: 72451126
Test: m javac-check RUN_ERROR_PRONE=true
Change-Id: I24bbfbc468162765c29f9fbfea3f20e4b2007059
rg/apache/harmony/tests/java/lang/DoubleTest.java
rg/apache/harmony/tests/java/lang/FloatTest.java
rg/apache/harmony/tests/java/lang/MathTest.java
ea6650b3c72b5c463f8ee656d17ec7146f0f4a94 15-Jan-2018 Treehugger Robot <treehugger-gerrit@google.com> Merge "Add additional checks to multicast tests"
b9de38da5633c5e87201d9a6dbe56e100f206966 15-Jan-2018 Neil Fuller <nfuller@google.com> Add additional checks to multicast tests

MulticastSocketTest and DatagramChannelMulticastTest have identical
requirements for picking network interfaces but the logic was
slightly different. This commit brings them into line.

Also, Nougat used to check the IFF_RUNNING flag in
NetworkInterface.isUp() as well as IFF_UP, but this stopped in Oreo.
The IFF_RUNNING flag check is added explicitly in the tests here since
the tests cannot work over an interace that is not "running" either.

See issue 71977275 for the bug that considers altering isUp() behavior.

Bug: 71977275
Bug: 65037707
Test: CTS: run cts -m CtsLibcoreTestCases -t org.apache.harmony.tests.java.net.MulticastSocketTest
Test: CTS: run cts -m CtsLibcoreTestCases -t libcore.java.nio.channels.DatagramChannelMulticastTest
Change-Id: I227a436ff19f2c235d2a3e567fcfc55c909b47fd
rg/apache/harmony/tests/java/net/MulticastSocketTest.java
03cbe422f0065e289f84ee063a1f18e894edcfba 12-Jan-2018 Tobias Thierer <tobiast@google.com> Merge "Track behavior change in default HostnameVerifier."
2259a71ba68c8b2d0d74396277fd25cdc0692350 22-Dec-2017 Victor Chang <vichang@google.com> Make the Android fast-path UTF-8 decoder follow the Unicode Standard and the W3C Encoding standard.

The behavior of UTF-8 decoder in the RI has been made to strictly
follow the Unicode standard since OpenJDK 8. JDK-7096080
Essentially, it rejects
1. 3-byte surrogate/6-byte surrogate pair (CESU-8 sequence)
2. treats an ill-formed sequence, e.g. a surrogate, as individual ill-formed bytes.

This change updates Android's fast-path UTF-8 decoder to
- follow the Unicode standard
- have a behavior closer to RI OpenJDK 8
- have consistent behavior between java.nio.charset.CharsetDecoder and fast-path code

It implements the W3C recommended UTF-8 decoder.
https://www.w3.org/TR/encoding/#utf-8-decoder

Behavior change of the fast-path UTF-8 decoder
- No longer behaves like a decoder for Modified UTF-8 and CESU-8 sequence
-- If an app needs to decode a Modified UTF-8 / CESU-8 sequence,
the app can use public API DataInputStream.readUTF or JNI function NewStringUTF
See example at StringTest.decodeModifiedUTF8
- Treat overlong sequence as ill-formed.
For example, byte sequence "c0 b1" is over-long form of character '1' U+0031.
- Treat surrogate (U+D800..U+DFFF) as ill-formed
- Maximal subpart should be replaced by a single U+FFFD.
For example, in byte sequence "41 C0 AF 41 F4 80 80 41", the maximal subparts are
"C0", "AF", and "F4 80 80". "F4 80 80" can be the initial subsequence of "F4 80 80 80",
but "C0 AF" can't be the initial subsequence of any well-formed code unit sequence.
Thus, the output should be "A\ufffd\ufffdA\ufffdA".

Test change:
- CharsetEncoder2Test.testUtf8Encoding: UTF-8 encoded Surrogate is treated as invalid
- X500PrincipalTest.testValidDN: Overlong sequence is now treated as invalid.
According to my test, Android Conscrypt (and BoringSSL) has rejected a certificate with
such overlong sequence in CN since OC MR1. Thus, it has little use case to create
X500Principal with overlong UTF-8 sequence.
Also, RI doesn't pass this test either.
Context: From my understanding, certificate and X500 principal are stored
in ASN.1 format. The RFC standards quoted in X500Principal don't
prohibit overlong UTF-8 sequences. But the new standards RFC5280 for X.509
and RFC3629 for UTF-8 explicitly prohibits any overlong UTF-8 sequences.

Performance change:
The performance of the fast-path decoder is similar before and after the change.

=== Before the change ===
CharsetBenchmark
Experiment {instrument=runtime, benchmarkMethod=time_new_String_BString, vm=default, parameters={length=10000, name=UTF-8}}
Results:
runtime(ns): min=574795.84, 1st qu.=574795.84, median=574795.84, mean=574795.84, 3rd qu.=574795.84, max=574795.84
Trial Report (1 of 4):

CharsetUtf8Benchmark
Experiment {instrument=runtime, benchmarkMethod=time_ascii, vm=default, parameters={}}
Results:
runtime(ns): min=58290943.00, 1st qu.=58290943.00, median=58290943.00, mean=58290943.00, 3rd qu.=58290943.00, max=58290943.00
Trial Report (2 of 4):
Experiment {instrument=runtime, benchmarkMethod=time_bmp2, vm=default, parameters={}}
Results:
runtime(ns): min=77581414.00, 1st qu.=77581414.00, median=77581414.00, mean=77581414.00, 3rd qu.=77581414.00, max=77581414.00
Trial Report (3 of 4):
Experiment {instrument=runtime, benchmarkMethod=time_bmp3, vm=default, parameters={}}
Results:
runtime(ns): min=57457297.00, 1st qu.=57457297.00, median=57457297.00, mean=57457297.00, 3rd qu.=57457297.00, max=57457297.00
Trial Report (4 of 4):
Experiment {instrument=runtime, benchmarkMethod=time_supplementary, vm=default, parameters={}}
Results:
runtime(ns): min=60723183.00, 1st qu.=60723183.00, median=60723183.00, mean=60723183.00, 3rd qu.=60723183.00, max=60723183.00

=== After the change ===
CharsetBenchmark
Experiment {instrument=runtime, benchmarkMethod=time_new_String_BString, vm=default, parameters={length=10000, name=UTF-8}}
Results:
runtime(ns): min=523638.25, 1st qu.=523638.25, median=523638.25, mean=523638.25, 3rd qu.=523638.25, max=523638.25
CharsetUtf8Benchmark
Trial Report (1 of 4):
Experiment {instrument=runtime, benchmarkMethod=time_ascii, vm=default, parameters={}}
Results:
runtime(ns): min=57101725.00, 1st qu.=57101725.00, median=57101725.00, mean=57101725.00, 3rd qu.=57101725.00, max=57101725.00
Trial Report (2 of 4):
Experiment {instrument=runtime, benchmarkMethod=time_bmp2, vm=default, parameters={}}
Results:
runtime(ns): min=76573080.00, 1st qu.=76573080.00, median=76573080.00, mean=76573080.00, 3rd qu.=76573080.00, max=76573080.00
Trial Report (3 of 4):
Experiment {instrument=runtime, benchmarkMethod=time_bmp3, vm=default, parameters={}}
Results:
runtime(ns): min=59655214.00, 1st qu.=59655214.00, median=59655214.00, mean=59655214.00, 3rd qu.=59655214.00, max=59655214.00
Trial Report (4 of 4):
Experiment {instrument=runtime, benchmarkMethod=time_supplementary, vm=default, parameters={}}
Results:
runtime(ns): min=67283548.00, 1st qu.=67283548.00, median=67283548.00, mean=67283548.00, 3rd qu.=67283548.00, max=67283548.00

Test: cts-tradefed run cts-dev -m CtsLibcoreTestCases
Test: cts-tradefed run cts-dev -m CtsLibcoreOjTestCases
Bug: 69599767
Bug: 70511691
Change-Id: I2c3e84808b19c969905813f6654ba552b6745354
rg/apache/harmony/tests/java/nio/charset/CharsetEncoder2Test.java
rg/apache/harmony/tests/javax/security/auth/x500/X500PrincipalTest.java
70bd0982aa6ed2603615df8a963f285b91872c87 10-Jan-2018 Tobias Thierer <tobiast@google.com> Track behavior change in default HostnameVerifier.

The default HostnameVerifier now ignores any CommonName
in the certificate provided by the server, even when no
subjectAltName is present.

Bug: 70278814
Test: CtsLibcoreTestCases (ran against an internal build
with this CL cherrypicked)
Change-Id: Ib6fa0c40d8903352e88d8812bf0c09ec1d8ef6be
rg/apache/harmony/tests/javax/net/ssl/HostnameVerifierTest.java
80339f4741bb174f9c6148b843ac0dcfc6422306 23-Nov-2017 Victor Chang <vichang@google.com> Sliently drop char 'b' or 'B' in j.t.SimpleDateFormat

- Avoid IllegalArgumentException when locale data uses pattern with 'b'/'B'
Sliently drop the char in pattern.
- Parsing fails if SimpleDateFormat contains 'b' / 'B' symbols

Bug: 68139386
Test: cts-tradefed run cts --module CtsLibcoreTestCases
Change-Id: I5231d6ca7ab164db0ffb15647caad3046d921cde
rg/apache/harmony/tests/java/text/SimpleDateFormatTest.java
a5a851ef18cf45152fc0901a07e2f6aa303ef702 24-Oct-2017 Joachim Sauer <jsauer@google.com> Use DecimalFormat_ICU58_Android in DecimalFormat.

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
rg/apache/harmony/tests/java/text/DecimalFormatTest.java
de9130d70313c0007b9c72b1c9ce8f52def14e78 14-Aug-2017 Joachim Sauer <jsauer@google.com> Merge "Updated test expectations for ICU 59."
am: 9f0a3ff5a3

Change-Id: Id681a7bb7ca228664670ff6089670e654b9361b2
51f8d749d3100694d695fa0cd32d2fb99c02ba74 29-Apr-2017 Fredrik Roubert <roubert@google.com> Updated test expectations for ICU 59.

Bug: 62410016
Test: CtsLibcoreOjTestCases
Test: CtsLibcoreTestCases
Change-Id: I49de49cd356f6e28429e4fc22d493f77b5efe4c5
rg/apache/harmony/tests/java/text/DecimalFormatTest.java
rg/apache/harmony/tests/java/util/ScannerTest.java
8af7f812ec0327458f79267c48a408d8e41ab052 09-Aug-2017 vichang <vichang@google.com> Merge "Fix DatagramSocketTest#test_getRemoteSocketAddress"
am: 9384e8ff4b

Change-Id: I75292690f7370e01a1f8cf3f7da83524347b8e65
9384e8ff4bd4103c3ee087a156adaa7bc7787ef4 09-Aug-2017 vichang <vichang@google.com> Merge "Fix DatagramSocketTest#test_getRemoteSocketAddress"
9a8e89adc057dad370a4d0479518051b06550ed1 07-Aug-2017 Victor Chang <vichang@google.com> Fix DatagramSocketTest#test_getRemoteSocketAddress

- The test fails due to recent kernel patch
https://source.codeaurora.org/quic/la/kernel/msm-4.4/commit/net/ipv6?h=rel/msm-4.4&id=23287661af3e2fd5a6a5a7bbe2b8f066203456e0
- getLocalHost() returns IPv4-mapped IPv6 address. The socket connects
from this source address to a IPv6 address, i.e. loopback address. This
is no longer allowed after the kernel patch.
- The purpose is to test connection from IPv6 to IPv6. Change source
address to IPv6 loopback address

Test: DatagramSocketTest#test_getRemoteSocketAddress Pass
with Nexus 6P linux kernel 3.10 with local patch

Bug: 64284671
Bug: 64438334
Bug: 64308860
Bug: 64325565

Change-Id: I0c82567b98e7b87454d603e39ffb9f6592e7fb61
rg/apache/harmony/tests/java/net/DatagramSocketTest.java
acfd9cbe0363ab56a89ef5da892e08bcb2f9e4a2 20-Jul-2017 vichang <vichang@google.com> Merge "Fix comments in Matcher.java and MatcherTest.java"
am: e92ad39933

Change-Id: I84709a1c0fa8eae09718b110cda4fb0deb7ceceb
4f5f16ccda77bc0448b42e4dc36da50e0c100591 19-Jul-2017 Victor Chang <vichang@google.com> Fix comments in Matcher.java and MatcherTest.java

Bug: 33737213
Test: cts-tradefed run cts -m CtsLibcoreTestCases --primary-abi-only
Change-Id: Id4147185591e1237fb99a231a8a39d831b9d3f48
rg/apache/harmony/tests/java/util/regex/MatcherTest.java
60541681530b834ee3da9cc9e20c22699d7a25e7 19-Jul-2017 Victor Chang <vichang@google.com> Merge "Fix Matcher.find and reset"
am: 6cdf9d3b7b

Change-Id: I4890aa9f34441b7e68e62900ef8ed725dca25737
6cdf9d3b7b28ef9ea1b229f13f04e92d620f72af 19-Jul-2017 Treehugger Robot <treehugger-gerrit@google.com> Merge "Fix Matcher.find and reset"
32a3cd748ffc25b46da4383aa948fd5f6bd0a7b9 18-Jul-2017 Pete Gillin <peteg@google.com> Merge "Fix the byte ordering behaviour of the UTF-16 Charset."
am: 4a2d046c17

Change-Id: I7af89ee880ff2cb284a5922e23bc595431b77807
c04007c41f7363f5f4cde7e19a582ac13adbc153 17-Jul-2017 Pete Gillin <peteg@google.com> Fix the byte ordering behaviour of the UTF-16 Charset.

The behavioural change here is that the UTF-16 Charset (obtained via
java.nio.charset.Charset.forName("UTF-16") or
java.nio.charset.StandardCharsets.UTF_16) now encodes Strings into
big-endian UTF-16 bytes with a byte-order marker, as the javadoc says
it does. Previously, it encoded as little-endian with a byte-order
marker. (Users wanting to encode as little-endian with a byte-order
marker can use x-UTF-16LE-BOM.)

The test changes are as follows.

CharsetTest#test_UTF_16: This was suppressed. It now passes thanks to
the above change, and we un-suppress it.

CharsetTest#test_UTF_16BE and _UTF_16LE: These were suppressed. We remove the
assertions about how it handles a reverse-BOM (i.e. a BOM with the
wrong byte order), and un-suppress them. The javadoc doesn't specify
how reverse-BOMs should be handled, so this change means we go from
not testing anything to testing the specified behaviour.

CharsetTest#test_x-UTF_16LE_BOM, _UTF_32, _UTF_32BE, UTF_32LE: These
were suppressed. The javadoc doesn't mention these, but developers
might reasonably expect them to exist and have sensible behaviour, and
they do, so we make some tweaks to the assertions and remove the
assertions about reverse-BOM-handling and un-suppress the tests. We
also remove the 'hack' which prevented it testing that UTF-32 exists,
since that doesn't seem to be needed any more.

CharsetTest#test_X_UTF_32BE_BOM, _X_UTF_32LE_BOM: These were
suppressed. We don't support these and don't expect to do so in the
foreseeable future, so we just remove the tests.

UTF16CharsetEncoderTest: Previously, this class overrode the
assertByteArray method in its superclass so that, instead of asserting
byte array equality, it just asserted that the byte arrays decoded to
the same strings. This made this test almost
endian-agnostic... although, presumably thanks to an oversight,
testDefaultValue was actually asserting that UTF-16 encodes as LE. We
remove the override and change the byte arrays so that the test now
asserts that UTF-16 encodes as BE as required.

OldCharset_MultiByte_UTF_16: This test asserts that UTF-16 encodes as
BE, and was suppressed. We un-suppress it.

OldCharset_MultiByte_UTF_16_Android: This test was a variant of the
previous one what asserted that UTF-16 encodes as LE. We remove it.

String2Test: Previously asserted that UTF-16 encodes as LE, now
correctly asserts that it encodes as BE. Also slightly strengthened
assertion.

Bug: 2702411
Fixes: 2702411
Bug: 37074504
Fixes: 37074504
Test: cts-tradefed run cts -m CtsLibcoreTestCases -a arm64-v8a
Change-Id: If174cd9ff0105008bd18a63e58ab3fa9a90c7475
rg/apache/harmony/tests/java/lang/String2Test.java
rg/apache/harmony/tests/java/nio/charset/CharsetTest.java
rg/apache/harmony/tests/java/nio/charset/UTF16CharsetEncoderTest.java
faa2342e585ce148d6de982106ec7b5735f07f1f 13-Jul-2017 Victor Chang <vichang@google.com> Fix Matcher.find and reset

- Matcher.find didn't call reset(), but according to the javadoc, it
should.
- reset() didn't obtain a fresh value from mutable CharSequence.
Given that the constructor uses CharSequence, it should obtain a new value
from the CharSequence and match it again

Added 2 tests to verify such behaviors accordingly

Bug: 33737213
Test: cts-tradefed run cts -m CtsLibcoreTestCases --primary-abi-only
Change-Id: I16ce01944b8c1baac9b7947d5551fb030eb95fc8
rg/apache/harmony/tests/java/util/regex/MatcherTest.java
603f3a3aeab60209867e728951670ee3278521ff 11-Jul-2017 Adam Vartanian <flooey@google.com> Merge "Update tests for synced changes to Conscrypt"
am: 8c7e6bd5c6

Change-Id: I9d5e803fc0feb1740168f94894d1f027a76d823e
7cbb18e35d842a151b66dbc709d653093ea2ac0e 05-Jul-2017 Adam Vartanian <flooey@google.com> Update tests for synced changes to Conscrypt

Mostly this is minor implementation changes or renamed classes.

Remove SSLSessionTest#test_getId because getSession() in Conscrypt returns
a wrapper around the underlying BoringSSL object, which we think is a valid
implementation but doesn't match the expectations of the test (which expects
it to match the properties of an existing SSLSession more closely). In
practice, nobody is likely to ever use this API, so it doesn't really matter.

Test: cts -m CtsLibcoreTestCases
Test: cts -m CtsLibcoreOkHttpTestCases
Test: cts -m CtsLibcoreWycheproofConscryptTestCases
Change-Id: I5a62e60141a4e68d5719bf1b71186d423378f78a
rg/apache/harmony/tests/javax/net/ssl/SSLSessionTest.java
252003da7d999d94b252be5dd006ccc83cc44b0f 28-Jun-2017 Neil Fuller <nfuller@google.com> Merge "Improvements to JarFileTest"
am: 19a19d34b3

Change-Id: I9c8d6386f320a2e147a033303a369905ff98ee33
ea6c306e556950b07b8897c10a89491ac55594e0 28-Jun-2017 Neil Fuller <nfuller@google.com> Improvements to JarFileTest

The main purpose of this change is to perform a cert chain
loop test on the main thread. The test is deterministic and
should not need additional threads. The test flaked on a
gc-stress environment.

The other changes are improvements to the code:
1) Close JarFiles that would otherwise be left open and left
to the finalizer to close.
2) Remove unnecessary File object creation that duplicates
a readily available File object return value and adds noise to
test code.

Test: Ran test under vogar
Change-Id: If67ebe4b6e3a384b39ceaf480ecd62939c6a732c
rg/apache/harmony/tests/java/util/jar/JarFileTest.java
aefa7c2fed3207caf9520357a717a4fd9d709c64 27-Apr-2017 Tobias Thierer <tobiast@google.com> Merge changes I4eeed196,I80f9bc4e am: 1244b48fd6 am: 96d9aa140b
am: 0264abe5a6

Change-Id: Ia05e694583690d223816d3bf33ceffb52a1fdb4a
a7794447c5d76087a7984757e5200a3e8f695efe 25-Apr-2017 Tobias Thierer <tobiast@google.com> Add test coverage for PrintStream autoflushing behavior.

The new tests check that after print/write-ing to a PrintStream,
the underlying OutputStream gets flush()ed if and only if
autoFlush is set to true, and that at least one of those flush()
calls happens after the last byte was written.

As documented, PrintStream.checkError() flushes regardless of
the autoFlush configuration.

During testing, it appeared that PrintStream.print()/println()/write()
calls result in exactly n + 1 invocations of flush(), where n is the
number of \n characters written. This seems a little generous, but is
within spec and matches RI behavior. The test was written to spec and
doesn't assert the particular number of calls to flush().

Test: make cts && cts-tradefed run cts -m CtsLibcoreTestCases -t \
org.apache.harmony.tests.java.io.PrintStreamTest
Change-Id: I4eeed19630a0a50af5a6dbc94d1e9fe6e11d0f31
rg/apache/harmony/tests/java/io/PrintStreamTest.java
5b8e053c8d0b8c4ecc24af65b43e9c1a0ea170d8 24-Apr-2017 Tobias Thierer <tobiast@google.com> Fix PrintStream ctor ignoring Charset parameter.

Libcore commit de626ec8a109ea18283d96c720cc57e2f32f67fa
changed PrintStream's fields charOut and textOut to be
lazily initialized from a (new) field charset, but
forgot to initialize that field in the constructor.

That lead to PrintStream always using the system default
encoding (UTF-8 on Android) when writing character data,
rather than the specified charset.

This CL fixes the PrintStream constructor to initialize
the charset field. It also tweaks the Android-changed
comments, and adds tests for the previously buggy ctor.

Since the original CL didn't specify a reason, it's not
clear why the change was made. It may be possible to
revert the entire change in future, or to contribute it
back to upstream.

Bug: 37313782
Test: PrintStreamTest

Change-Id: I80f9bc4e5a6f0b84867e402930dd517062169342
rg/apache/harmony/tests/java/io/PrintStreamTest.java
95cd0410e220e0548ae3544cf608d77c5090f584 17-Mar-2017 Yi Kong <yikong@google.com> Merge "Add test that socket created by accept is blocking" am: 864cbff34b am: bfe6ec1921
am: ff84c48dda

Change-Id: Ib5403f37bfc1767d0a2d190bf598861aa23f3064
36dc5b6f52d6b1dcf2e8d4380bed3929e86875f3 17-Mar-2017 Yi Kong <yikong@google.com> Add test that socket created by accept is blocking

Test: org.apache.harmony.tests.java.net.ServerSocketTest
Change-Id: Ia59d456694bd35f65b8cc5274a4cecf1ffd1c806
rg/apache/harmony/tests/java/net/ServerSocketTest.java
73e789194308fe226cf1240a9ddfbc91b2895651 17-Mar-2017 Joachim Sauer <jsauer@google.com> Merge changes from topic 'standard-cldr-data' am: 95cbac5a98 am: 9f071b62f7
am: 257889879e

Change-Id: Ic21b999d7d08621129e9b6132a6388891da98b2f
29ebf94fcc8653cec67d348c6f2a8c49496bf64e 10-Mar-2017 Fredrik Roubert <roubert@google.com> Remove obsolete Android specific Harmony test for the Congo.

This code was originally added in Cupcake to handle what was then a
divergence from standard CLDR data in Android ICU:

https://android.googlesource.com/platform/libcore/+/adc854b/luni/src/test/java/tests/api/java/util/LocaleTest.java

Now when Android has reverted to using standard CLDR data also for the
Congo, it is no longer relevant.

Bug: 35188997
Test: CtsLibcoreTestCases
Change-Id: Iea51d1f1ce251a1ddbb67938c8944340116cc7be
rg/apache/harmony/tests/java/util/LocaleTest.java
f5d0def0af097d57ff782d70b2ba8c5aeb98dbe5 09-Mar-2017 Kenny Root <kroot@google.com> Merge changes from topic 'dhe-removal' am: ca5f2fc76a am: 4123fec549
am: de8237004b

Change-Id: Ib6f1715c43a020da9ecd7411e81e13d70f30c4a9
039b20086fa05ea9b2fa10f508c20afab34663df 08-Mar-2017 Kenny Root <kroot@google.com> Update assertion in SSLEngineTest

Before this was receiving an SSLEngineStatus of BUFFER_OVERFLOW but the
test was not checking it. Make sure the assertion for when 0 bytes are
produced is checking NEED_WRAP.

However, now Conscrypt eagerly wraps instead of needing two calls to
.wrap(...) to actually start sending data. Amend the test to account for
this possibility as well by asserting that NEED_UNWRAP is the status if
more than 0 bytes were produced.

Test: cts-tradefed run cts -m CtsLibcoreTestCases -a arm64-v8a
Change-Id: I7ff88005cffff479deb6c933d58ab2813ea69ea8
rg/apache/harmony/tests/javax/net/ssl/SSLEngineTest.java
2b4de1d2d4a9958872eb233535850faa324456d2 06-Mar-2017 Tobias Thierer <tobiast@google.com> Merge "Automated: Canonicalize spelling of Android-changed across libcore" am: 37d40e6a2f am: 696fd7eda4
am: b4b3b98907

Change-Id: I94ff9842571fbda569b410e97d420edd7a332fa0
5d175dd4d7b128492ef7e3da6a77d80b8fd0aa22 02-Mar-2017 Tobias Thierer <tobiast@google.com> Automated: Canonicalize spelling of Android-changed across libcore

This applies the same regexp replacement across libcore that
http://r.android.com/345826 had only applied to ojluni.

Most of the previous noncanonical spellings were a lowercased
"android-" that should be "Android-".

This CL was created by running the following command on top of
the above CL. No manual changes were made.

find . -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'

Bug: 35841464
Test: make droid cts

Change-Id: I060c7236b7607763e5d27d60aa395d2507703a95
rg/apache/harmony/tests/java/math/BigDecimalTest.java
rg/apache/harmony/tests/java/math/OldBigIntegerTest.java
rg/apache/harmony/tests/java/util/ArrayListTest.java
rg/apache/harmony/tests/java/util/CurrencyTest.java
rg/apache/harmony/tests/java/util/GregorianCalendarTest.java
rg/apache/harmony/tests/java/util/HashtableTest.java
rg/apache/harmony/tests/java/util/IdentityHashMapTest.java
rg/apache/harmony/tests/java/util/LocaleTest.java
rg/apache/harmony/tests/java/util/jar/JarFileTest.java
563a7abf6480ad2c9eb46e11c580d36ae6bf77fa 02-Mar-2017 Adam Vartanian <flooey@google.com> Merge "Conscrypt: Don't throw away all altnames when a bad one is seen" am: 9b304a5002 am: 9090db82fe
am: 7d7a4fdf3e

Change-Id: I7ba2b05de34063a2056339fcc09afb4b9509e5db
9b304a500214bb85c0c5bc581e82837180b8f8c1 02-Mar-2017 Adam Vartanian <flooey@google.com> Merge "Conscrypt: Don't throw away all altnames when a bad one is seen"
5518ba649edfa5d32c78c499d70d54b023458ed2 27-Feb-2017 Paul Duffin <paulduffin@google.com> Merge "Fix InetAddress.getByName tests" am: 1b2efd7bda am: 8db3926262
am: 4d1150385b

Change-Id: Ic588ca36cf0cdce4970fdd6e6b8ba0c5cb1957a8
30307ec0c76a51b91701f3b90d764ad6ef679dc3 23-Feb-2017 Paul Duffin <paulduffin@google.com> Fix InetAddress.getByName tests

Removes suppression of legacy harmony tests that fail on
Android.

Changes:
1) Switches libcore InetAddressTest to parameterized Junit4 test
framework to make additions of test data easier / clearer.
2) Removes failing harmony test cases. This seemed like the
correct approach as the harmony tests expected completely
opposite behavior to the libcore tests but while the libcore
tests pass the harmony tests have been broken for over 3 years.
3) Adds test cases to libcore InetAddressTest to assert the
behavior of addresses removed from the harmony test cases.
4) Removes suppression of harmony test cases.
5) Handles knock-ons in SerializationTester; it assumed that all
tests extend TestCase, no longer the case with JUnit 4.

Bug: 11689863
Test: with cts and vogar
Change-Id: Iea6ba11fda18f058068e4eea1490d98ee7a3eb2d
rg/apache/harmony/tests/java/net/Inet6AddressTest.java
rg/apache/harmony/tests/java/net/InetAddressTest.java
ea9d4f163a463f3bd6ce84ce60293001e9680250 23-Feb-2017 Adam Vartanian <flooey@google.com> Conscrypt: Don't throw away all altnames when a bad one is seen

Conscrypt is strict in following RFC 5280's requirement that DNS
alternative names listed in X.509 certificates must be IA5Strings (aka
7-bit ASCII), with international domain names encoded in Punycode,
but the existing implementation throws an exception when it encounters
a nonconforming name, which results in the entire list of altnames
being discarded whenever any of them are invalid.

This change makes it so that only the nonconforming name is ignored,
returning any other conforming names.

There is a bit of adjustment to some of the other assert statements
in the test because the canonical name in a certificate is ignored when
altnames are present, so some of the test certificates change from the
CN verifying to the CN not verifying due to the previously-discarded
valid altnames now showing up.

Bug: 1693101
Test: cts run -m CtsLibcoreTestCases
Change-Id: I30bda625feb49fec45f5163e51ddb6486a96ca2f
rg/apache/harmony/tests/javax/net/ssl/HostnameVerifierTest.java
dec5e36bcc9e7599db3545ac7a5536f1a9d4fd45 20-Feb-2017 Tobias Thierer <tobiast@google.com> Merge "Delete flaky OldSystemTest.test_gc()" am: 4fea8a955f am: 33336ccd6b
am: 7fc7715f38

Change-Id: Ide23f7a644b061005b9e0fd702846345c3676f70
4fea8a955fdf6c7062b18d85d658a88162dbc3fd 20-Feb-2017 Tobias Thierer <tobiast@google.com> Merge "Delete flaky OldSystemTest.test_gc()"
5be2d77fc1556b0623f9edf9e2df738871caf49f 17-Feb-2017 Tobias Thierer <tobiast@google.com> Delete flaky OldSystemTest.test_gc()

This integration test was asserting that running a GC would free memory.
This test has gone through several iterations but has proven flaky due
to not enough memory being available to allocate, small allocations to
immediately showing up through Runtime.freeMemory(), or other
possibilities such as a separate thread potentially allocating objects
in the background.

Since documented guarantees around System.gc() are very weak, the test
is not worth the hassle. This CL removes it.

To ensure that System.gc() results in a GC in the first place (under
specific conditions that are internally known but not guaranteed in
documentation), PhantomReferenceTest was expanded to test interaction
with System.gc() / System.runFinalization().

Bug: 34964016
Test: PhantomReferenceTest
Change-Id: I14a8b41e82294523f325e0c69ddacb4bf04076b3
rg/apache/harmony/tests/java/lang/ref/PhantomReferenceTest.java
e00e55faf4d66408e15666fb72acc7ca19f1a21a 17-Feb-2017 Adam Vartanian <flooey@google.com> Merge "Fix and reenable DecimalFormatTest" am: 5d24a7102a am: a0c3b47f95 am: 0e8f7c01bd
am: 674ef9841e

Change-Id: I70a2d8ce40fb9398740c5c911341bbedfe98754f
ab22958b647b5e06711539bf3bf1082bc3b007da 16-Feb-2017 Adam Vartanian <flooey@google.com> Fix and reenable DecimalFormatTest

The problems underlying the suppressed DecimalFormatTest test cases have
been fixed, but the test had a separate bug where it appropriately
truncated the output for formatting a very large number but didn't scale
it properly, so the test was still failing.

Also fix the bug reference for a different text-formatting suppression.

Bug: 17656132
Test: vogar ... org.apache.harmony.tests.java.text.DecimalFormatTest
Test: cts run -m CtsLibcoreTestCases -t org.apache.harmony.tests.java.text.DecimalFormatTest
Change-Id: I85266515e6645627f5aa9200c0d1de41f9ac9cc0
rg/apache/harmony/tests/java/text/DecimalFormatTest.java
ede5667a130b8df214c961cca24dadee8e5ee7f4 03-Feb-2017 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "Fix CharArrayReader/StringBufferInputStream overflow" am: e6a019f653 am: afadb11900 am: 0f8f9cb138
am: 18f87ef307

Change-Id: Ie893500091b77a3b9e4405c85989b4202fbb95e0
e6a019f653f8a2ff84c318612b05e72085815d2f 03-Feb-2017 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "Fix CharArrayReader/StringBufferInputStream overflow"
a810284b165943041afbbd4e920b8997ae88fdef 02-Feb-2017 Przemyslaw Szczepaniak <pszczepaniak@google.com> Fix CharArrayReader/StringBufferInputStream overflow

Port from openJdk80u112:

changeset: 11858:02d89bf02553
user: igerasim
date: Thu Aug 11 19:17:36 2016 +0300
summary: 8163518: Integer overflow in StringBufferInputStream.read() and CharArrayReader.read/skip()

Added test for skip overflow, no test for read overflow
because it's not possible due to memory constrains.

Test: vogar on affected tests
Bug: 31028374
Change-Id: I0fb9acdddd8376aed5f5e39d7f924cf4a5d0fce8
rg/apache/harmony/tests/java/io/CharArrayReaderTest.java
888ea2230edc8b17c49049f1b509e0200958fe8c 31-Jan-2017 Edward Savage-Jones <edward.savage-jones@sonymobile.com> Merge "Fix CTS test case failure test_isReachableLjava_net_NetworkInterfaceII" am: c48bfa3c5a am: 690fe3c15b am: 03136d3599
am: 8bf8d82d88

Change-Id: Ie8e8d21a6647c10ffc73f4c252a83a8057612e9d
0516f392cb725e01e2191533b0d6865d03222179 30-Jan-2017 Edward Savage-Jones <edward.savage-jones@sonymobile.com> Fix CTS test case failure test_isReachableLjava_net_NetworkInterfaceII

The IP address '1.1.1.1' specifed in the test case is not guaranteed to
be unresolvable. Updating the address to use one of the IP addresses
specified in the 'IPv4 Address Blocks Reserved for Documentation':
https://tools.ietf.org/html/rfc5737

Bug: 34755694
Test: Run the following CTS command -
run cts -m CtsLibcoreTestCases -t org.apache.harmony.tests.java.net.
InetAddressTest#test_isReachableLjava_net_NetworkInterfaceII
Change-Id: Iaf5789e50a5bf356de1fe29d889f6de48dc15451
rg/apache/harmony/tests/java/net/InetAddressTest.java
f18c25a1a00f3ff5319727884d0d3319bca2fc4f 30-Jan-2017 Joachim Sauer <jsauer@google.com> Improve CalendarDataUtils. am: dc4414b90a am: 8dffe25c7c am: 77ac9e0fd8
am: ef9ae54117

Change-Id: Id9f4bb757e4afd554f6b60961ac82470227686c5
dc4414b90a99639a0701c321472e29200b7ae0a0 24-Nov-2016 Joachim Sauer <jsauer@google.com> Improve CalendarDataUtils.

Support ALL_STYLES which is used for parsing when no specific style is
required.

Don't return a Map for fields where names are ambiguous (mostly happens
when the style is NARROW).

Allow getDisplayName() to be used with ALL_STYLES as an alias to SHORT.

Modify CalendarTest to allow getDisplayNames with ALL_STYLES to return
more values than SHORT and LONG together (due to narrow styles).

Bug: 28832222
Test: artrun testng-time.xml
Test: CtsLibcoreTestCases
Change-Id: Iebde1c442380e7359af8dc369906092861b845cf
rg/apache/harmony/tests/java/util/CalendarTest.java
c5959139490c11855654a0487f0920ed65fac05b 25-Jan-2017 Tobias Thierer <tobiast@google.com> Basic tests for wrapper Collection factories in java.util.Collections am: 508f0abe4f am: 89ea62eccc am: 2e1274b41f
am: 63408d0581

Change-Id: I0a57d0bf09178abfba0c697f774c08dd94d689c4
508f0abe4f8686d29466b2c364cb4f60bf0484b5 16-Jan-2017 Tobias Thierer <tobiast@google.com> Basic tests for wrapper Collection factories in java.util.Collections

Basic test coverage for the wrapper Collections constructed by
the following static factory methods in java.util.Collections:

checkedNavigableMap()
checkedNavigableSet()
checkedQueue()
emptyNavigableMap()
emptyNavigableSet()
emptySortedMap()
emptySortedSet()
synchronizedNavigableMap()
synchronizedNavigableSet()
unmodifiableNavigableMap()
unmodifiableNavigableSet()

These 11 methods under test are the only ones currently annotated
@hide in Collections.java; this CL provides sufficient test coverage
for those to be un-hidden in a follow-up CL.

Most (perhaps all) aspects covered by these tests are also covered
by guava-testlib-21.0 tests, but those are not yet available in
AOSP and would take 80min to run, whereas these new tests only take
a few seconds to run.

SpliteratorTester previously contained some overly strict assertions
that Spliterator.trySplit() != null. This CL relaxes this assumption
for non-empty spliterables but adds a separate assertSupportsTrySplit()
check in the places that previously exercised this strict test logic;
Where the old tests appeared to be testing the wrong collection (e.g.
in HashSetTest), this CL asserts the support for trySplit on what
appears to be the correct Collection, but does not otherwise fix the
existing test code.

Bug: 29935305
Test: CtsLibcoreTestCases
Change-Id: Ibeac242bb60df7b06a1c8c80dc744707f734d91c
rg/apache/harmony/tests/java/util/ArrayDequeTest.java
rg/apache/harmony/tests/java/util/ArrayListTest.java
rg/apache/harmony/tests/java/util/ArraysTest.java
rg/apache/harmony/tests/java/util/HashMapTest.java
rg/apache/harmony/tests/java/util/HashSetTest.java
rg/apache/harmony/tests/java/util/IdentityHashMapTest.java
rg/apache/harmony/tests/java/util/LinkedHashSetTest.java
rg/apache/harmony/tests/java/util/LinkedListTest.java
rg/apache/harmony/tests/java/util/PriorityQueueTest.java
rg/apache/harmony/tests/java/util/TreeSetTest.java
rg/apache/harmony/tests/java/util/VectorTest.java
rg/apache/harmony/tests/java/util/WeakHashMapTest.java
54ba2b1c294a6d2ffeb646a203b1e726f8c6eeae 17-Jan-2017 Yi Kong <yikong@google.com> Merge "Revert "Revert "Move PlainDatagramSocketImpl away from JNI""" am: da2c0014a2 am: 6ea49ac3e5 am: 496e030837
am: 07f7fc5b0a

Change-Id: Iaa2d08f1c6bcb75ce13768ecce0f861358664fa0
ba17b532f644b7caed6d08671d492edfee8b6f37 13-Jan-2017 Yi Kong <yikong@google.com> Revert "Revert "Move PlainDatagramSocketImpl away from JNI""

Fixed a issue introduced as part of Libcore change 5e0df135, that caused
calling DatagramSocket.receive() with a reused DatagramPacket to fail.
This was due to calling system recvfrom(2) with packet's content length
instead of its buffer length.

This reverts commit fba26224db3ed354a0b42c4bee5ed4ddc4d52f9a and fixes
the above issue.

org.apache.harmony.tests.java.net.DatagramSocketTest#testReceiveTwice is
a regression test.

Test: Manual testing
Test: org.apache.harmony.tests.java.net.DatagramSocketTest#testReceiveTwice
Test: CtsLibcoreTestCases
Bug: 33957878
Change-Id: I64daaf6cf099e9af6bdee56f29da48627111ae25
rg/apache/harmony/tests/java/net/DatagramSocketTest.java
51425d7305cbe85c50c128766d78f351bb9ecb56 13-Jan-2017 Joachim Sauer <jsauer@google.com> Make java.time compile. am: d7928577b0 am: c174935919 am: cd5f73187b
am: eb08876839

Change-Id: I45b5dab59bf86883fa27ec1eece4dc742efd6baa
d7928577b0cc656c1c6da16bfe281541fdd435ee 13-Oct-2016 Joachim Sauer <jsauer@google.com> Make java.time compile.

This involves several mostly unrelated changes that nontheless don't
make sense to apply individually:

- Merge changes from OpenJDK8u60 to j.u.Calendar,
j.u.GregorianCalendar, j.u.TimeZone, sun.util.calendar.BaseCalendar
and CalendarSystem. These depend on changes in java.time, so they
weren't done earlier and some java.time classes depend on them.
- Replace name lookups with ICU resource lookups where a direct
replacement exist.
- Stub out name lookups where the ICU equivalent is non-trivial (will be
added in later commit)

Bug: 28832222
Test: CtsLibcoreTestCases (2 failures due to Calendar.getDisplayName() being unimplemented)
Change-Id: I77ed768b01ab0701c807145466e0f1d5d217a6d5
rg/apache/harmony/tests/java/util/GregorianCalendarTest.java
66454bc767b23f438d57adcadee4ed838d746521 06-Jan-2017 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "Fix ByteBuffer.put(ByteBuffer) edge case." am: 8427461b39 am: e0455939dc am: e4bb4120db
am: 97ea4b162f

Change-Id: I91618e3667c7d6e310206a8dea1f341ef2206be1
094c77bee3cb096ab3cfe7a60729037d5add2e8e 05-Jan-2017 Przemyslaw Szczepaniak <pszczepaniak@google.com> Fix ByteBuffer.put(ByteBuffer) edge case.

Replaced use of ByteBuffer.array() in ByteBuffer.put(ByteBuffer)
with a raw "hb" field access. This prevents .array() throwing a
ReadOnlyBufferException in case the buffer is a MappedByteBuffer
(only type of ByteBuffer without a backing array) and the put
argument is a non-empty, read-only HeapByteBuffer.

Test: CtsLibcoreTestCases
Bug: 34045479

_______________________________

Change-Id: I59dcfab85c4ee6bc02f1f5dad4ad2f8de43dd991
rg/apache/harmony/tests/java/nio/ByteBufferTest.java
aefb953e107cdb61ba34cbcda6bbe6a894dc7912 15-Dec-2016 Joachim Sauer <jsauer@google.com> Merge "Updated test expectations for ICU 58." am: 625ec3bad0 am: 87fca678a8 am: 52d679e626
am: 19a583b35f

Change-Id: I1289f40a1bac050b5540d1310770be7fbb62a3c9
625ec3bad074ebd1ac00fae28b99d8e4593b712d 15-Dec-2016 Joachim Sauer <jsauer@google.com> Merge "Updated test expectations for ICU 58."
148145bb19a2c154302b33264c951b60cc529f16 09-Dec-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "Update java.util.jar to openJdk8u60" am: 08029be981 am: 734f7f97ee am: c1a1b50bf1
am: 9e83864694

Change-Id: Ie03f6e97a090175a369ed0bc62592f88955339fa
08029be9818782b2b3ef4327cd12102dca3fdbb7 09-Dec-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "Update java.util.jar to openJdk8u60"
ee45ecd0a2b6f276ec7eca4dddfb9b1351c0c042 25-Oct-2016 Fredrik Roubert <roubert@google.com> Updated test expectations for ICU 58.

Bug: 31328818
Test: CtsLibcoreOjTestCases
Test: CtsLibcoreTestCases
Change-Id: Iee8abcf03bbd580aa12cf9ff3b2e9435be03d1f1
rg/apache/harmony/tests/java/text/DecimalFormatTest.java
03d2687dfc9b84bb16ea2b5f6a85da539696b30c 29-Nov-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Update java.util.jar to openJdk8u60

Attributes.java
- header change
- Use of generics
- Updated documentation links
- Deprecated:
EXTENSION_INSTALLATION, IMPLEMENTATION_VENDOR_ID, IMPLEMENTATION_URL

JarEntry.java
- header change
- Updated javadoc

JarFile.java:
- Entry enumerator moved to seperate static inner class
- Streams implementation
- Non-crucial META-INF/* (not *.SF|*.DSA|*.RSA|*.EC|MANIFEST.MF) files are not
passed to JarVerifier in .intializeVerifier() call. Otherwise we could signal
the end of META-INF parsing (due to changes in JarVerifier).
- Refactoring of hasClassPathAttribute, divided into
many methods
- Android-changed: Commented out isKnownNotToHaveSpecialAttributes()
method that doesn't make sense on android

JarOutputStream.java
- Header change
- Replaced a use of "& 0xff" with a cleaner conversion to unsigned int

JarVerifier.java
- Use of generics
- beginEntry explicitly omits META-INF manifest and index signature
check (So they can be passed to beginEntry without side-effects)
- beginEntry process properly non-crucial META-INF/ entries (not
*.SF|*.DSA|*.RSA|*.EC|MANIFEST.MF) and checks their signatures
(added a test for that)
- Change from "Enhance signed jar verification": .entryNames
treats .findMatchingSigners(c) null result as empty array
(probably a bug fix).

Manifest.java
- Use of generics
- Replaced a use of "& 0xff" with a cleaner conversion to unsigned int

Pack200.java
- Copyright update
- javadoc formating changes
- addPropertyChangeListener & removePropertyChangeListener gained empty default
implementation and deprecated

SignatureFileVerifier.java:
- uncommented isSigningRelated (requried by JarFile)

Test: CtsLibcoreTestCases
Change-Id: I56c59fac628c97a8b7c6967a43c0e23c8b068120
rg/apache/harmony/tests/java/util/jar/JarFileTest.java
rg/apache/harmony/tests/java/util/jar/JarInputStreamTest.java
dd3aa37518b80e39f453d2c5cca466484e529de5 02-Dec-2016 Tobias Thierer <tobiast@google.com> Merge "Switch Base64 decoder implementation used in harmony SSL tests" am: ed56a648bf am: 7ad34f2f54 am: 4b67dffe4d
am: 513946ba03

Change-Id: I65c5d269340b5182f74e8d5ea86b9a6a6d0e5d7e
7ad34f2f5423572dfa39271ba9685db35eb95349 02-Dec-2016 Tobias Thierer <tobiast@google.com> Merge "Switch Base64 decoder implementation used in harmony SSL tests"
am: ed56a648bf

Change-Id: I250e99c9b05b88eabad302aa848b5ac87ad162fe
7ff645482d5d10f2c15955ed812de183dead5557 01-Dec-2016 Tobias Thierer <tobiast@google.com> Switch Base64 decoder implementation used in harmony SSL tests

These tests were using libcore.io.Base64.decode() for test data. Since
that class is deprecated and the tests weren't depending on the subtle
behavioral differences relative java.util.Base64.getDecoder().decode(),
this CL converts them to the latter implementation.

Bug: 31292683
Test: cts-tradefed run cts -m CtsLibcoreTestCases -a arm64-v8a

Change-Id: I635625ceae9d6a33a4909101e65363d7052263d9
rg/apache/harmony/tests/javax/net/ssl/HandshakeCompletedEventTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLServerSocketTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSocketTest.java
e021bfb39556feae12203421a65c0ab26f72b43d 01-Dec-2016 Tobias Thierer <tobiast@google.com> Merge "Increase timeout for flaky WeakHashMap.test_keySet()" am: 171ae553c0 am: 9a596f0fe6 am: 60ad210f2b
am: b118ccff7a

Change-Id: I517b2c7bdde57e97ffb714c1b584e01c8c5b2e3c
9a596f0fe68ec1b366b2d5613f170575bdd41b44 01-Dec-2016 Tobias Thierer <tobiast@google.com> Merge "Increase timeout for flaky WeakHashMap.test_keySet()"
am: 171ae553c0

Change-Id: I4671cb85dbfded8f7a7781b5bb08d370ac8019f7
171ae553c068f2d264949dc43dbbcc2f6b087d4c 01-Dec-2016 Tobias Thierer <tobiast@google.com> Merge "Increase timeout for flaky WeakHashMap.test_keySet()"
c6afc2bdfcd3f422f0c0588be9eb20d32121be45 29-Nov-2016 Yi Kong <yikong@google.com> Merge "Add a test for IP_MULTICAST_ALL for DatagramSocket" am: 7ee861bf75 am: 564d90a470 am: 3cf4a0d548
am: af67d51dc4

Change-Id: Ifdf1a676a239b03a6f91af8bc1f3813e148db654
564d90a4703cf4f757059dc4d6030a85bf95985b 29-Nov-2016 Yi Kong <yikong@google.com> Merge "Add a test for IP_MULTICAST_ALL for DatagramSocket"
am: 7ee861bf75

Change-Id: I8e5f7ff4b5aba9935cbbca85d81fb9b4f043a5d1
40938aa75c0a78043ead765b5679e4413cb23edf 24-Nov-2016 Tobias Thierer <tobiast@google.com> Increase timeout for flaky WeakHashMap.test_keySet()

This CTS test has been flaky since at least Nov 2015 because weak
references were not always cleared within the 5sec that the test
claims as an upper bound for the time until "the ReferenceQueue
daemon will enqueue the cleared rereferences".

It looks like Daemons.MAX_FINALIZE_NANOS is likely the value the
test is talking about, but that value is 10 seconds. Further,
there are some possible races such as WeakHashMapTest evaluating
entrySet.size() before checking elapsed time.

Therefore, this CL increases the amount of time the test waits
at most to 10.5 seconds (Daemons.MAX_FINALIZE_NANOS plus 500msec
margin).

Bug: 25437292
Test: WeakHashMapTest

Change-Id: I99dc76106e7a95da99f04db3bc1ed1ed6f738d97
rg/apache/harmony/tests/java/util/WeakHashMapTest.java
3128b30724eb245d2e6a6a776a038b2fea137108 28-Nov-2016 Yi Kong <yikong@google.com> Add a test for IP_MULTICAST_ALL for DatagramSocket

This option defaults to 1 for AF_INET dgram sockets and 0 for AF_INET6.
Android uses AF_INET6 sockets and don't need to explicitly set the
option, but it is better to have a test to assert this behaviour.

Test: org.apache.harmony.tests.java.net.DatagramSocketTest
Change-Id: I367be7f2a1bc7fd4836a132f16ecfd3ca65b930a
rg/apache/harmony/tests/java/net/DatagramSocketTest.java
20eba6b2b0d380e0ff83c91169d42a5dbdc0fa5b 28-Nov-2016 Kenny Root <kroot@google.com> Merge "SSLEngineTest: fix test output buffer size" am: 3d7ef9fae9 am: 426fcbf491 am: dc362f8d87
am: 641b121340

Change-Id: Ia6181e06b8e144f9eecd2f4d9265f1991567ce3b
426fcbf491867cde5f59bc1745da3219aff3cac5 28-Nov-2016 Kenny Root <kroot@google.com> Merge "SSLEngineTest: fix test output buffer size"
am: 3d7ef9fae9

Change-Id: I6d8eca16041fcf3aa0182c5de7748f0a279a7675
3d7ef9fae946841cde7540ae9c51c6f57641ede1 28-Nov-2016 Kenny Root <kroot@google.com> Merge "SSLEngineTest: fix test output buffer size"
865442590124972964744ab91c1dfee3601be598 25-Nov-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "Adjust cookie max-age from expires time calculation." am: f967e2a6dd am: c9884bc8d0 am: 091f13ef17
am: 5e23b11329

Change-Id: I4cdd78d2ff1095e72935bc3f9d02eba41ddd878b
c9884bc8d09d8291ae6d92768e439f6d81778b5d 25-Nov-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "Adjust cookie max-age from expires time calculation."
am: f967e2a6dd

Change-Id: I6d0c1c9d4d15a8964e3dcae950ba55424b0882c7
15ab5a903e26caade17bc69468717e8e56f51f23 21-Nov-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Adjust cookie max-age from expires time calculation.

Use whenCreated field (set when a cookie is created) for the
max-age calculation. Previous, parsing-related change switched
(erroneously) to use the current time inside the expires
assignor method.

Special case was added to avoid situation where
expires-currentTime == -1 which means an undefined expiry time.
This would create a persisting cookie (where value of -2 and
lower would result in cookie deletion).

Added test for Android N HttpCookiehasExpired() behavior change.

Test: CtsLibcoreTestCases
Bug: 31039416
Change-Id: Idc5417d16a49d56116ed4a6bef7cf56ee922047f
rg/apache/harmony/tests/java/net/HttpCookieTest.java
648a572f20b37ae707f82bf121bbddea0fcc3fe0 24-Nov-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "Revert "Fix test assertion in HttpCookieTest for invalid dates."" am: d5bb85d687 am: 925ad95d27 am: e36db345b5
am: ed1d8113f6

Change-Id: I4ba54ed0533ef1805fedd6566827a57bbb39c3c6
925ad95d275d8da654deab3bb39032541e079b9c 24-Nov-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "Revert "Fix test assertion in HttpCookieTest for invalid dates.""
am: d5bb85d687

Change-Id: I425404183aad1e67ad23c8fe425a3edf48d18e28
0cd73cbbec6f56ab996fffbb8ff9fb12a4000596 23-Nov-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Revert "Fix test assertion in HttpCookieTest for invalid dates."

This reverts commit 2bc84378f1cd5216bd86eecfa2d0b720075d242b.

Due to changes from b/31039416 (making
HttpCookie dates parsing more lenient), this
test for Android N behavior change is no longer
valid.

Test: CtsLibcoreTestCases
Bug: 33092108
Bug: 31039416
Bug: 26140479
Change-Id: Ic98cadcb98495d4076836c6e4d64912b65bcdd1a
rg/apache/harmony/tests/java/net/HttpCookieTest.java
d833702509b0cd9f738fb44c7c103b4e5dae439a 17-Nov-2016 Kenny Root <kroot@google.com> SSLEngineTest: fix test output buffer size

This test's input looks like SSLv2Hello protocol and indicates the
output is going to be a greater than the 100 bytes the output buffer
was. In order to avoid this test triggering buffer size checks before
getting to the actual SSL error, make the output buffer the way a
typical application would make it.

Test: vogar --toolchain jack --mode host --classpath out/host/common/obj/JAVA_LIBRARIES/core-tests-support-hostdex_intermediates/classes.jack --classpath out/host/common/obj/JAVA_LIBRARIES/core-tests-hostdex_intermediates/classes.jack libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/SSLEngineTest.java
Change-Id: I235ab7b4c5040810a589cd6c1053f5ed77d5c20c
rg/apache/harmony/tests/javax/net/ssl/SSLEngineTest.java
dca9342e6a9ebaf3c3902ebcd6db0aadf7521d15 17-Nov-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "java.util.zip.Zip* port from openJdk8u60" am: 33f6c9f4ed am: 87f7605e13 am: 9e1e2e5e5b
am: 41d1635d77

Change-Id: I464dcec36d7693d889de6c66ba1dddfe60250cfb
87f7605e13ad5eea96f294a1fcc79f4208681825 17-Nov-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "java.util.zip.Zip* port from openJdk8u60"
am: 33f6c9f4ed

Change-Id: Ic0861e6a1a11da2d5439032d8d3706934309bd20
6c970474e9416807cabde3620045906ad3903c6c 01-Nov-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> java.util.zip.Zip* port from openJdk8u60

- Added missing android-changed tags for various changes.
- Fixed buggy extended DOS timestamp generation/reading
in ZipEntry and ZipUtils.

ZipEntry:
-Support for extended dos time (better timestamp resolution).
-Support for last modification, access time and creation time
stored in optional extra data.
-Because of last modification field, setTime works for ranges
outside of dos time range (< 1980 && > 2099). THIS change breaks
ZipEntryTest.test_setTimeJ. IMHO it's worth to adopt new
behavior.

ZipFile:
-Added spliterator support.
-Moved entries() iterator implementation to inner named class.
-ZipFileInputStream#read modifies pos/rem field in a
synchronized block.

ZipInputStream:
-Removed code for parsing optional extra data in .readLOC
(moved to ZipEntry).

ZipOutputStream:
-New property for inhibiting Zip64 for > 64k entries
-ZipEntry last modification, access time and creation time
support

ZipUtils.java:
-New file with common, time and byte-array related methods extracted
from ZipEntry and ZipFile

java_util_zip_ZipFile.c
-Use of ZIP_GetEntry2 with explicit addSlash param

zip_util.c/h:
-hash(const char *s) no longer used.
-New method, ZIP_GetEntry2, with explicit handling
of adding slash at the name end
-Zip entry name may include embedded null character.

Test: CtsLibcoreTestCases
Bug: 29935305
Change-Id: Ib691c81b158ec37419a903bfa4261a12139fbff7
rg/apache/harmony/tests/java/util/zip/ZipEntryTest.java
rg/apache/harmony/tests/java/util/zip/ZipFileTest.java
rg/apache/harmony/tests/java/util/zip/ZipOutputStreamTest.java
05fd513f414b18bdc1952858ca26d637610166f7 10-Nov-2016 Tobias Thierer <tobiast@google.com> Merge "Implement Collections.sort() on top of List.sort(), not vice-versa" am: b65f8d4962 am: d622dc963c am: 12541fd611
am: e006cbe167

Change-Id: Iff11eaa1f8ded38b2fd326f2ecc4609fcb8460db
d622dc963ccb6caeec557aeb93dd518735393c58 10-Nov-2016 Tobias Thierer <tobiast@google.com> Merge "Implement Collections.sort() on top of List.sort(), not vice-versa"
am: b65f8d4962

Change-Id: Id2509a7fdbd34f7554e438630776bcf61c7dd7cc
b65f8d4962a69ba4bf253a3cbf9cee75085c64d6 10-Nov-2016 Tobias Thierer <tobiast@google.com> Merge "Implement Collections.sort() on top of List.sort(), not vice-versa"
b1ffd3a9d3bfc304d7aa88886e0f2fdb9ae22eab 07-Nov-2016 Shubham Ajmera <shubhamajmera@google.com> Merge "Enable ProcessManagerTest#testCloseNonStandardFds" am: 7c9b739de0 am: 1410c74963 am: aff5082a1d
am: 5d761fcec0

Change-Id: I6fb226a81ba3e580bc6e892d7367a85cda74293c
1410c749637676d10091f3806c59ecdbcf8557d1 07-Nov-2016 Shubham Ajmera <shubhamajmera@google.com> Merge "Enable ProcessManagerTest#testCloseNonStandardFds"
am: 7c9b739de0

Change-Id: Ia93ede443968baae52e0770c2f3e94ee79c639d1
9b576d3f8644c08e7534eecf2e5ef356dd53ab4c 03-Nov-2016 Shubham Ajmera <shubhamajmera@google.com> Enable ProcessManagerTest#testCloseNonStandardFds

Instead of using the /proc/version which is no longer accessible for CTS
testing, to create a new file descriptor for the test, a temporary file
is used.

Bug: 29495646
Test: cts-tradefed run cts -m CtsLibcoreTestCases -t \
org.apache.harmony.tests.java.lang.ProcessManagerTest#testCloseNonStandardFds

Change-Id: Ib45ee6ab7b0c8972dae6386a0b41ac9da5f6086f
rg/apache/harmony/tests/java/lang/ProcessManagerTest.java
7cb04994606d82bd9c55821f9058c2991bc277cb 28-Oct-2016 Sergio Giro <sgiro@google.com> Merge "sun.security.x509: port change rev/d1c04dac850d" am: 1b63e4d8cd am: 5b3d640037 am: 34b56388e1
am: 41ac304f35

Change-Id: I063cfa14dfd41bcbdaab5062c50aabb0abb5645a
5b3d6400379375fad133f5f60d9d6ebb7d1c9f08 28-Oct-2016 Sergio Giro <sgiro@google.com> Merge "sun.security.x509: port change rev/d1c04dac850d"
am: 1b63e4d8cd

Change-Id: If1916cb0323566ba3240e4d45a67c81da83dcc59
1b63e4d8cd6b3611488c24ecd85518906b747680 28-Oct-2016 Sergio Giro <sgiro@google.com> Merge "sun.security.x509: port change rev/d1c04dac850d"
08ba938dcd7821a308de6960820e05cf7f63a919 24-Oct-2016 Sergio Giro <sgiro@google.com> sun.security.x509: port change rev/d1c04dac850d

The change rev/d1c04dac850d addresses the case of the string
"CN=prefix\\<>suffix", which should throw an InvalidArgumentException
when constructing a X500Principal, and doesn't throw before this change.
Also, characters after '<' are ignored. We have tests documenting that
we allow such strings, like X500PrincipalTest#testIllegalInputName_07,
so in this change we modify rev/d1c04dac850d as to allow the string. We
check that the characters after '<' are not ignored. X500PrincipalTest
thoroughly tests the code in AVA.java .

There was some generics tidying in X500Name, and also some added
whitespace that we keep in order to minimize differences with upstream.

Change-Id: I2ca8db5beeb53cdcd1f8a3e7abd91d11ba20103c
Test: run CtsLibcoreTestCases , the code is specifically tested in X500PrincipalTest
Bug: 29631070
rg/apache/harmony/tests/javax/security/auth/x500/X500PrincipalTest.java
5ae9d084f85cce06b02f7cee28db87ebe6be5056 27-Oct-2016 Tobias Thierer <tobiast@google.com> Implement Collections.sort() on top of List.sort(), not vice-versa

This is an app-observable behavior change relative to Android N.

This updates List.sort() and Collections.sort() to OpenJDK8u60.
Previously, Android had been using the logic from earlier version
of OpenJDK8 (present up to u19 or so). See:
https://bugs.openjdk.java.net/browse/JDK-8030848

The new behavior makes Collections.sort() more efficient for
List implementations that override List.sort() with a specialized,
efficient implementation. It also makes the modCount behavior of
Collections.sort() consistent with that of overridden List.sort()
implementations.

This behavior change carries a risk of app compat issues in future
versions of Android. Specifically:

- List.sort() implementations that delegate to Collections.sort()
will now infinitely recurse. Such implementations should be
fixed to call super.sort() instead.

- List implementations that override sort() with a version that
changes the value of modCount (this affects e.g. ArrayList but
not LinkedList), will now throw ConcurrentModificationException
if Collections.sort(list) is called in the middle of an iteration.

In such cases, the calling code should be fixed. E.g.,
- don't sort the list in the middle of iterating, or
- loop over list indices instead and use List.get(int), or
- convert the List to an array or a LinkedList first

Should serious app compat issues arise, possible ways to address
them in the platform include:

- revert this change, or
- make the change dependent on targetSdkVersion, or
- detect (indirect) recursive calls to Collections.sort()
and deal with them by logging, throwing a more informative
exception, or changing behavior.

Tests were updated to assert the new behavior.

The harmony CollectionsTest uses an ArrayList subclass that
throws UnsupportedOperationException from ArrayList.set()
without also overriding ArrayList.sort(). This makes the
subclass used in the test inconsistent with the List.sort()
documentation that claims that List.sort() will throw such
an exception if List.listIterator().set() does; this
inconsistency now also affects Collections.sort(). Therefore
the test was updated in this particular place to use a
different List implementation instead that, unlike ArrayList,
does not override List.sort().

Bug: 31902309
Bug: 29935305
Test: cts-tradefed run cts -m CtsLibcoreTestCases -a arm64-v8a

Change-Id: I6aad092f77ecee3eac3e633e1d59957e768fbf2b
rg/apache/harmony/tests/java/util/CollectionsTest.java
a6351eb0d17c17115d234fcf1dbb9c4100a54556 28-Oct-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "Port java.util.zip.(CRC|Adler)32 changes from openJdk8u60" am: b3982e508c am: 9ed25c8436 am: a488df0ed3
am: aa424b6fde

Change-Id: I68a9f4973325a3bf9e97384c5cc006a3d87f136a
9ed25c84361a626b66692a6924bfac5ab8ce3e59 28-Oct-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "Port java.util.zip.(CRC|Adler)32 changes from openJdk8u60"
am: b3982e508c

Change-Id: Iff7f18186dbf71ff4d53bcb0cd97e3475d753b10
6c877179523385568cb4752a5825bf76f46769e2 26-Oct-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Port java.util.zip.(CRC|Adler)32 changes from openJdk8u60

- Added new method for both CRC32 and Adler32:
update(ByteBuffer).
- Minor javadoc and header updates

Test: cts run of CtsLibcoreTestCases
Bug: 29935305
Change-Id: I80acc491d36f5b6a04e6a2dbeb461632d02389f6
rg/apache/harmony/tests/java/util/zip/Adler32Test.java
rg/apache/harmony/tests/java/util/zip/CRC32Test.java
d7c6ba7f5348b26da079c1a406a409c3e0b27c2c 21-Oct-2016 Paul Duffin <paulduffin@google.com> Merge "Detect and fix resource leakages in tests" am: 1151f73cc6 am: 9ff830a4ac
am: 33da92fc22

Change-Id: I84d03801f7df238de6687174d0df6b8db9738ffc
9ff830a4accc2f8b196e5e0da5d4630e0a30c3f4 21-Oct-2016 Paul Duffin <paulduffin@google.com> Merge "Detect and fix resource leakages in tests"
am: 1151f73cc6

Change-Id: I94dc9ee436e836215c02c93dbbd57d5214d57827
27604018f783bf6354a13870b3e7785edca69b5f 28-Sep-2016 Paul Duffin <paulduffin@google.com> Detect and fix resource leakages in tests

Tests that test those classes that use CloseGuard to detect
reosurce leakages are switched to use TestCaseWithRules and
ResourceLeakageDetector.getRule() to detect any resource
leakages and the leaks fixed.

A number of tests could not be fixed due to bugs in the core
classes so a new DisableResourceLeakageDetection annotation was
added as part of this change. A method annotated with that does
not perform resource leakage detection. The affected tests were
annotated with a description and a reference to an associated
bug.

This uses try-with-resources to aid in closing resources. While
that does provide some benefits it is all too easy to change the
behavior of the test unless care is taken. To avoid that it is
important not to merge it with an existing try block such as
those which follow the following pattern:
try {... fail()} catch(..) {}
Merging them could result in the test catching and ignoring
exceptions thrown during the creation of the resource which is
almost certainly not what the test was intending.

Test: Tested with vogar and CTS
Bug: 31542223
Change-Id: Id32bb40fe04eb9719d7e6cd367abb53118b21832
rg/apache/harmony/tests/java/io/FileInputStreamTest.java
rg/apache/harmony/tests/java/io/FileOutputStreamTest.java
rg/apache/harmony/tests/java/io/RandomAccessFileTest.java
rg/apache/harmony/tests/java/net/DatagramSocketImplTest.java
rg/apache/harmony/tests/java/net/DatagramSocketTest.java
rg/apache/harmony/tests/java/net/MulticastSocketTest.java
rg/apache/harmony/tests/java/net/ServerSocketTest.java
rg/apache/harmony/tests/java/net/SocketImplTest.java
rg/apache/harmony/tests/java/net/SocketTest.java
rg/apache/harmony/tests/java/util/zip/DeflaterInputStreamTest.java
rg/apache/harmony/tests/java/util/zip/DeflaterOutputStreamTest.java
rg/apache/harmony/tests/java/util/zip/DeflaterTest.java
rg/apache/harmony/tests/java/util/zip/GZIPInputStreamTest.java
rg/apache/harmony/tests/java/util/zip/GZIPOutputStreamTest.java
rg/apache/harmony/tests/java/util/zip/InflaterInputStreamTest.java
rg/apache/harmony/tests/java/util/zip/InflaterOutputStreamTest.java
rg/apache/harmony/tests/java/util/zip/InflaterTest.java
rg/apache/harmony/tests/java/util/zip/ZipEntryTest.java
rg/apache/harmony/tests/java/util/zip/ZipInputStreamTest.java
rg/apache/harmony/tests/java/util/zip/ZipOutputStreamTest.java
02e50db4c0647bce74c632d4785c44f3c974991d 28-Sep-2016 Neil Fuller <nfuller@google.com> resolve merge conflicts of c5046f9 to master

Change-Id: Idbb6532a62740c6ac2b8628e993a20d2e90c5bec
c5046f9702101f7e8573cbca01dbcdb3fbdea866 28-Sep-2016 Neil Fuller <nfuller@google.com> resolve merge conflicts of 19673db to nyc-mr1-dev-plus-aosp

Change-Id: Idd566c4407b748fbd774451c54db4c9c6a256cb6
c7609a8b955f976d27286e75b316a1b8a3c404b9 28-Sep-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Remove ObjectStreamClass workarounds for API > 24"
d2d837e27a889932158d49adf6653ea74f1859ab 28-Sep-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Re-add tests using java.nio.file.Files"
0589c5a971e3354d3b0fb2d4a5ad25497718c54e 28-Sep-2016 Tobias Thierer <tobiast@google.com> Merge "Let Currency.getDisplayName(null) throw NPE." am: a4dc778ff7 am: f50f62ceb7
am: b5e06436b3

Change-Id: I84e28e864d066c2469c80680b82e1931aeb50593
744e29af4f98397771d4737121dba11505565e8c 27-Sep-2016 Tobias Thierer <tobiast@google.com> Let Currency.getDisplayName(null) throw NPE.

Previously (at least on Android N), it returned the display name
in some locale (probably the default locale but I haven't checked).
This was inconsistent with the documentation.

This CL changes the behavior to throw NPE instead, which is
consistent with the documentation and with the RI.

Added test for expectation of NPE when passing null to several
Currency methods.

Bug: 31765082

Test: Ran both CurrencyTest classes.

Change-Id: I4b64358d28e25ff96d666700ae3ffddc0a7f8d6d
rg/apache/harmony/tests/java/util/CurrencyTest.java
605ce811b3498e34946e78d7e567f867481c70b8 27-Sep-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Re-add tests using java.nio.file.Files

This reverts commit d94a545fc6c0720e00c38d5c27c0981ca665e3a3.
Which removed b/29721023 related tests
from nyc-mr1 because they use APIs that
are not present on nyc branches.


Change-Id: Ib0f2040e799d1de6f8a5a20368a4bd8d1dc00156
Test: vogar run on both tests
Bug: 29721023
rg/apache/harmony/tests/java/io/ObjectInputStream2Test.java
rg/apache/harmony/tests/java/io/ObjectStreamClassTest.java
db6ca44a96696f3c384a8b88ee9f60c78a363008 27-Sep-2016 Tobias Thierer <tobiast@google.com> Merge "Update ResourceBundle related classes from java.util to OpenJDK8u60" am: df35815c5f am: ec21fea48a
am: 4328ab965d

Change-Id: I66073edbf815c13ebe9b363e156293f15713543b
df35815c5fe2ec682ac45d62d24de8d3fc13af37 27-Sep-2016 Tobias Thierer <tobiast@google.com> Merge "Update ResourceBundle related classes from java.util to OpenJDK8u60"
9ee3d8039bff863b16860d3edd11a9713c53cdf5 27-Sep-2016 Kenny Root <kroot@google.com> Merge "Harmony SSLEngineTest: fail when wrap called before init" am: 21dcef69e3 am: 84ab1a1d89
am: 2f3cb17645

Change-Id: If8666c9fe422f11407df8528aef286c52c58ff6f
c54efa1b0849fde7c1dec4a6b9b8d4f60f7a1b7d 26-Sep-2016 Kenny Root <kroot@google.com> Harmony SSLEngineTest: fail when wrap called before init

The original test did not actually call fail() thus leading this part of
the provider to be broken. However, subsequent tests called for behavior
that was opposite of the documentation. Changed both tests to expect
IllegalStateException as the documentation for SSLEngine says will
happen if the client mode is not set prior to calling #wrap.

Test: vogar --mode host --classpath out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/classes.jack --classpath out/target/common/obj/JAVA_LIBRARIES/bouncycastle-ocsp_intermediates/classes.jack --classpath out/target/common/obj/JAVA_LIBRARIES/bouncycastle-bcpkix_intermediates/classes.jack --classpath out/host/common/obj/JAVA_LIBRARIES/core-tests-support-hostdex_intermediates/classes.jack --classpath out/host/common/obj/JAVA_LIBRARIES/core-tests-hostdex_intermediates/classes.jack libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/SSLEngineTest.java
Test: cts-tradefed run cts -m CtsLibcoreTestCases -a arm64-v8a
Bug: 31301555
Change-Id: I2fde906670c4b7caf0df60190387ec5d90c3f7de
rg/apache/harmony/tests/javax/net/ssl/SSLEngineTest.java
f698ce77be4897daeff0b6a458887eea84ca9144 26-Sep-2016 Tobias Thierer <tobiast@google.com> Merge "Update Properties to OpenJDK8u60" am: 44d6334912 am: e206392d90
am: aab49437f9

Change-Id: Iec9810db618883e9e9ae6c8fb0b41f4dbaaad0a9
44d63349125ee3963915246fef79a02b0561bc8e 26-Sep-2016 Tobias Thierer <tobiast@google.com> Merge "Update Properties to OpenJDK8u60"
d8048c39c45dadb19a41354ec60baa32451198b2 23-Sep-2016 Sergio Giro <sgiro@google.com> Merge "javax.security.auth.Subject: port this class from jdk8u60" am: e781e520b7 am: 5c4f8150e4
am: 33b52da69e

Change-Id: Id65b93645b7af3b337438381dcc81da222095b86
e781e520b7ebaa64463749ae7f68c820998b6a15 23-Sep-2016 Sergio Giro <sgiro@google.com> Merge "javax.security.auth.Subject: port this class from jdk8u60"
4bf3fba8f90e901b50af7ed4e16f02d0bcdf5bcf 06-Sep-2016 Tobias Thierer <tobiast@google.com> Update Properties to OpenJDK8u60

- This contains a deliberate behavior change in the case of
a single backslash (possibly followed by newline characters)
at the end of input. Such a trailing backslash is now skipped
whereas previously it was parsed as \u0000.

The new behavior makes more sense and there is nothing in
the documentation asserting either behavior. Further, the
new behavior matches upstream.

The tests that were asserting the old behavior were
added as harmony SVN revision 617124 with commit message
"Fix for HARMONY-5414 (java.util.Properties.load() decodes
invalid unicode sequences)". This references the harmony bug:

https://issues.apache.org/jira/browse/HARMONY-5414

While the test code attached to the bug does cover the
case of a lone \, it is not mentioned in the bug description.
The bug otherwise focuses on unicode sequences with numbers
of digits other than 4, e.g. \u123 which is asserted to yield
IllegalArgumentException.

This CL changes the test to assert the new behavior which is
that the backslash is ignored/trimmed.

This CL also adds more comprehensive test coverage for
properties read from a Reader and with trailing backslashes
at end of line followed by end of input, newline characters,
or additional lines.

- Android-changed: The implementation for loading/storing
properties from/to XML stil uses OpenJDK7u40's java.util.XMLUtils.
The upstream replacement XmlSupport adds considerable dependencies
and complexity that would have no apparent behavioral benefit on
Android.

Test: PropertiesTest
Test: Verified that testTrailingBackslash() fails if
the first fix is commented out.
Test: Verified that testTrailingBackslashAndNewline()
fails if the second fix is commented out.

Bug: 29935305

Change-Id: I93a4b879c10909d31585320af9b0d5c1fe7e46b8
rg/apache/harmony/tests/java/util/PropertiesTest.java
da09aa47d3c5b5322a74331f0ebc993a0fc16447 22-Aug-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Remove ObjectStreamClass workarounds for API > 24

Commit 987c9cae27659c044ae474fa92d9f1c51ecba9e0 added
back private API that was abused by some apps. This change
makes
- ObjectStreamClass.getConstructorId(Class<?>)
- ObjectStreamClass.newInstance(Class<?>, long)
throw UnsupportedOperationException if called
with targetSdkVersion > 24.

Change-Id: I79234ca718991ba9dc73b7577768b617de9ad7df
Test: org.apache.harmony.tests.java.io.ObjectStreamClassTest
Bug: 28283540
rg/apache/harmony/tests/java/io/ObjectStreamClassTest.java
7ff253db3117067931e9f249762812de7f3bf694 06-Sep-2016 Tobias Thierer <tobiast@google.com> Update ResourceBundle related classes from java.util to OpenJDK8u60

Documented several previously undocumented Android-changed sections
that were missed in the initial draft of this CL.

- ResourceBundle
Added test for new method getBaseBundleName().
Added missing Android-changed comment for:
- use of UTF-8 for PropertyResourceBundles
- use of getLoader(VMStack.getCallingClassLoader())
- spi.ResourceBundleControlProvider
- PropertyResourceBundle, ListResourceBundle
Android-changed: Made access to the 'lookup' field thread safe.
- ServiceLoader
Do not use legacy security code.
Added missing Android-changed comments for loadFromSystemProperty()
and for fail() invocations where Android passes a 'Throwable cause'.

Bug: 29935305

Test: run cts -m CtsLibcoreTestCases

Change-Id: Idc3a7c5513644dd103e7d132789d37a1c40f1471
rg/apache/harmony/tests/java/util/ResourceBundleTest.java
14dca37c2ca66d2c1649a7ffe157ec1f037646a4 14-Sep-2016 Sergio Giro <sgiro@google.com> javax.security.auth.Subject: port this class from jdk8u60

- Changes to serialization/deserialization: be more tolerant about
deserializing objects: tolerate null values and lists other than
linked lists. This is tricky to test, as such objects cannot
be created in the current implementation. Serialization, is
otherwise tested in SubjectTest. Added tests to document behaviour
of null values.
- Throw NullPointerException immediately in the SecureSet set
implementation used to store principals and credentials.
- Cosmetic changes like use of @code instead of <code> tags.

Bug: 29631070
Test: vogar SubjectTest
Change-Id: I5cb007db2f44e78ea668444372810f6355fab5ba
rg/apache/harmony/tests/javax/security/auth/SubjectTest.java
537af6abf1af39e6dc7c337245c7b1d57a118fe4 13-Sep-2016 Tobias Thierer <tobiast@google.com> Merge "Update six more classes from java.util to OpenJDK8u60" am: 39f3deef2d am: a351ada4f9
am: 59afbebe5b

Change-Id: Idc8c23b748ac3495e3d7377b708ad0b200c4df0f
e64b86797d2d2a6d0272de808105cee476b13e18 06-Sep-2016 Tobias Thierer <tobiast@google.com> Update six more classes from java.util to OpenJDK8u60

Minor tweaks only, no behavior changes. All of these classes are now
exactly identical to upstream.

Added a test. Removed an old test that didn't add any value since it
forgot a fail() (so it didn't test what it intended to test) and
since it was only duplicating functionality in the new test.

- Formattable
- IllegalFormatConversionException
- InvalidPropertiesFormatException
Note that the serialVersionUID appears pointless since, per both
the documentation as well as the implementations of writeObject()
and readObject(), this class does not support serialization.
- MissingFormatWidthException
- NoSuchElementException
- TimerTask

Bug: 29935305
Test: vogar libcore.java.util.InvalidPropertiesFormatExceptionTest
Change-Id: I822ad261c4cb2b56cae52e6386dae1f9239d5356
rg/apache/harmony/tests/java/util/InvalidPropertiesFormatExceptionTest.java
eb210b108f4998805f69b2fa790bc0e208865620 08-Sep-2016 Shubham Ajmera <shubhamajmera@google.com> Merge "Add tests for new constructors in java.util.Scanner" am: 9e1e07a5e8 am: f905eb1956
am: 7a41f4dcbc

Change-Id: I7c54d1712a3226dcce34fcbb247e7cf642afd438
9e1e07a5e8706eeb395a4243e52254b6e2ff1fd5 08-Sep-2016 Shubham Ajmera <shubhamajmera@google.com> Merge "Add tests for new constructors in java.util.Scanner"
75965964dc85865d8571856821943f31882b31b7 07-Sep-2016 Tobias Thierer <tobiast@google.com> Merge "Fix 58 libcore tests that caught "expected" Exceptions but didn't fail()" am: 20440a97a3 am: afd3d3d9c1
am: 3077ee121b

Change-Id: Ic9f6e1bf7f9bd34e565f363f82eac139ac8235ed
d4b7449574ca69c713a3f2230cb77c68ee642700 06-Sep-2016 Tobias Thierer <tobiast@google.com> Fix 58 libcore tests that caught "expected" Exceptions but didn't fail()

There were no changes to code under test.

4 tests were fixed to not tolerate an Exception:
- libcore.java.util.CollectionsTest#test_CheckedMap_computeIfAbsent
In the case where a Map key is present, computeIfAbsent() should
not invoke the Function, so there is no return value that could
be expected to undergo a type check. The test was changed to
verify that the Function is not invoked.
- libcore.java.util.concurrent.CopyOnWriteArrayListTest#test_sort and
libcore.java.util.concurrent.CopyOnWriteArrayListTest#test_subList_sort
were sorting an already-sorted non-null list that contains no null
values. That logic was redundant and wouldn't have thrown.
- org.apache.harmony.security.tests.java.security.KeyStoreSpiTest#test_engineEntryInstanceOf
(the KeyStoreSpi documentation does not mention whether NPE is thrown;
the implementation comes from upstream and does not throw it).

54 tests were fixed by adding the missing
fail();
No attempt was made to make this failure message specific to the
exception that was expected.

Tests that weren't changed:

- SSLEngineTest.test_wrap_ByteBuffer_ByteBuffer_04() requires
investigation to determine the correct resolution.
A comment was added to the test linking to the corresponding bug.

- ThreadTest#testParkUntilWithUnderflowValue() and
OldNodeChangeEventTest.waitForEvent() were not touched since
it was not clear whether that it was relevent to the test whether
or not the exception was thrown.

- two cases in Files2Test#test_setPosixFilePermissions_NPE() are
left to a future CL

Test:
(croot; make vogar core-tests) \
&& git diff aosp/master --name-only | xargs vogar `cparg core-tests`

Change-Id: I1cd3220a06e331ff049b146b393f78879f07211a
rg/apache/harmony/tests/java/nio/channels/ChannelsTest.java
rg/apache/harmony/tests/java/nio/channels/FileChannelTest.java
rg/apache/harmony/tests/java/text/SimpleDateFormatTest.java
rg/apache/harmony/tests/java/util/IdentityHashMapTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSocketTest.java
rg/apache/harmony/tests/javax/net/ssl/TrustManagerFactory1Test.java
f929d89d704b7c45e55d7f1b0980f20415adb492 06-Sep-2016 Shubham Ajmera <shubhamajmera@google.com> Add tests for new constructors in java.util.Scanner

Added tests for java.util.Scanner #Scanner(Path), #Scanner(Path,
String).

Bug: 29030693
Test: Ran the tests using Vogar.
Change-Id: I8d3ebede32e6e93fa02c5a13151fe3fbdd022ade
rg/apache/harmony/tests/java/util/ScannerTest.java
0a44bac2674311b85e99a4614ab4b302ed30ec60 01-Sep-2016 Neil Fuller <nfuller@google.com> Merge "Tests + unhiding new j.l.reflect methods" am: 41a1b5cb6f am: 72f8d12a8a
am: 09ae851583

Change-Id: I44da2262216d781871c964cd4e910eddca2a27b5
deb66d5609852f4f47d5e94c7e4ebb8752a311da 23-Aug-2016 Neil Fuller <nfuller@google.com> Tests + unhiding new j.l.reflect methods

Bug: 28666126
Test: Ran the modified test cases in CTS
Change-Id: I9cec18cb1f4ab4c4bd3de8e374df4f4e363afb8a
rg/apache/harmony/tests/java/lang/ClassTest.java
66d66d1ed12e6f06d7c8f3325aa73f7a627fa6fd 26-Aug-2016 Neil Fuller <nfuller@google.com> Merge "Pulling in the OpenJDK 8 Executable class and related changes" am: 5c33d34426 am: daef3cb1a7
am: 46c3d7727a

Change-Id: I9efed6b548078c54afed87c64acdeaa8fc15a3c2
5c33d34426ba45c7e97692b4f193265dcc4b77b4 26-Aug-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Pulling in the OpenJDK 8 Executable class and related changes"
344a827583510614f075269ce1421271aa0a354b 25-Aug-2016 Shubham Ajmera <shubhamajmera@google.com> Merge "Fix SocketFactoryTest#test_createSocket_InetAddressIInetAddressI" am: 5ba6faca16 am: 32b9e1dfce
am: 00d0da0a3e

Change-Id: Iadd4bd6daa97f145411e682c634a7ed3319e23a5
20938c5ed2bc8f5de8047a47caddb146f730868f 18-Aug-2016 Neil Fuller <nfuller@google.com> Pulling in the OpenJDK 8 Executable class and related changes

This change restructures the existing code to accept Executable.
This change involves changes to java.lang /
java.lang.reflect Java code and ART internals.

The Parameter code associated with Executable has been excluded
and will be added as a follow up.

Many of the upstream JavaDoc changes to some of the pre-existing files
will also be handled as a follow-up to make this change smaller /
easier to review. This contains the parts that would be hard to split
out.

The only intentional public API change is the addition of
Executable/Method/Constructor getParameterCount() and
Type.getTypeName(). Tests have been added for these.

Some additional tests have been added to cover existing methods
and cases like toString().

The changes to Modifier result in a change to Method.toString()
which was previously not outputting "default" for default
interface methods. Associated test lines confirming this behavior
have now been uncommented.

Bug: 28666126
Test: cts ran for libcore (libcore, harmony_java_lang, org)
Change-Id: If94f2723b1ac28c08e52921c9860f54da04e168d
rg/apache/harmony/tests/java/lang/ClassTest.java
rg/apache/harmony/tests/java/lang/reflect/GenericArrayTypeTest.java
rg/apache/harmony/tests/java/lang/reflect/ParameterizedTypeTest.java
rg/apache/harmony/tests/java/lang/reflect/TypeVariableTest.java
rg/apache/harmony/tests/java/lang/reflect/WildcardTypeTest.java
51e3a43f7a1def3d74a594d44c2e18cc40bc2c0d 25-Aug-2016 Shubham Ajmera <shubhamajmera@google.com> Fix SocketFactoryTest#test_createSocket_InetAddressIInetAddressI

With http://r.android.com/248420/, the order of BindException and
IllegalArgumentException got reversed as bind(localAddr) was invoked
before checking the correctness of the port. The change now corrects
the order in which the exceptions are expected i.e.,
IllegalArgumentException before BindException(IOException).

Also made a few changes in the tests to have a better understanding of the
actual failures.
Changes in the test:
- Added
test_createSocket_InetAddressIInetAddressI_IllegalArgumentException
to have an independent test for IllegalArgumentException without
having any ambiguity with BindException.
- Added test_createSocket_InetAddressIInetAddressI_ExceptionOrder to
verify the order of BindException and IllegalArgumentException.

Test: run cts -m CtsLibcoreTestCases

Bug: 31019685
Change-Id: Id7d761dcbb78b752247dc2fd469dfa5dc124ee66
rg/apache/harmony/tests/javax/net/SocketFactoryTest.java
cfffeb46765d68255bbacda434af2ec391833292 24-Aug-2016 Neil Fuller <nfuller@google.com> Merge "Fix EnumSetTest.test_retainAll_LCollection" am: cce309fddd am: 212618cf79
am: 3a95f491a3

Change-Id: If4d89874d7db8f32b0912fb8665cd271c6109427
212618cf79b12a38033b43e76a3367f889b80d61 24-Aug-2016 Neil Fuller <nfuller@google.com> Merge "Fix EnumSetTest.test_retainAll_LCollection"
am: cce309fddd

Change-Id: Ia4d684f369e64b60ec5bfc55f69a60ce5375e342
a8dd0805fb15c4222452240239e6e6cb670ce520 24-Aug-2016 Neil Fuller <nfuller@google.com> Fix EnumSetTest.test_retainAll_LCollection

The behavior has changed, the test needs to be updated.

Bug: 31057382
Bug: 31052838
Test: run cts --class org.apache.harmony.tests.java.util.EnumSetTest
Change-Id: Id87e9b9976f278ee64191b4f15306a99eff7c2ed
rg/apache/harmony/tests/java/util/EnumSetTest.java
2cc65fb1465ce01c13d28892cd985b57239f05ad 23-Aug-2016 Tobias Thierer <tobiast@google.com> Merge "Fix regression in Vector.listIterator.add() introduced in N." am: 77f9daf710 am: 92608bb99d
am: 3cabf06261

Change-Id: I320ad2fa00f63335f98cc6d61088ea39e5138506
92608bb99d0e1a2acbee40b842541ce6213e8e0d 23-Aug-2016 Tobias Thierer <tobiast@google.com> Merge "Fix regression in Vector.listIterator.add() introduced in N."
am: 77f9daf710

Change-Id: I8275159f0b4bb1f956919764df1f054bff59ac3e
c13c9eddc3f7eeb760fcd9032b85ef2767cc82ba 19-Aug-2016 Tobias Thierer <tobiast@google.com> Fix regression in Vector.listIterator.add() introduced in N.

AOSP commit 887ab3fe607c582e10e33b3d631401d7a791aaed touched Vector.Itr
to fix an app compability bug, but did not make a corresponding change
to Vector.ListItr which extends Vector.Itr. Specifically, ListItr.add()
does not account for the extra element in the hasNext() logic that it
inherits from the super class. This causes iteration to terminate
prematurely when an element was added via the ListIterator.

This CL fixes the regression by incrementing limit during ListItr.add().

Bug: 27430229
Bug: 30974375

Test: VectorTest
Test: 842 guava-testlib tests for Vector; coverage for Vector was
contributed to guava-testlib in http://cl/130778873

Change-Id: I1e2042ebfd78a4956791bd43d60db7d1dec8edf5
rg/apache/harmony/tests/java/util/VectorTest.java
1708db3ddfc74243478808ca315fb3bc3aefe3db 19-Aug-2016 Shubham Ajmera <shubhamajmera@google.com> Merge "Port openJDK8 changes to java.nio.charset" am: 13ff49ea4f am: 1ade8e7704
am: 2ae483c42b

Change-Id: I04dfdff8eb7d297283ce5148e61aac6a5338c053
1ade8e7704f288d038074676711de2fac18ac5e7 19-Aug-2016 Shubham Ajmera <shubhamajmera@google.com> Merge "Port openJDK8 changes to java.nio.charset"
am: 13ff49ea4f

Change-Id: I809d0f637c384d9bde4b54722bcf353af21bd49a
13ff49ea4f7ea513a714d13231d85552cfebd421 19-Aug-2016 Shubham Ajmera <shubhamajmera@google.com> Merge "Port openJDK8 changes to java.nio.charset"
861d34f160de8a5f94b2b8b453daca5246052450 17-Aug-2016 Shubham Ajmera <shubhamajmera@google.com> Port openJDK8 changes to java.nio.charset

- Mostly javadocs changes.
- CharsetEncoder #replaceWith assigns value of "newReplacement" to
"replacement"and not the reference.
- CharsetEncoder #replacement creates a copy of "replacement" and then
returns the copy.
- Made changes in the tests which were expecting old behaviour
for the above two methods.

Test: run cts -p android.core.tests.libcore.package.harmony_java_nio
run cts -p android.core.tests.libcore.package.libcore

Bug: 30964930
Change-Id: Id09238074ace5e92a5864a90aca360079847abf2
rg/apache/harmony/tests/java/nio/charset/CharsetEncoderTest.java
6fe7b5aa4b42428e22b36fda20bac003c08e1049 17-Aug-2016 Serguei Katkov <serguei.i.katkov@intel.com> Merge "Unify exception order in java.nio.Buffer subclasses" am: 659e76cdf2 am: 75f7ce08ff
am: 782e4767cf

Change-Id: I85e3b845898f51c965113def838ecc939ec44df1
75f7ce08ff0b1d7f5eb4048776e0e4e2d9e3df56 17-Aug-2016 Serguei Katkov <serguei.i.katkov@intel.com> Merge "Unify exception order in java.nio.Buffer subclasses"
am: 659e76cdf2

Change-Id: Ia56a427ba667ad3137584bfe7c86f30bfe834275
3f7495294d8b27c00ff647773fcac75afe10c629 15-Aug-2016 Serguei Katkov <serguei.i.katkov@intel.com> Unify exception order in java.nio.Buffer subclasses

The bulk methods <Type>Buffer.put(<Type>Buffer) produces
two problems causing IllegalArgumentException and
ReadOnlyBufferException exceptions.
To unify the order of exception IllegalArgumentException
will be thrown first.

The tests are update to expect IllegalArgumentException
in the condition above.

Test: run cts -p android.core.tests.libcore.package.harmony_java_nio,
run cts -c libcore.java.nio.BufferTest,
run cts -c libcore.java.nio.CharBufferTest,
run cts -c libcore.java.nio.NoArrayTest,
run cts -c libcore.java.nio.OldAndroidNIOTest,
run cts -c libcore.java.nio.OldDirectIntBufferTest
run cts -c libcore.java.nio.OldDirectShortBufferTest

Change-Id: If3314c29b193425d6255a32a1841d2b7bb9a767d
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
rg/apache/harmony/tests/java/nio/ReadOnlyCharBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyDoubleBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyFloatBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyIntBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyLongBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyShortBufferTest.java
a23a06dd8306305856c5bd37bc72d26552aa10f6 05-Aug-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "Port java.lang from openJdk8, part 4" am: d4a38fdce5 am: 93384127dd
am: 186ce5a09f

Change-Id: I42d6166757be602bfeaa5a513a033d27e94f2780
93384127ddd2af9144cd0f88f5e6be9219bbefd2 05-Aug-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "Port java.lang from openJdk8, part 4"
am: d4a38fdce5

Change-Id: I112f278f101c3d15ccd462aa2e4faf9190659cda
4e73fd2bc22e704fe71465782b83be0471ac5e82 05-Jul-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Port java.lang from openJdk8, part 4

- New java.lang.ThreadLocal.withInitial method.
- Javadoc cosmetic and generics changes.
- Restored removed SecurityManager checks in System.
- Out and err streams can now change encoding depending
on properties.
- Out and err are now a BufferedOutputStream (size 128).
- Thread#UncaughtExceptionHandler is now a
FunctionalInterface
- Double checked locking for System#console()


Bug: 28666126
Change-Id: I4a715a785578185920e2ee5a16dbe06511c55c23
rg/apache/harmony/tests/java/lang/ThreadLocalTest.java
730ac24149c7b7f4df2072c55eaae3417aadb812 26-Jul-2016 Shubham Ajmera <shubhamajmera@google.com> Merge \"Return DataInputStream to pre-N calls on delegate\"
am: 105f3b0575

Change-Id: I892a6625e76b2e848bcf65fb9d9d2dc7409ad0f7
545cf975b4fd22f54945c559a26bd6d4f6acff54 26-Jul-2016 Shubham Ajmera <shubhamajmera@google.com> Return DataInputStream to pre-N calls on delegate

DataInputStream used to use read(byte[], int, int) method to perform
the operations - readShort, readChar, readInt, readUnsignedShort on pre-N
versions. However, the current version was using read() instead. As
the InputSteam can be user defined, read() and read(byte[], int, int)
could result to different outcomes.

A popular app relies on the specific calls being made to the wrapped
stream for readInt(). The N implementation calls through to methods that
are stubbed to throw exceptions in a stream implemented by app code.

Added test to prevent future unintensional regression.

Test: org.apache.harmony.tests.java.io.DataInputStreamTest
Test: libcore.java.io.OldAndroidDataInputStreamTest
Test: libcore.java.io.OldDataInputStreamTest

Bug: 30268192

Change-Id: Id6d58f3cfa3ab5eecb90e912a7052bb32551208b
(cherry picked from commit 850c9d95e354c22522314308a8cd6162db6a90b7)
rg/apache/harmony/tests/java/io/DataInputStreamTest.java
1ea45e64597b04e55fbe2068e2bd014636808323 25-Jul-2016 Shubham Ajmera <shubhamajmera@google.com> Return DataInputStream to pre-N calls on delegate
am: 850c9d95e3

Change-Id: I087cf150a4e992f9ee386239b94312922a8231b5
93af40b3f67d779354e2bb2b1f2800227bc1655e 25-Jul-2016 Narayan Kamath <narayan@google.com> Merge \\\"SerializationStressTest4 : Improve iteration tests.\\\" am: 5f3ac6af79 am: 36ea50ed58
am: ecc268a34e

Change-Id: Ide377228a19ba4abbe935109a64e70ee2c40b7ed
36ea50ed58d8aad20b41f2a47a476c078baf4e66 25-Jul-2016 Narayan Kamath <narayan@google.com> Merge \"SerializationStressTest4 : Improve iteration tests.\"
am: 5f3ac6af79

Change-Id: I09ba75501afdcedf388c8a9ee6273ddf7cd8c634
850c9d95e354c22522314308a8cd6162db6a90b7 21-Jul-2016 Shubham Ajmera <shubhamajmera@google.com> Return DataInputStream to pre-N calls on delegate

DataInputStream used to use read(byte[], int, int) method to perform
the operations - readShort, readChar, readInt, readUnsignedShort on pre-N
versions. However, the current version was using read() instead. As
the InputSteam can be user defined, read() and read(byte[], int, int)
could result to different outcomes.

A popular app relies on the specific calls being made to the wrapped
stream for readInt(). The N implementation calls through to methods that
are stubbed to throw exceptions in a stream implemented by app code.

Added test to prevent future unintensional regression.

Test: org.apache.harmony.tests.java.io.DataInputStreamTest
Test: libcore.java.io.OldAndroidDataInputStreamTest
Test: libcore.java.io.OldDataInputStreamTest

Bug: 30268192

Change-Id: Id6d58f3cfa3ab5eecb90e912a7052bb32551208b
rg/apache/harmony/tests/java/io/DataInputStreamTest.java
0cdeffff0cf4de8b8916a4634f1c3d2b68b59158 13-Jun-2016 Narayan Kamath <narayan@google.com> SerializationStressTest4 : Improve iteration tests.

In tests :
- test_writeObject_Collections_UnmodifiableCollection
- test_writeObject_Collections_SynchronizedCollection

The construct :

while (it1.hasNext()) {
equals = equals && it1.next().equals(it2.next());
}

is broken because the RHS of the logical-and expression need not
be evaluated if equals == false.

Also, the tests were assuming that the iteration order of the
Sets in question were the same before / after serialization, which
is not necessarily the case.

Change-Id: I404b40d57c0ee13199fe0a8bd6d0e2c629d74a80
rg/apache/harmony/tests/java/io/SerializationStressTest4.java
b0c7f5044acfdd085320be5212c80727deece0bb 07-Jul-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Remove broken tests
am: d94a545fc6

Change-Id: If53279dc14a72ff28908bfdc7568bd2b9dda3e7b
d94a545fc6c0720e00c38d5c27c0981ca665e3a3 07-Jul-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Remove broken tests

Tests for change 75febb0b6fbb822a66c6771798297806c06decbe
depend on package that doesn't exists in n-mr1

Bug: 29721023
Change-Id: I9b63fd72d5a5a45734cbc7e6c37fcd60b7766c61
rg/apache/harmony/tests/java/io/ObjectInputStream2Test.java
rg/apache/harmony/tests/java/io/ObjectStreamClassTest.java
75febb0b6fbb822a66c6771798297806c06decbe 28-Jun-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Fix serialization of class fields with same names.

Dex allows for fields to share a name if they have
different types. openJdk serialization code was not
handling this case properly.

Bug: 29721023
Change-Id: I3b8ea027f0af829e9f158d4bcb11a2052e34c10f
(cherry picked from commit 0885fcbbbf2fdc46ffe847aca9d3c339f4c7bb41)
rg/apache/harmony/tests/java/io/ObjectInputStream2Test.java
rg/apache/harmony/tests/java/io/ObjectStreamClassTest.java
a6a1d2efcd0dfb63847f1bee513b6d65f6daddd4 07-Jul-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge \"Fix serialization of class fields with same names.\"
am: 0754731ccf

Change-Id: Ida88fc0605683a05421dc4e6f3ef514cc223cab0
0754731ccf5c5a17041930d5b4fe1e0c06b9df61 07-Jul-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "Fix serialization of class fields with same names."
cee6c898780527a00724271a5d37126d4218b43f 06-Jul-2016 Paul Duffin <paulduffin@google.com> Merge \"Add serialVersionUID field to java.text.ParseException\"
am: c436f141d5

Change-Id: I0774d420fb01fafee047fe35a67af92a8b83ffa3
fe0e15bb66d18bc0a24d7972d73823910be383e3 06-Jul-2016 Paul Duffin <paulduffin@google.com> Merge \"Removed tests that checked previous behavior of ChoiceFormat\"
am: fed034483d

Change-Id: I186910a46fe3fcc60b056d593416fd002df2a0d8
c436f141d5ff28dae9ef0506b3c1a335a7ce5d9a 06-Jul-2016 Paul Duffin <paulduffin@google.com> Merge "Add serialVersionUID field to java.text.ParseException"
33d260f88635ce2dde238052e818b3a067b3b7b6 06-Jul-2016 Paul Duffin <paulduffin@google.com> Removed tests that checked previous behavior of ChoiceFormat

Fixes test breakages caused by commit
3683e911af7dde39dc7b4a8bbf4dc9e30e6e91ea

Bug: 29352743
Change-Id: Ie2362044860a4850c057b6b8a0cfbc58d77112db
Test: Ran both ChoiceFormatTest classes.
rg/apache/harmony/tests/java/text/ChoiceFormatTest.java
0cda87167eea29bca620cd0abab1e40721c2d6ba 06-Jul-2016 Paul Duffin <paulduffin@google.com> Add serialVersionUID field to java.text.ParseException

Verified that the serialVersionUID that was added is the same as
the one that would have previously been calculated
automatically. That was done by serializing an instance before
adding the field.

Added a test that used the serialized form to ensure that it
could be successfully deserialized.

Bug: 29352743
Change-Id: I41e5deae6847b81e524afd49ff14309f711913e0
Test: Ran test added above.
rg/apache/harmony/tests/java/text/ParseExceptionTest.java
9e29685e033f779ca098a51b374cae96a72c7ab9 05-Jul-2016 Yi Kong <yikong@google.com> Merge \"Import upstream change: HttpCookie.domainMatches(\"hostname.local\", \"hostname\") should return true\"
am: d7a49cfbc7

Change-Id: Ie270e93b5bf77c1483dce6d93b3018ad71629119
505d890c4f0a89414c427a6e23d98cc07b5f3154 04-Jul-2016 Yi Kong <yikong@google.com> Import upstream change: HttpCookie.domainMatches("hostname.local", "hostname") should return true

Upstream change:

7023713: HttpCookie.domainMatches("hostname.local", "hostname") should return true
Reviewed-by: chegar
Contributed-by: zhouyx@linux.vnet.ibm.com

http://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/5c1f90dd0405

Bug: 29067535
Test: org.apache.harmony.tests.java.net.HttpCookieTest#test_DomainMatches
Change-Id: I47b59a35e89ddb488554c712a58f645785409bc6
rg/apache/harmony/tests/java/net/HttpCookieTest.java
d283133498fc396c46a2407111160bc71dc67d10 05-Jul-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge \"Port java.lang from openJdk8, part 3\"
am: 500742c01c

Change-Id: I1b5330ea67c487bde285a35156c181e85cd05288
6a5351e12a69e865fe31b8aac989bd2573aebbca 28-Jun-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Port java.lang from openJdk8, part 3

Tests: Run all CTS Math/StrictMath/Process related tests
Bug: 28666126
Change-Id: If7555e9bcbccb60b988da96a2a1875e3672e82ee
rg/apache/harmony/tests/java/lang/ProcessBuilderTest.java
rg/apache/harmony/tests/java/lang/ProcessTest.java
0885fcbbbf2fdc46ffe847aca9d3c339f4c7bb41 28-Jun-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Fix serialization of class fields with same names.

Dex allows for fields to share a name if they have
different types. openJdk serialization code was not
handling this case properly.

Bug: 29721023
Change-Id: I3b8ea027f0af829e9f158d4bcb11a2052e34c10f
rg/apache/harmony/tests/java/io/ObjectInputStream2Test.java
rg/apache/harmony/tests/java/io/ObjectStreamClassTest.java
39272b9123a5ef76db73bb2832fcc2254c0e4224 21-Jun-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge \"Add Character tests for new UnicodeBlocks\"
am: 88303d8505

Change-Id: I71d5283e5dc82f9e1795e8f4bfcaca2568de0b79
500f2ca3a8f0eea30b849a292a7a9e08e594d7fc 21-Jun-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Add Character tests for new UnicodeBlocks

Added tests for unicode blocks in java.lang.Character
that were added in Java 8

Bug: 28666126
Change-Id: I3fbeee7ed5413a801cb9a108ae8162e1fea8195e
rg/apache/harmony/tests/java/lang/Character_UnicodeBlockTest.java
686c425b096ed6b622e30c39b1462b91fdb6875f 16-Jun-2016 Yi Kong <yikong@google.com> Merge \"Import upstream change: CookiePolicy spec conflicts with CookiePolicy.ACCEPT_ORIGINAL_SERVER\"
am: 0736067d62

Change-Id: I4974082f6dea42ff5f0b418a98265f617c30de9f
254bfbf21a0d71f98a4c57b8afa964064fce9d17 15-Jun-2016 Yi Kong <yikong@google.com> Import upstream change: CookiePolicy spec conflicts with CookiePolicy.ACCEPT_ORIGINAL_SERVER

Upstream change:

7051862: CookiePolicy spec conflicts with CookiePolicy.ACCEPT_ORIGINAL_SERVER
Summary: Return false for null arguments in ACCEPT_ORIGINAL_SERVER#shouldAccept()
Reviewed-by: chegar

http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/8b65dfe8f509

Bug: 29067535
Change-Id: I5a7cb0b21a50100ff5c9e1b346accf6eaf72d2b0
rg/apache/harmony/tests/java/net/CookiePolicyTest.java
197ca87828eb3eb4a718885f3fc29f8583b476af 03-May-2016 Nicholas Sauer <nicksauer@google.com> Fix XML Parser related packages names

bug: 28539976
Change-Id: I38d4968a56f7988070a4b114876badddabe535a1
(cherry picked from commit 0c78f892938bebf03b62f0de1562ed7c410bfd4b)
rg/apache/harmony/tests/org/xml/sax/helpers/ParserAdapterTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/ParserFactoryTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/XMLReaderFactoryTest.java
286d58945977fff9f2ce16317ec0a55b3978803c 13-Jun-2016 Nicholas Sauer <nicksauer@google.com> Merge "Insert security provider into the same position"
ee8ca908e6de92f3b7dab963a34862163089ff05 13-Jun-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge \\"Fix Preferences regression.\\" am: 774864c67a
am: d3014d4ead

Change-Id: I950d267f2b8bb34b687b20457d607b72d2ba1ab4
e34fbfb66a724284a9722892fa8f51f7c663ed86 13-Jun-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Fix Preferences regression.

This change fixes reading filesystem-saved
java.util.prefs.Preferences.

Due to a bug in XmlSupport, when reading the
filesystem-saved preferences, the reader was
throwing an exception. The Android
implementation of xml parser adds additional
nodes that were not Elements, this was
causing a cast exception (the old code was expecting
only Elements).

FileSystemPreferences class was swallowing exceptions if
they happen during preferences content reading.
This changes adds additional logging to prevent this.

Bug: 27645233
Change-Id: Ieebd8a6a1002111654005bfcc42009b01c89ea70
(cherry picked from commit 44d29b0a9012a66f5db5a8130017568a55c11668)
rg/apache/harmony/tests/java/util/prefs/PreferencesTest.java
774864c67ad84bb556104bfd204d59506a333246 13-Jun-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "Fix Preferences regression."
44d29b0a9012a66f5db5a8130017568a55c11668 13-Jun-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Fix Preferences regression.

This change fixes reading filesystem-saved
java.util.prefs.Preferences.

Due to a bug in XmlSupport, when reading the
filesystem-saved preferences, the reader was
throwing an exception. The Android
implementation of xml parser adds additional
nodes that were not Elements, this was
causing a cast exception (the old code was expecting
only Elements).

FileSystemPreferences class was swallowing exceptions if
they happen during preferences content reading.
This changes adds additional logging to prevent this.

Bug: 27645233
Change-Id: Ieebd8a6a1002111654005bfcc42009b01c89ea70
rg/apache/harmony/tests/java/util/prefs/PreferencesTest.java
c95483af9dd706c6212df1006b9110cf1b15dca5 10-Jun-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge \\"Fix clinit-related serialization incompatibility.\\" am: 4c10bf71ef
am: d03189c7ed

Change-Id: I22b9b213ac36ce38949caf4856ba33f1a2a5811c
d1ce77d790fb9655f09a25afde0b91faf187a74c 09-Jun-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Fix clinit-related serialization incompatibility.

For the code:
class Parent {
some code that will create <clinit>
}
class Child extends Parent {}

java.io.ObjectStreamClass.hasStaticInitializer(Child.class)
was returning false. This is technically valid, but historically
android was returning true in this case. This causes
problems with deserializing classes like Child without
explicit serialVersionUID. To mitigate the problem, this
change reverts to old behavior if sdk target <= 23.

Bug: 29064453
Change-Id: Iaff269ced01543469a30b50673a04d3d8722d261
(cherry picked from commit fd17eabf30cec65a5cfb4df1a298fcf515ef7c93)
rg/apache/harmony/tests/java/io/ObjectStreamClassTest.java
4c10bf71ef0a6977378f0e0ada7035153b3f2508 10-Jun-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "Fix clinit-related serialization incompatibility."
fd17eabf30cec65a5cfb4df1a298fcf515ef7c93 09-Jun-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Fix clinit-related serialization incompatibility.

For the code:
class Parent {
some code that will create <clinit>
}
class Child extends Parent {}

java.io.ObjectStreamClass.hasStaticInitializer(Child.class)
was returning false. This is technically valid, but historically
android was returning true in this case. This causes
problems with deserializing classes like Child without
explicit serialVersionUID. To mitigate the problem, this
change reverts to old behavior if sdk target <= 23.

Bug: 29064453
Change-Id: Iaff269ced01543469a30b50673a04d3d8722d261
rg/apache/harmony/tests/java/io/ObjectStreamClassTest.java
9582593bb4752030120aa79ed9ab3205d03e0250 09-Jun-2016 Neil Fuller <nfuller@google.com> Merge "Increase the wait time for assertDurationIsInRange(0)"
8514d7eef21fa8a0eec29e74c025bff35a57c7e3 07-Jun-2016 Neil Fuller <nfuller@google.com> Increase the wait time for assertDurationIsInRange(0)

Addressing flakiness in test_parkFor_3 / test_parkUntil_3.

The wait time permitted was Math.max(expectedMillis * 10, 30)
where expectedMillis = 0. That meant that the test code had
just 30ms between calling Thread.start() and the Parker code being
executed reaching the notifyAll().

Other tests use an expectedMillis of 500 and 300, giving
more time for the Thread to start and complete their wait().
e.g. 4500ms and 2700ms above the expected park time,
respectively.

Bug: 29177727
(cherry picked from commit fe71cd583ca8f5709b25190acc48b28180e192b7)

Change-Id: I82bbd8a6d252ee89a147b671799e4a64e2f7feac
rg/apache/harmony/tests/org/apache/harmony/kernel/dalvik/ThreadsTest.java
5253684d21a25cbe4b3f63f4b4a9beeda758194d 21-Apr-2016 Nicholas Sauer <nicksauer@google.com> Insert security provider into the same position

bug: 28281570
Change-Id: I130017b30715de52d41cc1311352ae45b50e23cb
(cherry picked from commit dd90ad0a24b486f50dc13fe81a0a6f7f26bd950d)
rg/apache/harmony/tests/javax/security/cert/X509CertificateTest.java
59053056232f444a9c7f3f117e4fd16bb3118c90 08-Jun-2016 Shubham Ajmera <shubhamajmera@google.com> Merge "Correct address fields in ByteBufferAsXBuffer classes" into nyc-dev
61e25302dae83c6c5892504dc270149ee3af06c3 08-Jun-2016 Nicholas Sauer <nicksauer@google.com> Merge \\"Fix HttpsURLConnectionTest for CTSv2.\\" am: fa4f4df464
am: 65a10e811c

Change-Id: Ia52b753d02688fc7a30047f9dc7419b8606f94a6
fa4f4df4646dc3be1021e155d70f6bcab2796001 08-Jun-2016 Nicholas Sauer <nicksauer@google.com> Merge "Fix HttpsURLConnectionTest for CTSv2."
86a235c98235572b946691242526b9972c481a30 08-Jun-2016 Shubham Ajmera <shubhamajmera@google.com> Merge \\"Correct address fields in ByteBufferAsXBuffer classes\\" am: b33d82cf57
am: 114047cb79

Change-Id: I8817db3224a7b4376cc431301edda25b86309ce6
10bac63511d71b86bc753215c72bd805d407566a 06-Jun-2016 Shubham Ajmera <shubhamajmera@google.com> Correct address fields in ByteBufferAsXBuffer classes

The value of the address field should be equals to the first element of
the ByteBufferAsXBuffer class, previously, it was pointing to the first
element of the underlying directbytebuffer object.

Bug: 28964300
(cherry-picked from commit e0f383ffa625e584e81061ef4ddef83a9f48809e)
Change-Id: I6dfc98ba408c524580198ea168923981b23a0bc2
rg/apache/harmony/tests/java/nio/DirectCharBufferTest.java
rg/apache/harmony/tests/java/nio/DirectDoubleBufferTest.java
rg/apache/harmony/tests/java/nio/DirectFloatBufferTest.java
rg/apache/harmony/tests/java/nio/DirectIntBufferTest.java
rg/apache/harmony/tests/java/nio/DirectLongBufferTest.java
rg/apache/harmony/tests/java/nio/DirectShortBufferTest.java
e0f383ffa625e584e81061ef4ddef83a9f48809e 06-Jun-2016 Shubham Ajmera <shubhamajmera@google.com> Correct address fields in ByteBufferAsXBuffer classes

The value of the address field should be equals to the first element of
the ByteBufferAsXBuffer class, previously, it was pointing to the first
element of the underlying directbytebuffer object.

Bug: 28964300
Change-Id: I6dfc98ba408c524580198ea168923981b23a0bc2
rg/apache/harmony/tests/java/nio/DirectCharBufferTest.java
rg/apache/harmony/tests/java/nio/DirectDoubleBufferTest.java
rg/apache/harmony/tests/java/nio/DirectFloatBufferTest.java
rg/apache/harmony/tests/java/nio/DirectIntBufferTest.java
rg/apache/harmony/tests/java/nio/DirectLongBufferTest.java
rg/apache/harmony/tests/java/nio/DirectShortBufferTest.java
8539b67ae3e3421aff29168bcb6bff37d3843ba5 26-Apr-2016 Nicholas Sauer <nicksauer@google.com> Fix HttpsURLConnectionTest for CTSv2.

test_getSSLSocketFactory and test_getDefaultSSLSocketFactory
fail when run after SSLSocketFactoryTest
the SSLSocketFactoryTest forces SSLSocketFactory to return a new SocketFactory
object as part of the test. However, the instance held by HttpsURLConnection
is not updated which means that SSLSocketFactory and HttpsURLConnection
have different instances of SSLSocketFactory.

HttpsURLConnectionTest#test_getSSLSocketFactory and
test_getDefaultSSLSocketFactory verifies that the default SSLSocketFactory
in HttpsUrlConnection is the *same* object as what is returned by
SSLSocketFactory -- not just equal. Therefore this change updates the
SSLSocketFactory in HttpsURLConnection before running the tests in
HttpsURLConnectionTest. This allows for testing of getSSLSocketFactory
and getDefaultSSLSocketFactory without being impacted by other tests.

bug:28389618

Change-Id: I0481c89580ba70ea5f104061c5da9c4434eef12d
(cherry picked from commit ab4e7de36fbef96853e5e0e105e7afb50c9645b6)
rg/apache/harmony/tests/javax/net/ssl/HttpsURLConnectionTest.java
39731472c09289e60fdb05b152c327171e67bbde 08-Jun-2016 Neil Fuller <nfuller@google.com> Merge \"Increase the wait time for assertDurationIsInRange(0)\" into nyc-dev
am: 73a51e5188

Change-Id: I6e50a93d9ab65c53c6eb09e591dad274c0080d68
fe71cd583ca8f5709b25190acc48b28180e192b7 07-Jun-2016 Neil Fuller <nfuller@google.com> Increase the wait time for assertDurationIsInRange(0)

Addressing flakiness in test_parkFor_3 / test_parkUntil_3.

The wait time permitted was Math.max(expectedMillis * 10, 30)
where expectedMillis = 0. That meant that the test code had
just 30ms between calling Thread.start() and the Parker code being
executed reaching the notifyAll().

Other tests use an expectedMillis of 500 and 300, giving
more time for the Thread to start and complete their wait().
e.g. 4500ms and 2700ms above the expected park time,
respectively.

Bug: 29177727
Change-Id: I92d34a535f98929b767eebb75d4c49487b9b0348
rg/apache/harmony/tests/org/apache/harmony/kernel/dalvik/ThreadsTest.java
ff15b522f833b8ed46d0ed28548490c78435fa19 20-May-2016 Narayan Kamath <narayan@google.com> Merge "Observable: Call out to hasChanged() to figure out if something changes." am: d19e16bd5e
am: 5c1961f7b6

* commit '5c1961f7b66653b33a9035c0e3a3f1cb56b0ba81':
Observable: Call out to hasChanged() to figure out if something changes.

Change-Id: Ic4de49dc14e697a5ecbf9e3c93bcaf3f17588a05
e03b33ae5072a36e38f2d4a02b4ceb92f29d167e 20-May-2016 Narayan Kamath <narayan@google.com> Observable: Call out to hasChanged() to figure out if something changes.

bug: 28797950

(cherry picked from commit fbabe73723c24c38cbfd6429387dae5e6478513f)

Change-Id: I8dd1cccce31d440782a8b7a6210a89576febbdaa
rg/apache/harmony/tests/java/util/ObservableTest.java
fbabe73723c24c38cbfd6429387dae5e6478513f 20-May-2016 Narayan Kamath <narayan@google.com> Observable: Call out to hasChanged() to figure out if something changes.

bug: 28797950
Change-Id: I3362243c63f72e05ebd72f9243a2d45aa7734c6a
rg/apache/harmony/tests/java/util/ObservableTest.java
b0b20ffd1afe36f42b1b0d1a8bf3298766bee139 03-May-2016 Nicholas Sauer <nicksauer@google.com> Merge "Fix XML Parser related packages names" into nyc-dev
am: 82aa66a111

* commit '82aa66a1111ed02ae879d001b253ba24215bbdee':
Fix XML Parser related packages names

Change-Id: I6c981d3f1f8ffa642534879da8f69ae9b6a1d620
0c78f892938bebf03b62f0de1562ed7c410bfd4b 03-May-2016 Nicholas Sauer <nicksauer@google.com> Fix XML Parser related packages names

bug: 28539976
Change-Id: I38d4968a56f7988070a4b114876badddabe535a1
rg/apache/harmony/tests/org/xml/sax/helpers/ParserAdapterTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/ParserFactoryTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/XMLReaderFactoryTest.java
d76135101bc35789b351d4a7139f325117a29863 29-Apr-2016 Sergio Giro <sgiro@google.com> Merge "JarFile: make getManifestFromReference and getManEntry synchronized"
592f49a571c5d093dd91c647f9df80a0dd527cae 13-Apr-2016 Sergio Giro <sgiro@google.com> JarFile: make getManifestFromReference and getManEntry synchronized

So that all modifications to the cached manifest entry and to the
underlying JarVerifier are synchronized.

computedHasClassPathAttribute and hasClassPathAttribute are just cached
booleans that don't change once set, unsynchronized access to them would
cause only for them to be computed twice in the worst case.

Also, removed dead code and corresponding test.

Bug: 27826114
Change-Id: Id3a9b74997cb462c625861c0284196f74dcb8e9a
(cherry picked from commit f71c7ea18fdeae6d70009209653ac8626b419292)
rg/apache/harmony/tests/java/util/jar/JarFileTest.java
f70bee52723627a19dc2903ef4edb24705324c67 29-Apr-2016 Sergio Giro <sgiro@google.com> Merge "JarFile: make getManifestFromReference and getManEntry synchronized" into nyc-dev
am: c36b57476e

* commit 'c36b57476e89590c04c9c487fd304b0bee2619cf':
JarFile: make getManifestFromReference and getManEntry synchronized

Change-Id: Iadfc9150fec930236d95a362e779fe9bfc2df530
c36b57476e89590c04c9c487fd304b0bee2619cf 29-Apr-2016 Sergio Giro <sgiro@google.com> Merge "JarFile: make getManifestFromReference and getManEntry synchronized" into nyc-dev
f71c7ea18fdeae6d70009209653ac8626b419292 13-Apr-2016 Sergio Giro <sgiro@google.com> JarFile: make getManifestFromReference and getManEntry synchronized

So that all modifications to the cached manifest entry and to the
underlying JarVerifier are synchronized.

computedHasClassPathAttribute and hasClassPathAttribute are just cached
booleans that don't change once set, unsynchronized access to them would
cause only for them to be computed twice in the worst case.

Also, removed dead code and corresponding test.

Bug: 27826114
Change-Id: Id3a9b74997cb462c625861c0284196f74dcb8e9a
rg/apache/harmony/tests/java/util/jar/JarFileTest.java
2a4f40b931ed68adf441e5bd4ec20074cce1548d 27-Apr-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "HttpsURLConnectionTest: Remove bogus tests around socket factories."
b14f410d7d3ce6cf8c554f2df8c227e5e9f8fa97 27-Apr-2016 Narayan Kamath <narayan@google.com> HttpsURLConnectionTest: Remove bogus tests around socket factories.
am: 3c17df3

* commit '3c17df3779d11ff6f0e23ba5d535e0214d6fa8b6':
HttpsURLConnectionTest: Remove bogus tests around socket factories.

Change-Id: Ief08a6e663269136e9598ad854f3a6d3bd218253
d93dd521242a863f7c5c8c77fdafd37d98b9341e 26-Apr-2016 Narayan Kamath <narayan@google.com> HttpsURLConnectionTest: Remove bogus tests around socket factories.

We cannot assert that HttpsURLConnection's defaultSSLSocketFactory
is the same as SSLSocketFactory.getDefault(). In the absence of calls
to HttpsURLConnection.setDefaultSSLSocketFactory, the default factory
will be the same as SSLSocketFactory.getDefault at the point at which
the first HttpsURLConnection object in the runtime is created. The
state of SSLSocketFactory can subsequently be modified via public
API to return a different default.

The best we can do is to return that the default is non-null and that
the value of getSSLSocketFactory mirrors the default. This is already
tested in libcore.javax.net.ssl.HttpsURLConnectionTest.

bug: 28389618

(cherry picked from commit 3c17df3779d11ff6f0e23ba5d535e0214d6fa8b6)

Change-Id: Ic9678ddd91163edf5b8cef00eb762f2c05415006
rg/apache/harmony/tests/javax/net/ssl/HttpsURLConnectionTest.java
3c17df3779d11ff6f0e23ba5d535e0214d6fa8b6 26-Apr-2016 Narayan Kamath <narayan@google.com> HttpsURLConnectionTest: Remove bogus tests around socket factories.

We cannot assert that HttpsURLConnection's defaultSSLSocketFactory
is the same as SSLSocketFactory.getDefault(). In the absence of calls
to HttpsURLConnection.setDefaultSSLSocketFactory, the default factory
will be the same as SSLSocketFactory.getDefault at the point at which
the first HttpsURLConnection object in the runtime is created. The
state of SSLSocketFactory can subsequently be modified via public
API to return a different default.

The best we can do is to return that the default is non-null and that
the value of getSSLSocketFactory mirrors the default. This is already
tested in libcore.javax.net.ssl.HttpsURLConnectionTest.

bug: 28389618
Change-Id: I3026ada429a87316b5a3e7b78ee22d2f9ea4da4d
rg/apache/harmony/tests/javax/net/ssl/HttpsURLConnectionTest.java
6b33df9b44370e9743f95bf05bd600adf7f7ebb4 27-Apr-2016 Shubham Ajmera <shubhamajmera@google.com> Merge "Revert "Remove java.nio.channels.* classes without test coverage."" am: 5e1ca03
am: abc9563

* commit 'abc956348bac6a322adbed1f3cb8d1408a1a3d92':
Revert "Remove java.nio.channels.* classes without test coverage."

Change-Id: I491ed95d1a1616eaa98bf01d36868d63e741bf6c
5e1ca03214176cc3c363639ce001cfdcaf8e2a0f 27-Apr-2016 Shubham Ajmera <shubhamajmera@google.com> Merge "Revert "Remove java.nio.channels.* classes without test coverage.""
533805c1b570b1ecaa963eb02bcd2264adbc95ca 26-Apr-2016 Narayan Kamath <narayan@google.com> ResourceBundle : Use UTF-8 for property based resources.

bug: 26879578

(cherry picked from commit d07ed5829b5449874393b365a3393596406edd31)

Change-Id: I29ee5516c4429712f49a2e1c85dc5fc5dba3a225
rg/apache/harmony/tests/java/util/ResourceBundleTest.java
e318a0eaa02b186f9f135016e95a6282fe9a83cb 08-Apr-2016 Shubham Ajmera <shubhamajmera@google.com> Revert "Remove java.nio.channels.* classes without test coverage."

This reverts commit 624c527fb97947c4f8333f2b27c9a9306e29cd1c.

Bug: 27214236
(cherry-picked from commit b6aab19f3e925bec2f48296e9a5e906d05d96466)
Change-Id: I72f008ff427712261f604e55572a7b483d66c4f8
rg/apache/harmony/tests/java/nio/channels/MockDatagramChannel.java
c52c7b5086f69374d9901b2bee7659a292650d7e 26-Apr-2016 Narayan Kamath <narayan@google.com> Merge "ResourceBundle : Use UTF-8 for property based resources." am: 11a4200
am: cd9c4be

* commit 'cd9c4be1ad5e6e5f421ecbeaabcddae40be8e156':
ResourceBundle : Use UTF-8 for property based resources.

Change-Id: I7db855183e0cecc28acce58ea16497658a67731e
ac8051d6632fe2e0d2c50b0d519e21fa7030f2a0 26-Apr-2016 Narayan Kamath <narayan@google.com> ResourceBundle : Use UTF-8 for property based resources.

bug: 26879578
Change-Id: I9745f8e8846dfe11ed4bfdf1960f08f1b76e9005
rg/apache/harmony/tests/java/util/ResourceBundleTest.java
268e31dfd85157e73765d45e9104509ec5dc47bc 26-Apr-2016 Tobias Thierer <tobiast@google.com> Merge "Fix use of Object.equals() to compare arrays." am: a928927
am: 46e9262

* commit '46e926236853393c9b8282825b64f5a9ddf6b5fd':
Fix use of Object.equals() to compare arrays.

Change-Id: I5ebbfeaede42fdf8225ac2c9e5ca60ccca73d930
ae1fd651a8177b451536d60e3879a1e8770286a8 26-Apr-2016 Tobias Thierer <tobiast@google.com> Merge "Avoid additional Object allocations that are immediately unboxed" am: bdd8f39
am: 383ea62

* commit '383ea6206aaa4d88f95daf376f974aabcc6ca781':
Avoid additional Object allocations that are immediately unboxed

Change-Id: Ia642de8242329ddf6144b95e379965fdccd4a0d3
a9289279e2c5fec15e331bdb2da7e2c15102c1de 26-Apr-2016 Tobias Thierer <tobiast@google.com> Merge "Fix use of Object.equals() to compare arrays."
bdd8f3902d70d45613743c881528236059177b88 26-Apr-2016 Tobias Thierer <tobiast@google.com> Merge "Avoid additional Object allocations that are immediately unboxed"
97a3d514797ffddba65aaa50e352538820a52078 25-Apr-2016 Tobias Thierer <tobiast@google.com> Fix use of Object.equals() to compare arrays.

Use == for object identity, Arrays.equals() for value equality.

Bug: 28189207
Change-Id: I3dcae7f5714e5ab7216b255de376a9c3030f94b8
rg/apache/harmony/tests/java/text/ChoiceFormatTest.java
rg/apache/harmony/tests/javax/security/auth/callback/PasswordCallbackTest.java
a5448c0d798644d549426f037ebc6676b1f4de3e 21-Apr-2016 Tobias Thierer <tobiast@google.com> Avoid additional Object allocations that are immediately unboxed

This should catch most of the remaining cases in libcore, although
I was more hesitant in tests; for example, TreeMapExtendTest does
a lot of unnecessary boxing but the benefit of optimising the test
doesn't seem worth the risk of potentially introducing bugs.

Bug: 28289401
Change-Id: I911d2b5cf130f974427b4fe7e1916f1632e5f4fa
rg/apache/harmony/tests/java/net/MulticastSocketTest.java
baba65acea294729ddc335466c70a5647fccf37b 18-Apr-2016 Shubham Ajmera <shubhamajmera@google.com> Add unit tests for FileChannel#lock #tryLock

The change adds more test for FileChannel #lock and #tryLock.

The change also includes test for overlapping lock using different file
channels.

Bug: 27186422
(cherry-picked from commit fb376ca44c4c3ed1d53b93f32712c4efc9490a76)
Change-Id: Ib040bb28d8ce8417d2cd8fb2c81a9d50519e8fde
rg/apache/harmony/tests/java/nio/channels/FileChannelTest.java
fad0a6d36efece142144e43ececbf7d9ac8ae393 22-Apr-2016 Shubham Ajmera <shubhamajmera@google.com> Merge "Add unit tests for FileChannel#lock #tryLock" into nyc-dev
353fec38b5d571ad0b74270319f172dd4a8c052f 22-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Inet6Address: Provide an explicit hostname for the ANY address." into nyc-dev
1f01b0e27882d669217e3acf9d429ea9afbac47e 20-Apr-2016 Shubham Ajmera <shubhamajmera@google.com> Add missed overrides for OpenJDK 8 Map default methods

Both the replace methods in TreeMap were left intentionally in the
commit 0e83756c4295f4df3853047205d94fe845573522 as there were no
behavioral differences and the default implementation was considered
sufficient. However, the upstream version is more efficient so that is
being added here.

As of now, all the overrides for the Map default implementation have
been put from the upstream, except for Hashtable and HashMap. Both
of these classes are quite different from their OpenJDK 8 versions to
accommodate the overrides. HashMap depends on the default implementation
for the following methods:

#getOrDefault
#replace(K, V)
#computeIfAbsent
#computeIfPresent
#compute
#merge

#replace(K, V, V) was reimplemented due to the behavioral differences
with the default implementation.

The following Hashtable methods are also dependent on the map default
implementation, though, they have added synchronization.

#getOrDefault
#putIfAbsent
#remove
#replace(K, V, V)
#replace(K, V)
#computeIfAbsent
#computeIfPresent
#compute

Once the classes get ready with the new changes comes with OpenJDK 8,
the above methods would be put in.

Bug: 27426743
Change-Id: Iee4fb156eddee17187386bbfffc8517415030a94
(cherry picked from commit f0d9b8aea94c2a207b7b71faaa7a8a2f78ddf1ea)
rg/apache/harmony/tests/java/util/IdentityHashMapTest.java
30a12fedf2b586779e268818d9b2d520787a018b 22-Apr-2016 Narayan Kamath <narayan@google.com> Inet6Address: Provide an explicit hostname for the ANY address.

Inet6Address.ANY was being constructed with a null hostname. This
meant that the first call to getHostName() would set its hostname
to "::". This means that Inet6Address.ANY.toString() would be differ
depending on whether or not getHostName was called. While this is true
of all InetAddresses, it's especially bad behaviour for an address
object that's essentially treated as immutable.

bug: 28294969
Change-Id: I51c1e0bd3da34ac65dfc0739e969b831dc2aeb89
rg/apache/harmony/tests/java/net/ServerSocketTest.java
d4c85d62b38e915786a4aa26dbd03f8242f882d8 22-Apr-2016 Narayan Kamath <narayan@google.com> Inet6Address: Provide an explicit hostname for the ANY address.

Inet6Address.ANY was being constructed with a null hostname. This
meant that the first call to getHostName() would set its hostname
to "::". This means that Inet6Address.ANY.toString() would be differ
depending on whether or not getHostName was called. While this is true
of all InetAddresses, it's especially bad behaviour for an address
object that's essentially treated as immutable.

bug: 28294969

(cherry picked from commit 5861b3547d27c05be153777099eb2f453a79630c)

Change-Id: If73cab4abbcc12c0c4be25f2a0d3dda5e0d0de43
rg/apache/harmony/tests/java/net/ServerSocketTest.java
dd90ad0a24b486f50dc13fe81a0a6f7f26bd950d 21-Apr-2016 Nicholas Sauer <nicksauer@google.com> Insert security provider into the same position

bug: 28281570
Change-Id: I130017b30715de52d41cc1311352ae45b50e23cb
rg/apache/harmony/tests/javax/security/cert/X509CertificateTest.java
969e52ff2fa0125d2f493df0511b292cb8c4107d 20-Jan-2016 Neil Fuller <nfuller@google.com> Allow some rounding on SO_TIMEOUT values

Kernels can round the value in use depending on the HZ setting.
This change allows up to 10ms of slop between the SO_TIMEOUT
value set and the one returned.

Bug: 26583607
Change-Id: I527987de20a6e10172656e1f0beeaf63419ffd77
(cherry picked from commit 6566167989735858978d062a4385104ce5eca7e3)
rg/apache/harmony/tests/java/net/DatagramSocketTest.java
rg/apache/harmony/tests/java/net/ServerSocketTest.java
rg/apache/harmony/tests/java/net/SocketTest.java
fb376ca44c4c3ed1d53b93f32712c4efc9490a76 18-Apr-2016 Shubham Ajmera <shubhamajmera@google.com> Add unit tests for FileChannel#lock #tryLock

The change adds more test for FileChannel #lock and #tryLock.

The change also includes test for overlapping lock using different file
channels.

Bug: 27186422
Change-Id: Ib040bb28d8ce8417d2cd8fb2c81a9d50519e8fde
rg/apache/harmony/tests/java/nio/channels/FileChannelTest.java
f0d9b8aea94c2a207b7b71faaa7a8a2f78ddf1ea 20-Apr-2016 Shubham Ajmera <shubhamajmera@google.com> Add missed overrides for OpenJDK 8 Map default methods

Both the replace methods in TreeMap were left intentionally in the
commit 0e83756c4295f4df3853047205d94fe845573522 as there were no
behavioral differences and the default implementation was considered
sufficient. However, the upstream version is more efficient so that is
being added here.

As of now, all the overrides for the Map default implementation have
been put from the upstream, except for Hashtable and HashMap. Both
of these classes are quite different from their OpenJDK 8 versions to
accommodate the overrides. HashMap depends on the default implementation
for the following methods:

#getOrDefault
#replace(K, V)
#computeIfAbsent
#computeIfPresent
#compute
#merge

#replace(K, V, V) was reimplemented due to the behavioral differences
with the default implementation.

The following Hashtable methods are also dependent on the map default
implementation, though, they have added synchronization.

#getOrDefault
#putIfAbsent
#remove
#replace(K, V, V)
#replace(K, V)
#computeIfAbsent
#computeIfPresent
#compute

Once the classes get ready with the new changes comes with OpenJDK 8,
the above methods would be put in.

Bug: 27426743
Change-Id: Iee4fb156eddee17187386bbfffc8517415030a94
rg/apache/harmony/tests/java/util/IdentityHashMapTest.java
d36814c40fda36e1440ff96ba8bcff9c5ce71ba6 19-Apr-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "ObjectStreamClass: Add a workaround for abusers of private API." into nyc-dev
dde34deda1ddfd5f9860850e7b3730acaca6fb59 18-Apr-2016 Narayan Kamath <narayan@google.com> ObjectStreamClass: Add a workaround for abusers of private API.

- ObjectStreamClass.getConstructorId(Class<?>) : returns a constant.
- ObjectStreamClass.newInstance(Class<?>, long) : calls through to
sun.misc.Unsafe.allocateInstance.

*** THIS CHANGE WILL BE REVERTED IN A FUTURE ANDROID RELEASE ***

bug: 28106822

(cherry picked from commit 987c9cae27659c044ae474fa92d9f1c51ecba9e0)

Change-Id: I64c5c7e90d7c059114b33e84d5ea8ba69f8f6537
rg/apache/harmony/tests/java/io/ObjectStreamClassTest.java
987c9cae27659c044ae474fa92d9f1c51ecba9e0 18-Apr-2016 Narayan Kamath <narayan@google.com> ObjectStreamClass: Add a workaround for abusers of private API.

- ObjectStreamClass.getConstructorId(Class<?>) : returns a constant.
- ObjectStreamClass.newInstance(Class<?>, long) : calls through to
sun.misc.Unsafe.allocateInstance.

*** THIS CHANGE WILL BE REVERTED IN A FUTURE ANDROID RELEASE ***

bug: 28106822

Change-Id: I8c584b11e6779880a61dd2bc462e1a380e86ec89
rg/apache/harmony/tests/java/io/ObjectStreamClassTest.java
a4750c7d39fb853458c8deb1d0d7da780b29b15a 15-Apr-2016 Neil Fuller <nfuller@google.com> Explicitly set locale to en_US for tests that require it

Previously these tests would use the device setting. The follow tests
broke if the device was set to en_UK:

libcore.java.text.SimpleDateFormatTest#testTimeZoneNotChangedByParse
org.apache.harmony.tests.java.util.GregorianCalendarTest#test_getLeastMaximumI
libcore.java.util.GregorianCalendarTest#test_getWeeksInWeekYear

The GregorianCalendar tests broke because the locale influences the
"start of week".
The SimpleDateFormat test broke because HST is not an ICU translation for
en_UK but is for en_US.

Bug: 28212178
(cherry picked from commit 3819290afba2199d4ddf5da88e5b3717b59863f6)

Change-Id: I15f6e0f0133a876b0d4173dacef8fad7506f52ab
rg/apache/harmony/tests/java/util/GregorianCalendarTest.java
3819290afba2199d4ddf5da88e5b3717b59863f6 15-Apr-2016 Neil Fuller <nfuller@google.com> Explicitly set locale to en_US for tests that require it

Previously these tests would use the device setting. The follow tests
broke if the device was set to en_UK:

libcore.java.text.SimpleDateFormatTest#testTimeZoneNotChangedByParse
org.apache.harmony.tests.java.util.GregorianCalendarTest#test_getLeastMaximumI
libcore.java.util.GregorianCalendarTest#test_getWeeksInWeekYear

The GregorianCalendar tests broke because the locale influences the
"start of week".
The SimpleDateFormat test broke because HST is not an ICU translation for
en_UK but is for en_US.

Bug: 28212178
Change-Id: Id4c9ca48dcc821e8f7c6af22d7e8a9fbce57d62c
rg/apache/harmony/tests/java/util/GregorianCalendarTest.java
4adf3320be7004bde3a7756058acdbeca8637d1c 08-Apr-2016 Yi Kong <yikong@google.com> Port a number of OpenJDK8 stream methods

Ports the following methods with tests:
java.io.BufferedReader#lines
java.util.BitSet#stream
java.util.Random#doubles
java.util.Random#ints
java.util.Random#longs
java.util.regex.Pattern#asPredicate
java.util.regex.Pattern#splitAsStream

Bug: 28108421
Change-Id: I4813221c69c207ba42ae306d231f3f7c807abbc6
(cherry picked from commit 2c4230d24a2349039b4d7d513d0fb61542bc4cb7)
rg/apache/harmony/tests/java/io/BufferedReaderTest.java
2c4230d24a2349039b4d7d513d0fb61542bc4cb7 08-Apr-2016 Yi Kong <yikong@google.com> Port a number of OpenJDK8 stream methods

Ports the following methods with tests:
java.io.BufferedReader#lines
java.util.BitSet#stream
java.util.Random#doubles
java.util.Random#ints
java.util.Random#longs
java.util.regex.Pattern#asPredicate
java.util.regex.Pattern#splitAsStream

Bug: 28108421
Change-Id: I4813221c69c207ba42ae306d231f3f7c807abbc6
rg/apache/harmony/tests/java/io/BufferedReaderTest.java
f1aab72f51a6e520fd1374d2e0277363726b3481 05-Apr-2016 Yi Kong <yikong@google.com> Port OpenJDK8 java.lang functional util methods

Bug: 28036657
Change-Id: I148dda52b4cb86b76ed96b2bd2f8dc01114fe2a2
(cherry picked from commit e9d9ae3d5e57a60e20c2c01e3dceb3e51de8b9f4)
rg/apache/harmony/tests/java/lang/MathTest.java
rg/apache/harmony/tests/java/lang/StrictMathTest.java
9cf8977a2f921af023de074f1a25616eb89fc757 07-Apr-2016 Yi Kong <yikong@google.com> Merge "Port OpenJDK8 java.lang functional util methods"
59df7aa975c970bd26131289d46d3acd26e3edb8 04-Apr-2016 Shubham Ajmera <shubhamajmera@google.com> Add Arrays$ArrayList::replaceAll

and corresponding test.

Bug: 27540008

(cherry-picked from commit 2c5ded18d09c06540892bfee5d20b69038029f8a)

Change-Id: Ib755e5f183fc05d03b1696c3c660d8508fe719f6
rg/apache/harmony/tests/java/util/Arrays2Test.java
e9d9ae3d5e57a60e20c2c01e3dceb3e51de8b9f4 05-Apr-2016 Yi Kong <yikong@google.com> Port OpenJDK8 java.lang functional util methods

Bug: 28036657
Change-Id: I148dda52b4cb86b76ed96b2bd2f8dc01114fe2a2
rg/apache/harmony/tests/java/lang/MathTest.java
rg/apache/harmony/tests/java/lang/StrictMathTest.java
01e8682d6bc9803354f976e7a2ded91be0f42085 06-Apr-2016 Shubham Ajmera <shubhamajmera@google.com> Merge "Add Arrays$ArrayList::replaceAll" into nyc-dev
2c5ded18d09c06540892bfee5d20b69038029f8a 04-Apr-2016 Shubham Ajmera <shubhamajmera@google.com> Add Arrays$ArrayList::replaceAll

and corresponding test.

Bug: 27540008
Change-Id: Ib755e5f183fc05d03b1696c3c660d8508fe719f6
rg/apache/harmony/tests/java/util/Arrays2Test.java
fb34431c917d206542a3eeb42338f8fb42fc40a9 30-Mar-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Handle recvfrom() returning 0.

According to the Linux man page, recvfrom() can return 0 when the peer has performed an orderly shutdown. This also happens when other thread uses a shutdown function on a socket file descriptor.

libcore.io.Posix#recvfrom was treating this case as a success and
was trying to interpret unpopulated sockaddr structure, throwing
IllegalArgumentException in result.

DatagramChannel#receive in same case would return
last previously seen SocketAddress.

This change makes sure that libcore.io.Posix#recvfrom and
java.nio.channels.DatagramChannel handle this case correctly.

Bug: 27294715
Bug: 27233089
Change-Id: I1ec58327efbe9ea6b8d36716756a02987e3b9897
(cherry picked from commit 6e888e9390649a9ab2557da5b28bb75be39e1b74)
rg/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java
6e888e9390649a9ab2557da5b28bb75be39e1b74 30-Mar-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Handle recvfrom() returning 0.

According to the Linux man page, recvfrom() can return 0 when the peer has performed an orderly shutdown. This also happens when other thread uses a shutdown function on a socket file descriptor.

libcore.io.Posix#recvfrom was treating this case as a success and
was trying to interpret unpopulated sockaddr structure, throwing
IllegalArgumentException in result.

DatagramChannel#receive in same case would return
last previously seen SocketAddress.

This change makes sure that libcore.io.Posix#recvfrom and
java.nio.channels.DatagramChannel handle this case correctly.

Bug: 27294715
Bug: 27233089
Change-Id: I1ec58327efbe9ea6b8d36716756a02987e3b9897
rg/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java
7f1dee49e3d501a91589f52c92f26c7bf078273d 23-Mar-2016 Neil Fuller <nfuller@google.com> Comment assertion related to harmony behavior

This line was supposed to be commented by commit
1a01a6513ffe17389a1f32d4416166741a6973a4

Bug: 27158550
(cherry picked from commit 2cbcbf0677be8ec53adbc27cd4c949892ccfc046)

Change-Id: I1f923a9482ac8f2c23ec0a2af9f335ffdcd14255
rg/apache/harmony/tests/java/text/SimpleDateFormatTest.java
8fc7d37ff5c11c9447b0fd34430dc7901bb3c7a8 23-Mar-2016 Neil Fuller <nfuller@google.com> Merge "Comment assertion related to harmony behavior" into nyc-dev
2cbcbf0677be8ec53adbc27cd4c949892ccfc046 23-Mar-2016 Neil Fuller <nfuller@google.com> Comment assertion related to harmony behavior

This line was supposed to be commented by commit
1a01a6513ffe17389a1f32d4416166741a6973a4

Bug: 27158550
Change-Id: Id78bd571f97e3ca18506d14a9a3a0cadfa5f273c
rg/apache/harmony/tests/java/text/SimpleDateFormatTest.java
7e2dda10b3dadb2837201276fb94605163dba61f 21-Mar-2016 Neil Fuller <nfuller@google.com> Fix CTS tests broken by the switch to OpenJDK code

This commit includes a refactoring to avoids relying on the same
DateFormat instance when parsing multiple strings.
Due to bug 27760434 the Android SimpleDateFormat does not currently
reset the calendar timezone after a parse() which
can cause test state to leak from one test to another. Explicitly
creating / providing a new SimpleDateFormat instance to use for
parsing and formatting also makes the tests clearer.

Two actual fixes:

1) Explicitly creating a new format in assertParse() fixes
test_parseLjava_lang_StringLjava_text_ParsePosition, which used
to work because the timezone was reset after a parse. Bug 27760434
has been created to follow up and potentially revert the
SimpleDateFormat to the old Android behavior.

2) test_parse_W_w_dd_MMMM_yyyy_EEEE no longer tests that parsing
"3 12 10 March 2002 Monday" results in the expected date. The
pattern includes multiple indicators of day and month and the
resulting Date is an indication of the internal implementation more
than a meaningful result. There are numerous other tests that
involve similar patterns but only this one actually broke.

Bug: 26023857
Bug: 27158550
Bug: 27760434
(cherry picked from commit 1a01a6513ffe17389a1f32d4416166741a6973a4)

Change-Id: I1f333505a5d16ce23b2ff47f0189b112b34f4a3a
rg/apache/harmony/tests/java/text/SimpleDateFormatTest.java
a06383adfd8dd80e41796d943e7048abd3aa0b0f 21-Mar-2016 Narayan Kamath <narayan@google.com> Merge "Fix CTS tests broken by the switch to OpenJDK code" into nyc-dev
1a01a6513ffe17389a1f32d4416166741a6973a4 21-Mar-2016 Neil Fuller <nfuller@google.com> Fix CTS tests broken by the switch to OpenJDK code

This commit includes a refactoring to avoids relying on the same
DateFormat instance when parsing multiple strings.
Due to bug 27760434 the Android SimpleDateFormat does not currently
reset the calendar timezone after a parse() which
can cause test state to leak from one test to another. Explicitly
creating / providing a new SimpleDateFormat instance to use for
parsing and formatting also makes the tests clearer.

Two actual fixes:

1) Explicitly creating a new format in assertParse() fixes
test_parseLjava_lang_StringLjava_text_ParsePosition, which used
to work because the timezone was reset after a parse. Bug 27760434
has been created to follow up and potentially revert the
SimpleDateFormat to the old Android behavior.

2) test_parse_W_w_dd_MMMM_yyyy_EEEE no longer tests that parsing
"3 12 10 March 2002 Monday" results in the expected date. The
pattern includes multiple indicators of day and month and the
resulting Date is an indication of the internal implementation more
than a meaningful result. There are numerous other tests that
involve similar patterns but only this one actually broke.

Bug: 26023857
Bug: 27158550
Bug: 27760434
Change-Id: Id7829c4c6930d008d2dfcb978e4f0bc29f49dbf7
rg/apache/harmony/tests/java/text/SimpleDateFormatTest.java
def94956afbfc17ea65390d16d032f9b790a5dca 18-Mar-2016 Narayan Kamath <narayan@google.com> Spliterators: pull in additional specializations.

This change also pulls in a few javadoc improvements to Collections
to make our lives easier.

bug: 27605529

(cherry picked from commit c86e0fa98d8274d7ea01213a20e3a14575406dd0)

Change-Id: I97f05ae833034f1e5a7d32329f8e19de6b97e779
rg/apache/harmony/tests/java/util/ArrayListTest.java
c86e0fa98d8274d7ea01213a20e3a14575406dd0 18-Mar-2016 Narayan Kamath <narayan@google.com> Spliterators: pull in additional specializations.

This change also pulls in a few javadoc improvements to Collections
to make our lives easier.

bug: 27605529

Change-Id: I3947697e18c057a864a6d13af0569b02acd64206
rg/apache/harmony/tests/java/util/ArrayListTest.java
01cf2b259d3cdb98b99e403c74141fe602d6720b 18-Mar-2016 Kenny Root <kroot@google.com> Fix what .getPeerHost() test expects

Since .getPeerHost() shouldn't really do a reverse lookup if it only has
an IP address, we directly ask the serverSocket what its address was.
This should be robust if someone in the future were to change
.getLocalSocketAddress() to be based on a name like "localhost" instead
of the current INADDR_ANY logic.

(cherry picked from commit 6edda46911513fdff8bd30052c31fa8aa492dea9)

Bug: 27692206
Change-Id: Icc062797f12fbc3a1aba6fb3dc421461a7895f4d
rg/apache/harmony/tests/javax/net/ssl/SSLSessionTest.java
538e90277efd37c0c127603552b3535e60d70c0a 18-Mar-2016 Kenny Root <kroot@google.com> Merge "Fix what .getPeerHost() test expects"
8e06d7bdd50edba2b2af3ede7515c5145c2d49e2 18-Mar-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Add openJdk8 static (Float|Double)#isFinite methods.

Bug: 27692239
Change-Id: I612c9dd4369eb0cd479db6788322c8b289b14387
(cherry picked from commit 5bad107355d440409eea313b60c40bc32c12e295)
rg/apache/harmony/tests/java/lang/DoubleTest.java
rg/apache/harmony/tests/java/lang/FloatTest.java
5bad107355d440409eea313b60c40bc32c12e295 18-Mar-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Add openJdk8 static (Float|Double)#isFinite methods.

Bug: 27692239
Change-Id: I612c9dd4369eb0cd479db6788322c8b289b14387
rg/apache/harmony/tests/java/lang/DoubleTest.java
rg/apache/harmony/tests/java/lang/FloatTest.java
887ab3fe607c582e10e33b3d631401d7a791aaed 17-Mar-2016 Narayan Kamath <narayan@google.com> Vector: Rework CME checks in hasNext() and next().

Port over commit b10b2a3ab693cfd6156d06ffe4e00ce69b9c9194
from java.util.ArrayList to java.util.Vector.

Also adds the same set of tests to Vector / ArrayList so
to make sure their iterators behave identically in this regard.

bug: 27430229

(cherry picked from commit 6e5b758a4438d2c154dd11a5c04d14a5d2fc907c)

Change-Id: I04cadc3eac6d591ce8b93d04a999825f65fb867a
rg/apache/harmony/tests/java/util/ArrayListTest.java
rg/apache/harmony/tests/java/util/VectorTest.java
6e5b758a4438d2c154dd11a5c04d14a5d2fc907c 17-Mar-2016 Narayan Kamath <narayan@google.com> Vector: Rework CME checks in hasNext() and next().

Port over commit b10b2a3ab693cfd6156d06ffe4e00ce69b9c9194
from java.util.ArrayList to java.util.Vector.

Also adds the same set of tests to Vector / ArrayList so
to make sure their iterators behave identically in this regard.

bug: 27430229

Change-Id: Idd8e44737a216ac5ea9f1e6fed8892b364997292
rg/apache/harmony/tests/java/util/ArrayListTest.java
rg/apache/harmony/tests/java/util/VectorTest.java
6edda46911513fdff8bd30052c31fa8aa492dea9 18-Mar-2016 Kenny Root <kroot@google.com> Fix what .getPeerHost() test expects

Since .getPeerHost() shouldn't really do a reverse lookup if it only has
an IP address, we directly ask the serverSocket what its address was.
This should be robust if someone in the future were to change
.getLocalSocketAddress() to be based on a name like "localhost" instead
of the current INADDR_ANY logic.

Bug: 27692206
Change-Id: Icc062797f12fbc3a1aba6fb3dc421461a7895f4d
rg/apache/harmony/tests/javax/net/ssl/SSLSessionTest.java
4605fa7840c6774fa7788c2f0d0fa2524b2cf432 16-Mar-2016 Sergio Giro <sgiro@google.com> Merge "AVA: fix handling of whitespace in DN"
91921d3d09723f15aeb118b07725a5bceeadcf6e 15-Mar-2016 Sergio Giro <sgiro@google.com> AVA: fix handling of whitespace in DN

Currently, only one space was allowed due to an error in the code

(cherry picked from commit 13d8138db344650f6c8f1248fdbe4ac98ab28f1c)
Bug: 26869064

Change-Id: I2107a447d7ac1b1797825360d4885af5acc0507b
rg/apache/harmony/tests/javax/security/auth/x500/X500PrincipalTest.java
bb13b0983647560240ef5ff78f1a58779e88af94 16-Mar-2016 Sergio Giro <sgiro@google.com> Merge "AVA: fix handling of whitespace in DN" into nyc-dev
13d8138db344650f6c8f1248fdbe4ac98ab28f1c 15-Mar-2016 Sergio Giro <sgiro@google.com> AVA: fix handling of whitespace in DN

Currently, only one space was allowed due to an error in the code

Bug: 26869064
Change-Id: I35aa66f4a618af7480771323dc21a29ede913c11
rg/apache/harmony/tests/javax/security/auth/x500/X500PrincipalTest.java
5c35c7ebda68cc39b6bdee20f678a150336ebd1d 14-Mar-2016 Yi Kong <yikong@google.com> Port java.util.Collection.removeIf from OpenJDK8

Source code is taken from jdk8u60.

Bug: 27538943
Change-Id: I485c024f87871e33d2f455be9807775601af77ee
(cherry picked from commit d41ca4a76ea570f9dd89a7ae56410cc75cc0a856)
rg/apache/harmony/tests/java/util/ArrayListTest.java
rg/apache/harmony/tests/java/util/CollectionsTest.java
rg/apache/harmony/tests/java/util/LinkedListTest.java
rg/apache/harmony/tests/java/util/VectorTest.java
5d112430b318e68acbea5b2a273c7168b8923412 15-Mar-2016 Yi Kong <yikong@google.com> Merge "Port java.util.Collection.removeIf from OpenJDK8"
471945701ad7895acf0dae73f90a5f18cd9ca23a 02-Mar-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Port of oJdk8 Arrays#parallelSort* & tests

Based on openJdk 8u40 source & iam@ stream change in
ag/872080

Bug: 27426684
Change-Id: I86e5b8a61201c73ab2e8bac069e540c9ca8dc120
(cherry picked from commit c9b5ffc066d5ea92fdbf0cfd7ea7f56a6e96a4ab)
rg/apache/harmony/tests/java/util/ArraysTest.java
c9b5ffc066d5ea92fdbf0cfd7ea7f56a6e96a4ab 02-Mar-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Port of oJdk8 Arrays#parallelSort* & tests

Based on openJdk 8u40 source & iam@ stream change in
ag/872080

Bug: 27426684
Change-Id: I86e5b8a61201c73ab2e8bac069e540c9ca8dc120
rg/apache/harmony/tests/java/util/ArraysTest.java
d41ca4a76ea570f9dd89a7ae56410cc75cc0a856 14-Mar-2016 Yi Kong <yikong@google.com> Port java.util.Collection.removeIf from OpenJDK8

Source code is taken from jdk8u60.

Bug: 27538943
Change-Id: I485c024f87871e33d2f455be9807775601af77ee
rg/apache/harmony/tests/java/util/ArrayListTest.java
rg/apache/harmony/tests/java/util/CollectionsTest.java
rg/apache/harmony/tests/java/util/LinkedListTest.java
rg/apache/harmony/tests/java/util/VectorTest.java
eff43d8020c944c2186a3b47053c8884850378d0 11-Mar-2016 Kenny Root <kroot@google.com> Merge "SSLSessionTest: compare equality of SSLSession by contents" into nyc-dev
3a923d039f9176b87d6ee449e9b263cf5cd902ed 11-Mar-2016 Narayan Kamath <narayan@google.com> Fix cts-v1 build breakage.

We're still using javac for CollectAllTests and javac complains
about referencing a variable that isn't effectively final from a
lambda expression. Jack erroneously doesn't complain (b/27605155).

bug: 27426688

(cherry picked from commit b9050f600e72322f8d86db21ab9b0d41aff860e7)

Change-Id: I2870e18cfb088dd25a660b6a68c4dc23c1d3cc2e
rg/apache/harmony/tests/java/util/ArrayListTest.java
b9050f600e72322f8d86db21ab9b0d41aff860e7 11-Mar-2016 Narayan Kamath <narayan@google.com> Fix cts-v1 build breakage.

We're still using javac for CollectAllTests and javac complains
about referencing a variable that isn't effectively final from a
lambda expression. Jack erroneously doesn't complain (b/27605155).

bug: 27426688
Change-Id: I96581185c124c237f84910e633b652544d48a6c0
rg/apache/harmony/tests/java/util/ArrayListTest.java
4a703242e4014a598875205a81edaaae04b41840 12-Feb-2016 Kenny Root <kroot@google.com> SSLSessionTest: compare equality of SSLSession by contents

If the SSLSession received from the cache was not the exact same object,
the #getId() tests would fail. Instead compare the SSLSession by its
contents.

This has cropped up now because we have ExtendedSSLSession in addition
to SSLSession. Conscrypt, in order to maintain backward compatibility
for unbundled builds, wraps its internal SSLSession implementation with
a delegating subclass of ExtendedSSLSession in order to implement newer
method calls in terms of its internal implementation without sacrificing
the ability to build against previous versions.

(cherry picked from commit 1a3e2a79e78132f00c907a9d64cd0f5a45568796)

Bug: 27123298
Change-Id: Id6b446b146941532373ab7fcfc6b3ca464b3aabf
rg/apache/harmony/tests/javax/net/ssl/SSLSessionTest.java
8b056f0b15bc1e45da8d4c504353b05e681ac013 04-Mar-2016 Narayan Kamath <narayan@google.com> Add java.lang.Iterable.spliterator() and supporting classes.

The only android specific changes here are to HashMap - their
spliterators add Spliterator.ORDERED if the HashMap is an instance
of a LinkedHashMap.

There's some degree of duplication between the test code used to
exercise primitive arrays (Arrays / Spliterators provide similar
APIs). These differences are quite hard to consolidate, since the
Arrays version declares that their Spliterators are ORDERED but
the Spliterator version doesn't. The latter also allows us to declare
additional Spliterator characteristics.

bug: 27426688
Change-Id: I191a9319d4af7e22834f2d91f73634a227b36bc2
rg/apache/harmony/tests/java/util/ArrayDequeTest.java
rg/apache/harmony/tests/java/util/ArrayListTest.java
rg/apache/harmony/tests/java/util/ArraysTest.java
rg/apache/harmony/tests/java/util/HashMapTest.java
rg/apache/harmony/tests/java/util/HashSetTest.java
rg/apache/harmony/tests/java/util/IdentityHashMapTest.java
rg/apache/harmony/tests/java/util/LinkedHashMapTest.java
rg/apache/harmony/tests/java/util/LinkedHashSetTest.java
rg/apache/harmony/tests/java/util/LinkedListTest.java
rg/apache/harmony/tests/java/util/PriorityQueueTest.java
rg/apache/harmony/tests/java/util/TreeSetTest.java
rg/apache/harmony/tests/java/util/VectorTest.java
rg/apache/harmony/tests/java/util/WeakHashMapTest.java
a73ca5822d77cff8b675ead6e5a3ad190183ba1c 04-Mar-2016 Narayan Kamath <narayan@google.com> Add java.lang.Iterable.spliterator() and supporting classes (part 2).

A git snafu meant that the delta between PS9 and PS10 of the aosp
commit this was cherry-picked from did not make it to nyc-dev. This
change commits that delta.

bug: 27426688
Change-Id: I18e9f8ea397ab5463a5ff671167feaa20512afa5
rg/apache/harmony/tests/java/util/ArrayDequeTest.java
rg/apache/harmony/tests/java/util/ArraysTest.java
rg/apache/harmony/tests/java/util/HashMapTest.java
rg/apache/harmony/tests/java/util/VectorTest.java
rg/apache/harmony/tests/java/util/WeakHashMapTest.java
4c89023ef86f29fa9add7db2574f2169fe842577 04-Mar-2016 Narayan Kamath <narayan@google.com> Add java.lang.Iterable.spliterator() and supporting classes.

The only android specific changes here are to HashMap - their
spliterators add Spliterator.ORDERED if the HashMap is an instance
of a LinkedHashMap.

There's some degree of duplication between the test code used to
exercise primitive arrays (Arrays / Spliterators provide similar
APIs). These differences are quite hard to consolidate, since the
Arrays version declares that their Spliterators are ORDERED but
the Spliterator version doesn't. The latter also allows us to declare
additional Spliterator characteristics.

(cherry-picked from commit ed21aa3a8dcd34eca6f0317eeb683e7afdc825b9)

bug: 27426688
Change-Id: I191a9319d4af7e22834f2d91f73634a227b36bc2
rg/apache/harmony/tests/java/util/ArrayDequeTest.java
rg/apache/harmony/tests/java/util/ArrayListTest.java
rg/apache/harmony/tests/java/util/ArraysTest.java
rg/apache/harmony/tests/java/util/HashMapTest.java
rg/apache/harmony/tests/java/util/HashSetTest.java
rg/apache/harmony/tests/java/util/IdentityHashMapTest.java
rg/apache/harmony/tests/java/util/LinkedHashMapTest.java
rg/apache/harmony/tests/java/util/LinkedHashSetTest.java
rg/apache/harmony/tests/java/util/LinkedListTest.java
rg/apache/harmony/tests/java/util/PriorityQueueTest.java
rg/apache/harmony/tests/java/util/TreeSetTest.java
rg/apache/harmony/tests/java/util/VectorTest.java
rg/apache/harmony/tests/java/util/WeakHashMapTest.java
a71c780559190439211e731ea8ecf1e0291685d9 04-Mar-2016 Narayan Kamath <narayan@google.com> Fix ArrayDeque forEachRemaining tests.

bug: 27426688

(cherry picked from commit 3de87b847fa94cce9beaf5b225404c1bc7ec475f)

Change-Id: Id5703cf10a673f2bb0caba6ded0fec12a468c674
rg/apache/harmony/tests/java/util/ArrayDequeTest.java
3de87b847fa94cce9beaf5b225404c1bc7ec475f 04-Mar-2016 Narayan Kamath <narayan@google.com> Fix ArrayDeque forEachRemaining tests.

Change-Id: Ibcc637d77d6ae1332fc9cc99e3915f23482db5a8
rg/apache/harmony/tests/java/util/ArrayDequeTest.java
3984cdba314a0f7b0587000dec99ff26fd9bcbb5 02-Mar-2016 Narayan Kamath <narayan@google.com> Add Iterator.forEachRemaining / Iterator.remove.

Also pulls in various specializations from concrete subclasses.

bug: 27426688

(cherry picked from commit e633814ad4dc6c7dc0c34080292c2c9622cbd5a3)

Change-Id: Ic778fb61768ec2495e1ac17029afbdfd97d5e6db
rg/apache/harmony/tests/java/util/ArrayDequeTest.java
rg/apache/harmony/tests/java/util/ArrayListTest.java
rg/apache/harmony/tests/java/util/LinkedListTest.java
rg/apache/harmony/tests/java/util/VectorTest.java
e633814ad4dc6c7dc0c34080292c2c9622cbd5a3 02-Mar-2016 Narayan Kamath <narayan@google.com> Add Iterator.forEachRemaining / Iterator.remove.

Also pulls in various specializations from concrete subclasses.

bug: 27426688
Change-Id: I4d37bb61973447b5621fc2b389a04d40666a941d
rg/apache/harmony/tests/java/util/ArrayDequeTest.java
rg/apache/harmony/tests/java/util/ArrayListTest.java
rg/apache/harmony/tests/java/util/LinkedListTest.java
rg/apache/harmony/tests/java/util/VectorTest.java
60d6a93a65a7ba45a58867a4afd3242682b17c21 02-Mar-2016 Narayan Kamath <narayan@google.com> Double,Integer,Long: Add static hashCode / sum / max / min methods.

Also add basic tests. These methods delegate to Math.max / Math.min
respectively, so further tests have been added to the Math tests in
case these implementations ever diverge.

bug: 27423298

(cherry picked from commit 2729b8c4d261706b2ed7b17930d91c2b25e9a315)

Change-Id: I75b46e7582ae22ee759bf1f4a68a5f1b2f410864
rg/apache/harmony/tests/java/lang/MathTest.java
2729b8c4d261706b2ed7b17930d91c2b25e9a315 02-Mar-2016 Narayan Kamath <narayan@google.com> Double,Integer,Long: Add static hashCode / sum / max / min methods.

Also add basic tests. These methods delegate to Math.max / Math.min
respectively, so further tests have been added to the Math tests in
case these implementations ever diverge.

bug: 27423298
Change-Id: I9c6faadea9a9d6a52d934583f86d67e1745e5dce
rg/apache/harmony/tests/java/lang/MathTest.java
60796efea3a74e02aea384b8eb56103ea21b880b 29-Feb-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Add Iterable#forEach & Map#forEach from openJdk8

Based on openJdk 8u40 source & iam@ stream change in
ag/872080

Bug: 27404545
Change-Id: Ic67e20b35c24e7acce513e010b727510af09a83e
(cherry picked from commit c3a9db83a352d92d5a6e0098f22bde07e34a1d3b)
rg/apache/harmony/tests/java/util/ArrayListTest.java
rg/apache/harmony/tests/java/util/Arrays2Test.java
rg/apache/harmony/tests/java/util/Collections2Test.java
rg/apache/harmony/tests/java/util/HashMapTest.java
rg/apache/harmony/tests/java/util/HashSetTest.java
rg/apache/harmony/tests/java/util/HashtableTest.java
rg/apache/harmony/tests/java/util/IdentityHashMapTest.java
rg/apache/harmony/tests/java/util/LinkedHashMapTest.java
rg/apache/harmony/tests/java/util/TreeMapTest.java
rg/apache/harmony/tests/java/util/VectorTest.java
rg/apache/harmony/tests/java/util/WeakHashMapTest.java
c3a9db83a352d92d5a6e0098f22bde07e34a1d3b 29-Feb-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Add Iterable#forEach & Map#forEach from openJdk8

Based on openJdk 8u40 source & iam@ stream change in
ag/872080

Bug: 27404545
Change-Id: Ic67e20b35c24e7acce513e010b727510af09a83e
rg/apache/harmony/tests/java/util/ArrayListTest.java
rg/apache/harmony/tests/java/util/Arrays2Test.java
rg/apache/harmony/tests/java/util/Collections2Test.java
rg/apache/harmony/tests/java/util/HashMapTest.java
rg/apache/harmony/tests/java/util/HashSetTest.java
rg/apache/harmony/tests/java/util/HashtableTest.java
rg/apache/harmony/tests/java/util/IdentityHashMapTest.java
rg/apache/harmony/tests/java/util/LinkedHashMapTest.java
rg/apache/harmony/tests/java/util/TreeMapTest.java
rg/apache/harmony/tests/java/util/VectorTest.java
rg/apache/harmony/tests/java/util/WeakHashMapTest.java
16f931725d5c045362b17ac6a7d9aaa8104d807b 23-Feb-2016 Kenny Root <kroot@google.com> Merge "SSLSessionTest: compare equality of SSLSession by contents"
aff7af3b344bf882620489631633e09fabfcd58d 19-Feb-2016 Narayan Kamath <narayan@google.com> nio: Add unit tests for setOption / getOption.

This also revealed an asymmetry in our APIs. The class defined
setOption but was missing a getOption method (inherited from
NetworkChannel).

bug: 27186457

(cherry-picked from commit dbbe65b6a81ad02bc3bd432f21dccce6c0242cdb)

Change-Id: I823af602b258bfc5f7508dc767af7f8dc4fcf537
rg/apache/harmony/tests/java/nio/channels/MockDatagramChannel.java
dbbe65b6a81ad02bc3bd432f21dccce6c0242cdb 19-Feb-2016 Narayan Kamath <narayan@google.com> nio: Add unit tests for setOption / getOption.

This also revealed an asymmetry in our APIs. The class defined
setOption but was missing a getOption method (inherited from
NetworkChannel).

bug: 27186457

Change-Id: I823af602b258bfc5f7508dc767af7f8dc4fcf537
rg/apache/harmony/tests/java/nio/channels/MockDatagramChannel.java
62d3f0dccf010d36bfb1160a37f6bc492572345f 16-Feb-2016 Narayan Kamath <narayan@google.com> Merge "SimpleDateFormat: Amend tests to match specified behaviour."
am: e445c1808e

* commit 'e445c1808ebb24f730d27e23cb4094a81c747e6d':
SimpleDateFormat: Amend tests to match specified behaviour.
6557ca8f65418ae09ee1e0d3b23e9e55d2ee90ff 15-Feb-2016 Narayan Kamath <narayan@google.com> SimpleDateFormat: Amend tests to match specified behaviour.

We don't claim to support numeric timezones of the form GMT+hh
or GMT+h:m. This worked purely by accident in earlier releases of
Android and we don't want applications relying on this behaviour.

bug: 27158550
Change-Id: I5e151cc4dd7a339d606d9d0ec51d700bad4b5506
rg/apache/harmony/tests/java/text/SimpleDateFormatTest.java
739ae163e5dddf3cb21c67c839a580cf5ee2a683 16-Feb-2016 Narayan Kamath <narayan@google.com> Merge "SimpleDateFormatTest: Fix a couple of bogus tests involving non-olson tzs."
am: 62272ca44f

* commit '62272ca44f7b947df109c2087f0ee7b39309f27a':
SimpleDateFormatTest: Fix a couple of bogus tests involving non-olson tzs.
ce6a6ab0b88edf5be2df1105fe0c0831675f695b 15-Feb-2016 Narayan Kamath <narayan@google.com> SimpleDateFormatTest: Fix a couple of bogus tests involving non-olson tzs.

The string 0001 should be treated as a minute offset, not an hour.

bug: 27158550
Change-Id: If151fc0e3a6a17e3bf4f14223d39c379d98ad4c9
rg/apache/harmony/tests/java/text/SimpleDateFormatTest.java
4abfbe4311b10d804011a46c81a456cebceaf52c 15-Feb-2016 Narayan Kamath <narayan@google.com> Merge "SimpleDateFormatTest : Remove dead code."
am: 7f5c534171

* commit '7f5c53417164c1012af15d1ad9fa06d897583bfb':
SimpleDateFormatTest : Remove dead code.
320cf5e4b7dfceb8c727ddac762f63deaacd5d91 15-Feb-2016 Narayan Kamath <narayan@google.com> SimpleDateFormatTest : Remove dead code.

Only serves to confuse readers.

Change-Id: I96ae1c825c0a4aaf42410ba04532a929765e8d89
rg/apache/harmony/tests/java/text/SimpleDateFormatTest.java
1a3e2a79e78132f00c907a9d64cd0f5a45568796 12-Feb-2016 Kenny Root <kroot@google.com> SSLSessionTest: compare equality of SSLSession by contents

If the SSLSession received from the cache was not the exact same object,
the #getId() tests would fail. Instead compare the SSLSession by its
contents.

This has cropped up now because we have ExtendedSSLSession in addition
to SSLSession. Conscrypt, in order to maintain backward compatibility
for unbundled builds, wraps its internal SSLSession implementation with
a delegating subclass of ExtendedSSLSession in order to implement newer
method calls in terms of its internal implementation without sacrificing
the ability to build against previous versions.

Bug: 27123298
Change-Id: Id6b446b146941532373ab7fcfc6b3ca464b3aabf
rg/apache/harmony/tests/javax/net/ssl/SSLSessionTest.java
b70092aa73246f9d5ddbd4a34a5319603fb2ed74 11-Feb-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "Remove java.nio.channels.* classes without test coverage."
am: 7ad57e7ce9

* commit '7ad57e7ce98279841a518144ab85020387947976':
Remove java.nio.channels.* classes without test coverage.
ae2e19f0088a92c7a2a24385a6383ba7749413d3 09-Feb-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Remove java.nio.channels.* classes without test coverage.

Removed classes come from openJdk 1.7 and were never
implemented before. We lack a testing suite to verify that
they are working correctly. Those clasess might by
re-added in further releases

Bug: 27117463
Change-Id: I0ebd8e46c31992f7db158a6abaaeb2180f36f1cb
rg/apache/harmony/tests/java/nio/channels/MockDatagramChannel.java
c69a94759e38ec5d51a405a3c3c1559d2b0e316a 05-Feb-2016 Paul Duffin <paulduffin@google.com> Merge "Revert "Revert "Split the harmony SimpleDateFormatTest test methods up"""
am: d5095a5cec

* commit 'd5095a5cecbb59791eaed0989c5a3d78d9bf11c2':
Revert "Revert "Split the harmony SimpleDateFormatTest test methods up""
31594005b5b5dd6b9f06f4ed75bdf2a156984f75 05-Feb-2016 Paul Duffin <paulduffin@google.com> Revert "Revert "Split the harmony SimpleDateFormatTest test methods up""

The newly added but failing tests have been added to the
platform/art/tools/libcore_failures.txt file alongside the
test_parseLjava_lang_StringLjava_text_ParsePosition test so it is now safe to commit this, it won't break the build bot.

This reverts commit 52c6d227ced1a17fe7ea73aff3c6145dff80bb25.

Change-Id: I002ccbe4f54b2b345e33a767cd359f9371780a01
rg/apache/harmony/tests/java/text/SimpleDateFormatTest.java
1b8a746bb2f3aef6233ebd19e1e4c4535da98307 04-Feb-2016 Nicolas Geoffray <ngeoffray@google.com> Merge "Revert "Split the harmony SimpleDateFormatTest test methods up""
am: 5131afc7ff

* commit '5131afc7ffd99d381382cdf5a806e209b634da51':
Revert "Split the harmony SimpleDateFormatTest test methods up"
52c6d227ced1a17fe7ea73aff3c6145dff80bb25 04-Feb-2016 Nicolas Geoffray <ngeoffray@google.com> Revert "Split the harmony SimpleDateFormatTest test methods up"

Fails following tests:
org.apache.harmony.tests.java.text.SimpleDateFormatTest#test_parse_W_w_dd_MMMM_yyyy_EEEE (no test history available)
org.apache.harmony.tests.java.text.SimpleDateFormatTest#test_parse_dayOfYearPatterns (no test history available)
org.apache.harmony.tests.java.text.SimpleDateFormatTest#test_parse_h_m_z (no test history available)
org.apache.harmony.tests.java.text.SimpleDateFormatTest#test_parse_h_z_2DigitOffsetFromGMT (no test history available)
org.apache.harmony.tests.java.text.SimpleDateFormatTest#test_parse_h_z_4DigitOffsetFromGMT (no test history available)
org.apache.harmony.tests.java.text.SimpleDateFormatTest#test_parse_h_z_4DigitOffsetNoGMT (no test history available)
This reverts commit 06e77eddbb4e2c7799ac10c3378ae31399e37da8.

Change-Id: If71307a10d10b434bef3fed3187546555108b659
rg/apache/harmony/tests/java/text/SimpleDateFormatTest.java
68b97867b352c3fc3816012166fdaef5f3dfd2eb 04-Feb-2016 Paul Duffin <paulduffin@google.com> Merge "Split the harmony SimpleDateFormatTest test methods up"
am: da43fc52b7

* commit 'da43fc52b7aeaefd76c708baa3a17f005089c290':
Split the harmony SimpleDateFormatTest test methods up
06e77eddbb4e2c7799ac10c3378ae31399e37da8 04-Feb-2016 Paul Duffin <paulduffin@google.com> Split the harmony SimpleDateFormatTest test methods up

Split the test_parseLjava_lang_StringLjava_text_ParsePosition
test method that is currently failing into smaller tests. That
should make it easier to isolate the problem and see which of
the many things tested in there are failing. This doesn't fix
any code but it does reveal that there are a number of
different tests failing.

As of this change the following tests are failing. That includes
the original test failure and some of the separate tests.

test_parseLjava_lang_StringLjava_text_ParsePosition
test_parse_W_w_dd_MMMM_yyyy_EEEE
test_parse_dayOfYearPatterns
test_parse_h_m_z
test_parse_h_z_2DigitOffsetFromGMT
test_parse_h_z_4DigitOffsetFromGMT
test_parse_h_z_4DigitOffsetNoGMT

Bug: 25998255
Change-Id: I0843f741eef7c3795d2e08f0139cba4ad8e1bd61
rg/apache/harmony/tests/java/text/SimpleDateFormatTest.java
6ca059d55977011a87dea2b0822a2256b55eeb81 03-Feb-2016 Yi Kong <yikong@google.com> Merge "Fix JarFileTest#test_getInputStreamLjava_util_jar_JarEntry_subtest0"
am: 9435462769

* commit '9435462769206e17826fa3b65a09f554598f0b75':
Fix JarFileTest#test_getInputStreamLjava_util_jar_JarEntry_subtest0
119d05942e760b078fd8ac1ea133918ec15b8dbe 03-Feb-2016 Yi Kong <yikong@google.com> Fix JarFileTest#test_getInputStreamLjava_util_jar_JarEntry_subtest0

This failure is due to OpenJDK has different behaviour when dealing
with JarEntry in getInputStream. If argument 'entry' is of type
JarEntry, it reloads it as JarFileEntry using its file name. Therefore
setting size on 'entry' would be ignored.

We initialize entry as JarFileEntry instead, so that getInputStream sees
our change to JarEntry's size.

Bug: 25996922
Change-Id: I4976db19c4b5ddb5802a3e52af7dc9a9df85aaa1
rg/apache/harmony/tests/java/util/jar/JarFileTest.java
907fdee05c7030bc8598c70ef4b20b309ddd1e46 01-Feb-2016 Narayan Kamath <narayan@google.com> Merge "Revert "Revert "Cookies: Add targetSdkVersion based compatibility for domain matching."""
am: 471a22fa50

* commit '471a22fa50a6fdfa91d11f62d264523552f4aea8':
Revert "Revert "Cookies: Add targetSdkVersion based compatibility for domain matching.""
7363410d6ab95420d62cc5e2ee52801a693781eb 27-Jan-2016 Narayan Kamath <narayan@google.com> Revert "Revert "Cookies: Add targetSdkVersion based compatibility for domain matching.""

This reverts commit 225d1301a97641464a1b437219eb60853260b28c.

bug: 26456024
Change-Id: I1bf63a71a3b950b37a0fa8eb6e04c14f67fd8737
rg/apache/harmony/tests/java/net/CookieManagerTest.java
rg/apache/harmony/tests/java/net/CookieStoreTest.java
5f76293ee41caac93a855062d4e7aa8be3f7ff4e 27-Jan-2016 Narayan Kamath <narayan@google.com> Merge "Revert "Cookies: Add targetSdkVersion based compatibility for domain matching.""
am: eac4edbd94

* commit 'eac4edbd940d3f8cdd69d5c78a67a90fb19eff81':
Revert "Cookies: Add targetSdkVersion based compatibility for domain matching."
2d8ca490e3bf23137db932d3fa5ae97a74cf7faf 27-Jan-2016 Yi Kong <yikong@google.com> Merge "Cookies: Add targetSdkVersion based compatibility for domain matching."
am: b4670cb41c

* commit 'b4670cb41c00b0a574ee4a7399209d8ff8f75e88':
Cookies: Add targetSdkVersion based compatibility for domain matching.
225d1301a97641464a1b437219eb60853260b28c 27-Jan-2016 Narayan Kamath <narayan@google.com> Revert "Cookies: Add targetSdkVersion based compatibility for domain matching."

This reverts commit 1e7abd80b139d532f53d6ca8a2a0b5671fa1fb43.

Change-Id: Iefc1342b628ee241bbb999b59ca0fa211bedf5b9
rg/apache/harmony/tests/java/net/CookieManagerTest.java
rg/apache/harmony/tests/java/net/CookieStoreTest.java
1e7abd80b139d532f53d6ca8a2a0b5671fa1fb43 27-Jan-2016 Narayan Kamath <narayan@google.com> Cookies: Add targetSdkVersion based compatibility for domain matching.

This change also consolidates our three CookieManager related tests
into a single test so that it can be easily extended to test both the
M compatibility mode and the current behaviour.

bug: 26456024
Change-Id: I153e69d471c83744c0420a07313e0fda70a80e6b
rg/apache/harmony/tests/java/net/CookieManagerTest.java
rg/apache/harmony/tests/java/net/CookieStoreTest.java
c87c82af88750d2aad06e063b30e8152b83dffe5 22-Jan-2016 Narayan Kamath <narayan@google.com> Merge "TimerTaskTest: Deflake test_scheduledExecutionTime."
am: a3cb8d85ab

* commit 'a3cb8d85ab56d5c2081ef9e4bdfda8931449944c':
TimerTaskTest: Deflake test_scheduledExecutionTime.
a3005205ba2df01ee13a6ac32bd9423597fbd60d 21-Jan-2016 Narayan Kamath <narayan@google.com> TimerTaskTest: Deflake test_scheduledExecutionTime.

The task should fire approximately 100ms from the current time.

bug: 26154569

Change-Id: I1578643d5bc85abd6578ef5f67e34803d07a3d7d
rg/apache/harmony/tests/java/util/TimerTaskTest.java
6409f8c26d629f597e50cc05a5b42dc226d2a8a1 21-Jan-2016 Daniel Xie <dxie@google.com> Merge "Allow some rounding on SO_TIMEOUT values" into marshmallow-cts-dev am: 83c293c477 am: 3f9db209e5 am: 75d2bbcc0d am: 96ff0d492e
am: 72218eabeb

* commit '72218eabeb40a042121b53218ebd20645102ea40':
Allow some rounding on SO_TIMEOUT values
6566167989735858978d062a4385104ce5eca7e3 20-Jan-2016 Neil Fuller <nfuller@google.com> Allow some rounding on SO_TIMEOUT values

Kernels can round the value in use depending on the HZ setting.
This change allows up to 10ms of slop between the SO_TIMEOUT
value set and the one returned.

Bug: 26583607
Change-Id: I527987de20a6e10172656e1f0beeaf63419ffd77
rg/apache/harmony/tests/java/net/DatagramSocketTest.java
rg/apache/harmony/tests/java/net/ServerSocketTest.java
rg/apache/harmony/tests/java/net/SocketTest.java
2f7224868a7fa789e221d2046a32b767e7564790 12-Jan-2016 Kenny Root <kroot@google.com> Merge "Fix HashMap and HashSet cloning problem"
189d3d5eb6b6ff364889df280f6a1911aae09b91 08-Jan-2016 Narayan Kamath <narayan@google.com> InflaterInputStream : Unconditionally close external inflaters.

bug: 26462400
Change-Id: Iee06e72f6913b67cea13c0c2f818cb12f9985019
rg/apache/harmony/tests/java/util/zip/InflaterInputStreamTest.java
44973ad1b6b55b8afa2aba3abad8166e31e772d5 12-Jan-2016 Kenny Root <kroot@google.com> Fix HashMap and HashSet cloning problem

If HashMap or HashSet were cloned, it would no longer be equal to
"EMPTY_TABLE" causing the next insertion into the map to be inserted at
an index that was out of bounds.

Bug: 26294011
Change-Id: I374ed126d0d2fa725d6a7f86a6e419cb34ff9ce9
rg/apache/harmony/tests/java/util/HashSetTest.java
1610275727de3489d2d2920627d6c27b438b0ba5 11-Jan-2016 Yi Kong <yikong@google.com> Fix test_parseFloat_LString_Harmony6261

The OpenJDK dota implementation prints out too many significant digits
for certain floating points. We accept this for now until the upstream
fix the issue.

Upstream bug: JDK-4191279
Bug: 26140673

Change-Id: I106e9b3eb2db1a723b1014b2a82c01f744749c29
rg/apache/harmony/tests/java/lang/FloatTest.java
bcdff4f538695b7da58d0a3b931fb2117d73febe 06-Jan-2016 Sergio Giro <sgiro@google.com> TimerTest: invert order of tasks for tests about exception and cancelling

The tests checking for timer cancellation after exception were
scheduling two tasks. First, one to that throws an exception (supposed
to cancel the timer) and another one that shouldn't execute (but
should be scheduled) because of the timer being cancelled.

In some interleavings, the first task would execute before the second
one was even scheduled, and the test would fail when trying to schedule
on a cancelled timer.

Inverting the order so that the one that doesn't cancel the Timer
gets scheduled first.

Also, set two different increment amounts between threads, to make
that the one that executed is the intended one.

Bug: 26147977

(cherry picked from commit e3f79caf396d7a3a27a4a55ece1a65e7603cf0cc)

Change-Id: I31e206367c889cc1753c7f12d8254360be8c5c69
rg/apache/harmony/tests/java/util/TimerTest.java
872ba172c26a44f5367bf8196f56900706c9393b 06-Jan-2016 Narayan Kamath <narayan@google.com> Update ThreadTest#test_isDaemon.

Threads must inherit their daemon-ness from their parents. The vogar
version of junit uses a thread pool executor with daemon threads to
run tests.

Also contains a minor cleanup to prevent a thread from "leaking" outside
a test method.

bug: 26415594
bug: 26326992
Change-Id: Id555cce44b8ba14a090a7a846e0bbbc9671ad6ef
rg/apache/harmony/tests/java/lang/ThreadTest.java
0d5d144242047cf5e437515c9728a630f689bfc8 06-Jan-2016 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge "Re-enable harmony ServerSocketTest"
e84f3b73baaa89f9d1c4057b0a98469611de8667 05-Jan-2016 Mathieu Chartier <mathieuc@google.com> Delete unnecessary notify

Reference.enqueue calls ReferenceQueue.enqueue which already does an
notify on the internal lock object.

The notify on the reference queue was causing the test to be flaky
since the remove could finish before the child thread had called
rq.notify. This would then proceed to reset rq to a new reference
queue which was no longer synchronized causing rq.notify to throw a
IllegalMonitorStateException exception.

Bug: 26306978

Change-Id: I602524abdfd7a7c84688b8d4583ee83cacda83cb
rg/apache/harmony/tests/java/lang/ref/ReferenceQueueTest.java
65f1e0b7a1683d8e1e16b5c1f7a445cb8ceaea69 30-Dec-2015 Przemyslaw Szczepaniak <pszczepaniak@google.com> Re-enable harmony ServerSocketTest

- test_setSocketFactoryLjava_net_SocketImplFactory
now re-sets the SocketImpl factory after the test,
MockSocketImplFactory can return MockSocketImpl
without upsetting other tests.
- Updated #test_toString result expectations.

Bug: 26352408
Change-Id: Ie29a42e3b5be81d7d0b45d34bb0e97aaa4fc4aca
rg/apache/harmony/tests/java/net/ServerSocketTest.java
0f153ca202c986addbb6f481a6f922aa5158c797 23-Dec-2015 Shubham Ajmera <shubhamajmera@google.com> Fix alignment test for DirectByteBuffer

Only the original DirectByteBuffer needs to be aligned according to the
Use Case. When SliceDirectByteBuffer is generated, the address gets
shifted by the offset, as a result, it will not be aligned always.

Bug: 26301669
Change-Id: I49d3bda5850bf64667c1e9df62267b00cc9a61ec
rg/apache/harmony/tests/java/nio/DirectByteBufferTest.java
3c2b8eefe80d00b3ba54d27fed375886217e8778 21-Dec-2015 Paul Duffin <paulduffin@google.com> Encode entry name before creating URL

During retrieving a resource from the class path a URL is
constructed from the resource name. If the resource name
contains characters that are special in the file part of a URL,
e.g. # or ? then they need to be encoded (e.g. into %23 and %3f
respectively) before passing to the URL in order to ensure that
the name survives intact through to the JarURLConnection which
decodes the URL to extract the file part which it uses to scan
the JAR.

This ensures that the entry/resource name is encoded properly
and adds tests to verify that for resources whose names contain
either # or ?.

Bug: 26137833
Change-Id: I8f31c35e42c0070a0ee78e0cd58b67ebd001fffe
rg/apache/harmony/tests/java/lang/ClassTest.java
dda702b5a424ec84623e1a1e285c3ba0d515c131 17-Dec-2015 Paul Duffin <paulduffin@google.com> Fix, expand and move test for GregorianCalendar change date

The part of the test_getLeastMaximumI test that is broken is
checking a fix that was added in
https://issues.apache.org/jira/browse/HARMONY-2947. The fix
aimed to make the method obey its contract and take into
consideration the current values of the getFirstDayOfWeek,
getMinimalDaysInFirstWeek, getGregorianChange and
getTimeZone methods but it didn't.

The test broken because OpenJDK considered TimeZone, and the
test used the default time zone so it varied from run to run
which explains why it worked in some cases but not in others.

There are a number of other fields (apart from WEEK_OF_YEAR that
are affected by the transition between Gregorian and Julian
calendars so the part of the test that was broken was moved to
libcore.java.util.GregorianCalendarTest, fixed to work properly
by setting the TimeZone explicitly and expanded to test the
other fields too.

Bug: 25998114
Change-Id: I4fb6ed6143c682fce6cd2029d09bd59b17b3541d
rg/apache/harmony/tests/java/util/GregorianCalendarTest.java
7bf811b4e0f45f523813399d6695da496b7c549a 17-Dec-2015 Narayan Kamath <narayan@google.com> Improve support for arabic minusSign & percent markers.

On android M, we attempted to treat the minus sign as a string in a general
manner. That approach caused trouble for apps and was watered down somewhat
and led to some asymmetry between parsing & formatting. This change
switches it back to being a single char, which means we must try and
strip any markers that might be present in the underlying CLDR data.
This appears similar to the approach taken by ICU4J's formatters.

bug: 26207216
Change-Id: Ic497ef2e186309073076e688888997164cff581d
rg/apache/harmony/tests/java/text/NumberFormatTest.java
3e74baeab01f875390d42418719e42bec7d8f8a4 16-Dec-2015 Shubham Ajmera <shubhamajmera@google.com> Merge "Fix isAccessible and alignment test"
fd3e2c1ee996c7a04cab9cafd65fe0341b5f9b87 16-Dec-2015 Yi Kong <yikong@google.com> Merge "Remove FileTest#test_lastModified"
81546f7b84c9f05c666fae0f93e13e08b52c1991 15-Dec-2015 Yi Kong <yikong@google.com> Remove FileTest#test_lastModified

The test is badly constructed to assume that the modified time of
root filesystem must be later than the UNIX epoch, but there is no
guarentee this is true.

Remove the test so that systems with such configuration would not fail
the test suite.

Bug: 26140466
Change-Id: Ie217626bac8e79271fb13149658c2af130d3f8c1
rg/apache/harmony/tests/java/io/FileTest.java
6bda99d7c5925424038d3ab385e1dfed10ee1c8b 15-Dec-2015 Paul Duffin <paulduffin@google.com> Fixed test_register_LSelectorI_error to make it work with OpenJdk

The test expected a NPE to be thrown when attempting to register
a previously closed selector. The OpenJdk implementation throws
a much more meaningful ClosedSelectorException. This fixes the
test to check for that exception.

Bug: 26141155
Change-Id: I5c18a3923c81f1e4ddacf1aac73cbd9b860bc7dc
rg/apache/harmony/tests/java/nio/channels/spi/AbstractSelectorTest.java
9c7ca70621ea691621c8976c3d6bf5c2b03e3ea4 11-Dec-2015 Yi Kong <yikong@google.com> Fix testSerializationCompatibility test

We use different Inet6Address scheme from OpenJDK, "family" field uses
different and partially overlapping values. Deserialization is not
supported. Test modified to expect an InvalidObjectException to be
thrown when deserializing an OpenJDK Inet6Address object.

Bug: 25997167
Change-Id: If86ef44cb17e2da65a78738c9e2889721ea7bb86
rg/apache/harmony/tests/java/net/Inet6AddressTest.java
7c00153cbe952a4e7552cdd815c95a90f31ead9b 11-Dec-2015 Shubham Ajmera <shubhamajmera@google.com> Fix isAccessible and alignment test

The test was trying to modify the content of the array after setting the
isaccessible flag to true, however it wasn't handling isReadOnly flag at
the same time.

alignment test is now added in harmony-tests. This will enable the test
to run on the other types of DirectByteBuffers.

Bug: 26140694
Change-Id: Ie4b98a13d9249a3f802ce17f268f188cac22af74
rg/apache/harmony/tests/java/nio/DirectByteBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyDirectByteBufferTest.java
2bc84378f1cd5216bd86eecfa2d0b720075d242b 11-Dec-2015 Narayan Kamath <narayan@google.com> Fix test assertion in HttpCookieTest for invalid dates.

On Android M, we would return a negative max age (signifying
that the cookie was to be retained until the end of the current
"session") but hasExpired() would return true. This is internally
inconsistent.

On Android N, we will return a max-age of 0 (implying that the
cookie must be immediately discarded) and hasExpired will return
true. This is internally consistent, but inconsistent with
RFC 6265, which unambiguously states that invalid dates must be
ignored.

bug: 26140479
Change-Id: I365f9063057620b8912ac1f42ba415c8f942179c
rg/apache/harmony/tests/java/net/HttpCookieTest.java
df4daa44270955a235937ce023e33a77bdeabaeb 11-Dec-2015 Yi Kong <yikong@google.com> Fix parseDoubleTest for large input

The test was not correct according to the Java spec. Fix the test
expectation to the correct value.

Bug: 26137046
Change-Id: I03a14c1c43957446e5a334ca6ece0d17a9413e65
rg/apache/harmony/tests/java/lang/DoubleTest.java
b9e360018745db5ef9dd3c9f8f096f0979e471af 10-Dec-2015 Narayan Kamath <narayan@google.com> Fix ReferenceTest#test_subclass.

The test was completely bogus. The specification explicitly states
that the GC will enqueue and clear references directly, without a
call to the corresponding methods on the Reference class. They are
provided for use from managed code only.

bug: 26115898
Change-Id: I2f2147771d2f24d35896b956ea38c33b907edfb6
rg/apache/harmony/tests/java/lang/ref/ReferenceTest.java
4c2d9b701670a11c9d58ce75cfe66361c0da6bb5 10-Dec-2015 Shubham Ajmera <shubhamajmera@google.com> Merge "Fix DirectByteBufferAlignment"
9820e5b27a8ac4ea426f8e3cddf06445a9e02840 08-Dec-2015 Yi Kong <yikong@google.com> Rewrite util.format for better performance

OpenJDK uses regular expression to parse the format specifier, which
is expensive both to compile and to execute. Rewriting to manually
parse the specifier reduces formatter benchmark execution time by 45%.

=== Angler a57@1.4GHz ===
benchmark Orig Mod
_Formatter_large 69300 37402
_Formatter_medium 70116 39899
_Formatter_small 68791 37501

Bug: 25887112
Change-Id: I71a94d81c8d8228696c4ca02e60d58552886eaae
rg/apache/harmony/tests/java/util/FormatterTest.java
1817e4d9ef742ceebb2d6a04d624c086686b42ba 09-Dec-2015 Shubham Ajmera <shubhamajmera@google.com> Fix DirectByteBufferAlignment

and also an issue which was causing problems while accessing
ByteBufferArray when the buffer was created as duplicate/slice of a
duplicate/slice. A unit test was added for the same.

Bug: 26020981
Change-Id: Ice6c1d484b6fd68221f079949faed7d982230c1d
rg/apache/harmony/tests/java/nio/SliceDirectByteBufferTest.java
rg/apache/harmony/tests/java/nio/SliceSliceDirectByteBufferTest.java
a6a9deaf2fef181b3b47a1b24b023f3506ad1303 08-Dec-2015 Narayan Kamath <narayan@google.com> Update scanner test.

A couple of corner cases behave slightly differently on enso:
- Searching for "^" in "" will now return null instead of ""
- When findInLine finds a pattern that is at the very end of the
line. It does not skip over to the next line.

bug: 25996036

Change-Id: I606704a1995332f6506e85931a3f5dfccc13c250
rg/apache/harmony/tests/java/util/ScannerTest.java
8021521d9d6a4f031deca314b3c00694899784f9 07-Dec-2015 Narayan Kamath <narayan@google.com> Clean up Cookie path matching logic.

HttpCookie objects whose path was null wouldn't match any non-null
path. This is incorrect, null paths are equivalent as "/". This case
wasn't caught by our tests it requires a custom CookieManager
implementation that creates "Synthetic" java.net.HttpCookie objects
without any paths set. Cookies that are parsed by the default
CookieManager from response headers always have a non-null path.

This change also makes it so that we send down "$Version=1" only if
all cookies in the list are version 1 cookies. This was the previous
libcore behaviour.

bug: 25763487
bug: 26012446
Change-Id: If53dfd2a8f951a1cc4a3b15775e2d7f8ef61aa05
rg/apache/harmony/tests/java/net/CookieManagerTest.java
d6c54ba7af74286d2e310703a4aa2c924ec85c99 01-Dec-2015 Narayan Kamath <narayan@google.com> Implement more of the UTS#35 spec.

- Support for "tiny" weekdays and months (EEEEE and MMMMM)
- Support for standalone weekdays and months.
- Proper support for the 'Z' specifier (RFC-822 timezones)

Also fixes a bug in how date+time patterns were generated and
makes several unit tests clearer by using assertEquals instead
of assertTrue.

Fixes most of our DateFormat / SimpleDateFormat related tests.

bug: 25859156
bug: 25863120

Change-Id: Ieec88a29ddbd8ea8076e8913dfad1330d7ad4c25
rg/apache/harmony/tests/java/text/DateFormatTest.java
65f5c8af5cb4bd203f1c0ce614cfa9c80ca9eca4 30-Nov-2015 Paul Duffin <paulduffin@google.com> Merge "Modify tests to make them less fragile" am: ef7e113e5a am: 3a4992f11e
am: 7f2b92c094

* commit '7f2b92c0941787f73101ec20b63c292679764442':
Modify tests to make them less fragile
ef7e113e5a3ce3250c8968b9554b1db61023a31d 30-Nov-2015 Paul Duffin <paulduffin@google.com> Merge "Modify tests to make them less fragile"
da57c8f771867837ebdbc6047180595dfdd013d7 30-Nov-2015 Paul Duffin <paulduffin@google.com> Modify tests to make them less fragile

The tests are testing how Process class manages its
InputStreams and uses a couple of executable that will write to
either stdout or stderr. Unfortunately, the behaviour of those
executables (ls / mkdir) is affected by external factors such as
the current working directory and permissions of the running
process that can make the test fragile. This change switches to
using simpler processes whose behaviour in the cases being
tested is more closely defined.

Bug: 24900179
Change-Id: I702939d09295e749f5efd71105d91180999b969a
rg/apache/harmony/tests/java/lang/Process2Test.java
rg/apache/harmony/tests/java/lang/ProcessTest.java
b10b2a3ab693cfd6156d06ffe4e00ce69b9c9194 26-Nov-2015 Narayan Kamath <narayan@google.com> Fix ConcurrentModificationException in ArrayList iterators.

OpenJdk's hasNext() implementation always checks the current size
of the list so it's possible for this function to return "false"
and then "true" if an element is subsequently added. Attempting to
iterate over that element will throw a ConcurrentModificationException.

The unit-test demonstrates the sequence of operations applications
were performing, usually from a (for : each) loop of listeners where the
last listener would add stuff to the list.

bug: 25867131
bug: 25867396
bug: 25866843
bug: 25866828

Change-Id: I785a3a44aba22e6872b9471551011f0dd28458de
rg/apache/harmony/tests/java/util/ArrayListTest.java
3f0f9ee5e1ef959a1deb0c3fcfee31144f57eee8 26-Nov-2015 Shubham Ajmera <shubhamajmera@google.com> Merge changes If8ce299b,I6152a524

* changes:
DirectByteBuffer fix
isAccessible flag fixes
d556642d9c5ef258a0867b0101842fae10165f64 25-Nov-2015 Shubham Ajmera <shubhamajmera@google.com> DirectByteBuffer fix

The buffer was being copied in the wrong direction(it should be in the
reversed direction i.e. from current position to the end).

Also, there were different methods used for directbytebuffers and
heapbytebuffer as the previous implementation was using different
method to access the memory. The change will now allow it to use
the same set of instructions for both the buffers.

Added the corresponding unit test.

Bug: 25881506
Change-Id: If8ce299b26a78021e8c66ada35ee5ebec6ca64b1
rg/apache/harmony/tests/java/nio/ByteBufferTest.java
f4145724170d5e3e52b3bf683d527fa5698cb12d 25-Nov-2015 Shubham Ajmera <shubhamajmera@google.com> isAccessible flag fixes

Made the default value as true, and corrected the if accessible
condition. Also added a unit test for it.

Bug: 25880216
Change-Id: I6152a524670fa32b26afab33b6873ae31aae9515
rg/apache/harmony/tests/java/nio/DirectByteBufferTest.java
7f70532b0768d3123a23b92e5a8f90c24d84b332 25-Nov-2015 Sergio Giro <sgiro@google.com> Merge "libcore: remove exception errors in Timer" am: 13e1e27582 am: d9f3269c9e
am: 2088160128

* commit '20881601286dad3538d8e1f50914b8426dd328e9':
libcore: remove exception errors in Timer
07ebb42106d30b98f3fb0c107822ff5b4bf4d8f8 25-Nov-2015 Neil Fuller <nfuller@google.com> Merge "Fix expiry checks in HttpCookie" am: 7263b24f8c am: d729610297
am: 006b8b3f79

* commit '006b8b3f7949e3497b495ebcb7b44dc1089f7f08':
Fix expiry checks in HttpCookie
0492955165a8315129ec68f6a633a4e8c647e6ea 13-Oct-2015 Sergio Giro <sgiro@google.com> libcore: remove exception errors in Timer

Bug: 24889458
Bug: 25753076

Change-Id: I9fc68fd315a5f958afa986cf54cd6929da13b6a5
rg/apache/harmony/tests/java/util/TimerTest.java
7263b24f8c10284698c82d9153e0995b8a1044d9 25-Nov-2015 Neil Fuller <nfuller@google.com> Merge "Fix expiry checks in HttpCookie"
70b617fe562806bc3e15452a2792fec4355bd54f 20-Nov-2015 Przemyslaw Szczepaniak <pszczepaniak@google.com> Merge mnc-dr-enso-dev into master

OpenJDK adjustments for master.
- Restored removed libcore.icu.* classes (needed
by the openjdk java.text.* classes). This will be
undone in short future.
- Adjusted java.lang.* and java.lang.reflect.* classes
for native reflection and other changes in master.

Bug: 25758743
Change-Id: Ifbbe5b1e8661138fc32ad24127f76f711dd585b7
4a0eb884e1ba0a9fc560083dee79f3b55c5d3421 19-Nov-2015 Neil Fuller <nfuller@google.com> Fix expiry checks in HttpCookie

Fixes the expiry checks and adds tests.

Bug: https://code.google.com/p/android/issues/detail?id=191981
Bug: 25682357
Change-Id: I795a470eea829d9a603426514b42c717ac0c2ef9
rg/apache/harmony/tests/java/net/HttpCookieTest.java
bf07204bff37fa34dbdb32e0a9d790d97ef46a81 12-Nov-2015 Narayan Kamath <narayan@google.com> Merge lmp changes into mnc.

Change-Id: I8f49c58f39dc5f4268c6b5718cab18ed26ac930a
9dd4475aba4fb9537b7143cbc09438a67d3b3200 15-Oct-2015 Narayan Kamath <narayan@google.com> ParsePositionTest: Fix a few bogus test cases.

Update toString expectations and stop assuming a particular
implementation of hashCode. Just assert that the identity hashcode
isn't used.

(cherry picked from commit 1ea77cc97e28da69fd182ca17f3bbc63008d9687)

Change-Id: I850fe846594a88691fbea9609e4dd175a0845454
rg/apache/harmony/tests/java/text/ParsePositionTest.java
ae2814bc1277fcfd07af820162807d9db4f76ae0 13-Oct-2015 Sergio Giro <sgiro@google.com> libcore: remove cancelled tasks from the queue in Timer at the time they're scheduled

Currently they are not executed, but kept in the queue

Change-Id: Iddaa84027a70ca28e8db8d84bb40579bc0bb115c
(cherry picked from commit 1df9390efb8ddc0ef92adcfceff544d4b7f33703)
rg/apache/harmony/tests/java/util/TimerTest.java
99ac18dd8b5aa5482fd03cb8c7f9201354c06b1c 25-Sep-2015 Sergio Giro <sgiro@google.com> libcore: rewrite Timer

Change-Id: Ia37426a56b39eae4975535c08de938c9098d55b1
(cherry picked from commit de81552caaae26dd1d2222e3923ce7a738540d5f)
rg/apache/harmony/tests/java/util/TimerTaskTest.java
rg/apache/harmony/tests/java/util/TimerTest.java
069d99326386490f9492afd824a364c5fb645e41 21-Oct-2015 Shubham Ajmera <shubhamajmera@google.com> ByteBuffer: Removed the readonly variant

Added isReadOnly flag in HeapByteBuffer. New constructors are
added for handling isReadOnly flag along with some write
checks for put methods.

Change-Id: I468a92fdd1140db48d7c4f1442cb9ff0e6298a49
rg/apache/harmony/tests/java/nio/ByteBufferTest.java
0ea7c29b9cb0e31fe08fefd68c251296390e19b7 10-Sep-2015 Narayan Kamath <narayan@google.com> FieldPositionTest : update test expectations.

The information in toString is available from the public API
of this class, so nobody should be parsing it.

Change-Id: If9f0d42fa94bd1b2cccfacfe5becf13f2a17bdbc
rg/apache/harmony/tests/java/text/FieldPositionTest.java
ca51934b62bc5af84596f74ae451a09b932330ef 20-Aug-2015 Przemyslaw Szczepaniak <pszczepaniak@google.com> Fixes in java.io.File

- Fixed #isDirectory() for new File("")
- Fixed FileTest#test_toURL. URLs returned
by the OpenJdk File with "///" are correct, ones
with one slash expected by test are not.

Change-Id: If5ea2a4701246686de9bfa0e8e33ffebe1d1ffd9
rg/apache/harmony/tests/java/io/FileTest.java
523317d62c9b4472fd7adbe8c4c7e5e07c0eb8b1 05-Aug-2015 Przemyslaw Szczepaniak <pszczepaniak@google.com> Fix ReferenceQueue code (and some test)

ReferenceQueue from OpenJdk needs some more alterations
to work with OpenJdk-but-heavily-modified-to-work-with-our-GC
Reference class.

Updated ReferenceTest#test_subclass test to expect
seems to expect #clear followed by #enqueue, but android
code doesn't call any of them. I need to find someone
knowledgeable to figure out what's the expected behavior).

Change-Id: I86f9a9682d781136fb3d97023ee9de39d2a2ac1a
rg/apache/harmony/tests/java/lang/ref/ReferenceTest.java
afe419d81932d685ed48e3440b51caa1d0881925 27-Nov-2014 Narayan Kamath <narayan@google.com> Track CLDR-26 updates to currency data.

source/data/curr/it.txt : The "Svizzero" for CHF is now lowercase.
source/data/curr/fr_CA.txt : US dollars are now "$ US".
source/data/curr/en_GB.txt : Removed GB specific override ("$") for USD.
We now fall back to en_001 for USD, which is "US$".

(cherry picked from commit 85e839fc507baedf3a7b99c3269ab54208eb6f25)

Change-Id: I05447911a88bd8d9d8afc6acc2fd18c2cb6e4bcc
rg/apache/harmony/tests/java/util/CurrencyTest.java
96b40e87c32023084d7153360b1fa0c44c598095 12-Aug-2015 Narayan Kamath <narayan@google.com> Stop using libcore's java.util.prefs implementation.

Change-Id: If30217f18b124871ff43a39b0fb7a55bd06f095b
rg/apache/harmony/tests/java/util/prefs/AbstractPreferencesTest.java
rg/apache/harmony/tests/java/util/prefs/PreferencesTest.java
2808d7d77be71a40b9724172fc6be4c3db68d507 10-Aug-2015 Narayan Kamath <narayan@google.com> SocketChannel fixes.

- Be more consistent about the type of exception that's being
thrown (nio "style" vs SocketExceptions).
- Convert AlreadyConnectedException correctly.
- Update test expectations.
- Remove a pointless test of hasArray() for direct byte buffers.
It is not this tests responsibility.

Change-Id: I9e47670fbdd24546b9f219dafb6371b086928c95
rg/apache/harmony/tests/java/nio/channels/SocketChannelTest.java
f1b353628c8f546de2eebf261b1f3d8c7f499319 07-Aug-2015 Narayan Kamath <narayan@google.com> Remove bogus test of implementation details.

Change-Id: I37d2e5dba97443781c1c46e9ae23bc42f2d994f9
rg/apache/harmony/tests/java/util/CollectionsTest.java
b304b288d1deafd07ee13e1540acc0a22db07736 06-Aug-2015 Narayan Kamath <narayan@google.com> Fix bogus comparison tests for Double / Float.

Also, minor change to use Double.compare() instead of a custom
implementation.

Change-Id: I3da0b5ae277f5badbeda8cf987e31381023cfeed
rg/apache/harmony/tests/java/nio/DoubleBufferTest.java
rg/apache/harmony/tests/java/nio/FloatBufferTest.java
d2ace8625cf007b9f1b9f16a022d92cad3045257 06-Aug-2015 Narayan Kamath <narayan@google.com> Fix CharBuffer#put(String, int, int)

- Must be transactional, test that there's enough space for
the string before attempting to write it.
- Don't check buffer writeability for 0 length writes.

Change-Id: I56893aa61460b930b9a87bdb6efe9191efdc301c
rg/apache/harmony/tests/java/nio/ReadOnlyCharBufferTest.java
55f4e6492769b61850c43750a9182a017119e473 06-Aug-2015 Narayan Kamath <narayan@google.com> Fix bogus fix in FileChannelImpl.

We should truncate if the requested size is *less* than the
file size, not greater.

Also update test expectations for Channels from appendable
FileOutputStreams. They must be positioned at the end of the file.

Change-Id: I214e9f1ed8d1833c85a801e96191ff61998a2d5b
rg/apache/harmony/tests/java/nio/channels/FileChannelTest.java
0319995669db3d4cd8fcb73e01f9beaa1106bf2f 06-Aug-2015 Narayan Kamath <narayan@google.com> Fix ChannelsTest

Use public methods in ChannelInputStream to read from Channels
so that we throw the right sort of exception for non-blocking
Selectable channels.

Also amend a few tests that were making bogus assumptions about
isReady(). Channels derived from File input / output streams are
always ready.

Change-Id: I689eec640f6a51e0f92dea906f19d4f8a50959bb
rg/apache/harmony/tests/java/nio/channels/ChannelsTest.java
396f2361ba82cce530a4ff8aa9ac0780af8d4d56 06-Aug-2015 Narayan Kamath <narayan@google.com> Fix DatagramChannel tests.

- Add native implementation.
- Minor behavioural change : receive from a null address
must not attempt to bind.

Change-Id: I308cacf4f03bad8e6062ee9e83b5e3e0fa7a6310
rg/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java
8b2e919af0d25fc0a05f05cd9d1286fdf5b3b68c 06-Aug-2015 Narayan Kamath <narayan@google.com> Fix several Scanner issues.

- Update the Matcher properly.
- Support \u221E for infinity.
- Support non-decimal starting digits.
- Update test to remove some bogus assertions.

Change-Id: Ie7c57019dea49c441bed35d9a6814ec040a96de0
rg/apache/harmony/tests/java/util/ScannerTest.java
b7b2b8be079b63a1473e25580eefa1566e69be1d 05-Aug-2015 Narayan Kamath <narayan@google.com> FileOutputStreamTest : Change position expectations for appendable channels.

Such channels / OutputStreams are (by definition) positioned at the end
of the file.

Change-Id: I4069f2b43cbcd4ee67d6397b3d4711cebeff0ee9
rg/apache/harmony/tests/java/io/FileOutputStreamTest.java
2bc08d517b33c33fb0569325ff0415d9b0ec9979 05-Aug-2015 Narayan Kamath <narayan@google.com> Fix BufferedInputStreamTest.

We might want to consider fixing the implementation to be a bit
more liberal with resizing buffers in the presene of a mark.

Change-Id: I92123e93eea2a37a77502f6807eb46886ac0b40b
rg/apache/harmony/tests/java/io/BufferedInputStreamTest.java
b4105e7f1e3ab24131976f68be4554e694a0e1d4 05-Aug-2015 Przemyslaw Szczepaniak <pszczepaniak@google.com> org.apache.harmony.tests.java.util.TreeMapTest fix

- Different exception (NPE instead of CCE) thrown in one error condition
- Fixed (tail|head)Map map edge condition handling.

Change-Id: I341584f162c85b380a0ee6907101f433d306bf84
rg/apache/harmony/tests/java/util/TreeMapTest.java
8e07541a726afc6ad7acbdbdb4f9c83bf02b1ab5 16-Jul-2015 Narayan Kamath <narayan@google.com> Repurpose SHA1PRNG_SecureRandomTest.

It's currently a test of harmony's SHA1PRNG implementation but
might be generally useful as a SecureRandomTest. A couple of test
cases fail with the stock Android provider. They will have to be
investigated.

(cherry picked from commit a0f58d519eb1efbf182963d5e3b1274bba6d43bb)

Change-Id: I9a6930ae3f8a065f51c457b15f6e669ea2c38982
rg/apache/harmony/tests/javax/security/OldSHA1PRNGSecureRandomTest.java
2e451d35cb5b0fcebe762b6592e2e42ef130b1d4 06-May-2015 Piotr Jastrzebski <haaawk@google.com> Suppress test that relies on implementation details.

Change-Id: I9293184d1e6cc80e25ec8892abcbca5abb729b61
rg/apache/harmony/tests/internal/net/www/protocol/file/FileURLConnectionTest.java
3d43823e17818b3c5f45831f830884917b181454 05-May-2015 Piotr Jastrzebski <haaawk@google.com> Use OpenJdk implementation of java.nio.channels.{spi}.*

- Unsafe : Add supporting methods (addressSize, pageSize,
allocateMemory, freeMemory, setMemory and various getters
equivalent to the existing libcore Memory classes).
- NioUtils : Rewrite nioutils methods in terms of OpenJdk classes.
- DeleteOnExitHook : Access java.lang.Shutdown directly.
- FileDescriptor : Add getInt$, setInt$ and setSocket.
- NativeBuffers : Copy byte-by-byte instead of using Unsafe.copyMemory.
- FileInputStream : Add a custom implementation of available() instead
of using IO_Available.

General : Switch JNI code to explicit registration rather than
implicit registration.

General : Track renaming of Unsafe methods (to add the $ suffix). This
might be unnecessary and will be reverted in a future change.

Change-Id: I7e63340d266dbd4b1c425b13710c05dce1086d4b
rg/apache/harmony/tests/java/nio/channels/MockDatagramChannel.java
rg/apache/harmony/tests/java/nio/channels/MockServerSocketChannel.java
rg/apache/harmony/tests/java/nio/channels/MockSocketChannel.java
rg/apache/harmony/tests/java/nio/channels/SocketChannelTest.java
d0b42d7f4cf171542975e53126cd7ae41bbf7083 28-Apr-2015 Piotr Jastrzebski <haaawk@google.com> Fix ChannelsTest.

Change-Id: I06101d601f6ce209c0ba29f654c56ff2c4e1f3c7
rg/apache/harmony/tests/java/nio/channels/ChannelsTest.java
983b2c6ff9ea6d35adf7ab6398dccf870b7e180a 24-Apr-2015 Piotr Jastrzebski <haaawk@google.com> Use OpenJdk implementation for java.util.*

- Add a target for currency data (currency.data).
- Arrays: Add an android specific debugging method.
- Currency: Use ICU4C data.
- EnumMap / EnumSet : Use JavaLangAccess directly.
- HashMap / Hashtable / LinkedHashMap : Make Entry<K,V> public.
- LinkedHashMap : Add an eldest() method.
- Locale : Fix handling of 3 letter region codes.
- Scanner : Temporarily remove references to the nio file APIs.
- ServiceLoader : Add a method to instantiate a class from a system
property (used in other parts of libcore).
- Hashing : Use JavaLangAccess directly.
- VM : Remove native initialization (doesn't apply here).

Change-Id: I8e870357cf3987cd571c7ebe8bc633a85380a8d5
rg/apache/harmony/tests/java/util/LinkedHashMapTest.java
e6ace47f9ebedbec577d72e7a79c30235b199452 02-Apr-2015 Piotr Jastrzebski <haaawk@google.com> Fix X500PrincipalTest.

X500Principal constructor takes string in rfc2253 or rfc1779 format.
In rfc1779 \n is a special character so it can be escaped.
This means the IllegalArgumentException should be thrown.
On the other hand when we ask for it's name in rfc2253 format then
\n shouldn't be escaped since it's not special any more.

Change-Id: I7cbfb026d1741b59103dad275b54fbc4293ff90c
rg/apache/harmony/tests/javax/security/auth/x500/X500PrincipalTest.java
f96e7e7899711dc2c43424e09a71b25891d46c90 02-Apr-2015 Piotr Jastrzebski <haaawk@google.com> Fix X500PrincipalTest.

RFC1779 requires a string with \n to be quoted.
Fix the test to check that behavior.
More details here: https://www.ietf.org/rfc/rfc1779.txt

"
The quoting mechanism is used for the following cases:
o Strings containing ",", "+", "=" or """ , <CR>, "<",
">", "#", or ";".
o Strings with leading or trailing spaces
o Strings containing consecutive spaces
"

Change-Id: If403c09ae1523d0bde8b5259a636e7b42ab2ba6e
rg/apache/harmony/tests/javax/security/auth/x500/X500PrincipalTest.java
c0c7fab7faae8f0a9482f9fcdae4f59a36a038d0 01-Apr-2015 Piotr Jastrzebski <haaawk@google.com> Fix X500PrincipalTest

Order of elements in set is not guaranteed when encoding
and decoding is performed. Relative Distinguished Name is a set of
Attribute Value Assertions so the order of assertions
can change while encoding/decoding.

Change-Id: I423df970f168f1e9964ab2e7f8ddd467f1065d1c
rg/apache/harmony/tests/javax/security/auth/x500/X500PrincipalTest.java
fc083f3b7463f585da3215dfdcd2006e2116d802 20-Feb-2015 Piotr Jastrzebski <haaawk@google.com> Track renamed test packages.

Change-Id: I2fb238a84ecdaa7e7bb0c45bae5306b0283e705e
rg/apache/harmony/tests/org/xml/sax/helpers/ParserFactoryTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/XMLReaderAdapterTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/XMLReaderFactoryTest.java
c46a2ea848e7a62cd5ee24216e446ad7b9ba7629 19-Feb-2015 Piotr Jastrzebski <haaawk@google.com> Add missing package names for legacy harmony tests.

Change-Id: I7bf808c7df0c432eb64b101506a7a419521c2e14
rg/apache/harmony/tests/javax/net/ServerSocketFactoryTest.java
rg/apache/harmony/tests/javax/net/SocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/CertPathTrustManagerParametersTest.java
rg/apache/harmony/tests/javax/net/ssl/CertificatesToPlayWith.java
rg/apache/harmony/tests/javax/net/ssl/HandshakeCompletedEventTest.java
rg/apache/harmony/tests/javax/net/ssl/HostnameVerifierTest.java
rg/apache/harmony/tests/javax/net/ssl/HttpsURLConnectionTest.java
rg/apache/harmony/tests/javax/net/ssl/KeyManagerFactory1Test.java
rg/apache/harmony/tests/javax/net/ssl/KeyManagerFactory2Test.java
rg/apache/harmony/tests/javax/net/ssl/KeyManagerFactorySpiTest.java
rg/apache/harmony/tests/javax/net/ssl/KeyStoreBuilderParametersTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLContext1Test.java
rg/apache/harmony/tests/javax/net/ssl/SSLContext2Test.java
rg/apache/harmony/tests/javax/net/ssl/SSLContextSpiTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineResultHandshakeStatusTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineResultStatusTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineResultTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLHandshakeExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLKeyExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLPeerUnverifiedExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLProtocolExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLServerSocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLServerSocketTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionBindingEventTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionBindingListenerTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionContextTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSocketTest.java
rg/apache/harmony/tests/javax/net/ssl/TrustManagerFactory1Test.java
rg/apache/harmony/tests/javax/net/ssl/TrustManagerFactory2Test.java
rg/apache/harmony/tests/javax/net/ssl/TrustManagerFactorySpiTest.java
rg/apache/harmony/tests/javax/net/ssl/X509ExtendedKeyManagerTest.java
rg/apache/harmony/tests/javax/net/ssl/X509KeyManagerTest.java
rg/apache/harmony/tests/javax/net/ssl/X509TrustManagerTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateEncodingExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateExpiredExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateNotYetValidExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateParsingExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateTest.java
rg/apache/harmony/tests/javax/security/cert/X509CertificateTest.java
rg/apache/harmony/tests/javax/xml/parsers/DocumentBuilderFactoryTest.java
rg/apache/harmony/tests/javax/xml/parsers/DocumentBuilderTest.java
rg/apache/harmony/tests/javax/xml/parsers/FactoryConfigurationErrorTest.java
rg/apache/harmony/tests/javax/xml/parsers/ParserConfigurationExceptionTest.java
rg/apache/harmony/tests/javax/xml/parsers/SAXParserFactoryTest.java
rg/apache/harmony/tests/javax/xml/parsers/SAXParserTest.java
rg/apache/harmony/tests/javax/xml/parsers/SAXParserTestSupport.java
rg/apache/harmony/tests/org/apache/harmony/kernel/dalvik/ThreadsTest.java
rg/apache/harmony/tests/org/xml/sax/HandlerBaseTest.java
rg/apache/harmony/tests/org/xml/sax/InputSourceTest.java
rg/apache/harmony/tests/org/xml/sax/SAXExceptionTest.java
rg/apache/harmony/tests/org/xml/sax/SAXNotRecognizedExceptionTest.java
rg/apache/harmony/tests/org/xml/sax/SAXNotSupportedExceptionTest.java
rg/apache/harmony/tests/org/xml/sax/SAXParseExceptionTest.java
rg/apache/harmony/tests/org/xml/sax/ext/Attributes2ImplTest.java
rg/apache/harmony/tests/org/xml/sax/ext/DefaultHandler2Test.java
rg/apache/harmony/tests/org/xml/sax/ext/Locator2ImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/AttributeListImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/AttributesImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/DefaultHandlerTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/LocatorImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/NamespaceSupportTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/ParserAdapterTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/ParserFactoryTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/XMLFilterImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/XMLReaderAdapterTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/XMLReaderFactoryTest.java
rg/apache/harmony/tests/org/xml/sax/support/BrokenInputStream.java
rg/apache/harmony/tests/org/xml/sax/support/DoNothingParser.java
rg/apache/harmony/tests/org/xml/sax/support/DoNothingXMLReader.java
rg/apache/harmony/tests/org/xml/sax/support/MethodLogger.java
rg/apache/harmony/tests/org/xml/sax/support/MockFilter.java
rg/apache/harmony/tests/org/xml/sax/support/MockHandler.java
rg/apache/harmony/tests/org/xml/sax/support/MockParser.java
rg/apache/harmony/tests/org/xml/sax/support/MockReader.java
rg/apache/harmony/tests/org/xml/sax/support/MockResolver.java
rg/apache/harmony/tests/org/xml/sax/support/NoAccessParser.java
rg/apache/harmony/tests/org/xml/sax/support/NoAccessXMLReader.java
rg/apache/harmony/tests/org/xml/sax/support/NoInstanceParser.java
rg/apache/harmony/tests/org/xml/sax/support/NoInstanceXMLReader.java
rg/apache/harmony/tests/org/xml/sax/support/NoSubclassParser.java
rg/apache/harmony/tests/org/xml/sax/support/NoSubclassXMLReader.java
rg/apache/harmony/tests/pkg1/TestClass.java
rg/apache/harmony/tests/pkg2/TestClass.java
rg/apache/harmony/tests/support/A.java
rg/apache/harmony/tests/support/B.java
rg/apache/harmony/tests/support/I.java
rg/apache/harmony/tests/support/P.java
1ccc81206769598b4ce579dd0c4f131bf37bb1c3 09-Nov-2015 Roland Levillain <rpl@google.com> Fix more race conditions in WeakHashMapTest.

Reuse Mathieu's solution from
https://android-review.googlesource.com/#/c/99045/.

Also, re-wrap some assertion lines.

Bug: 25437292
Change-Id: I7ec5101d6169d978ee8c3782e2f985aa1f0a6d5d
rg/apache/harmony/tests/java/util/WeakHashMapTest.java
1efdd1addf3f060ee148f4fd1bc841ed144911fb 15-Oct-2015 Neil Fuller <nfuller@google.com> Merge "Migrate DecimalFormat to use ICU4J."
34ba8b516b5fd28fbf6a8608be6a7596716a8166 17-Jul-2015 Rayhaan Jaufeerally <rayhaan@google.com> Migrate DecimalFormat to use ICU4J.

This change migrates the underlying implementation of
DecimalFormat to use the Java version of the ICU library.

All all issues related to Harmony test failures have been
tracked down and everything not yet fixed in ICU has a
draft fix in the following commits:

https://android.googlesource.com/platform/external/icu/+/7a53939fbc0103d77d09d0174c52df850363caff
https://android.googlesource.com/platform/external/icu/+/90d4668d4d710507b3302de044e3a398cc4fe5ba
https://android.googlesource.com/platform/external/icu/+/4de0761d798b9a92826397e603835c742c8ff873

Behaviour change: Now a new instance of DecimalFormat()
has 309 as the maximumIntegerDigits instead of 20000000
which it was before. This is because it doesn't make
sense to have this value when ICU will only use up to 309
to format numbers.

Furthermore, ICU4J now returns patterns in the form of
<positive-part>;<negative-part> for displaying the
difference between positive and negative number formats.
Tests have been adjusted accordingly.

Benchmarks:
benchmark JAVA NATIVE
_formatAsExponent10e100 96 40
_formatAsExponent10e1000 13 34
_formatAsExponent10e3 37 33
_formatAsExponent10e9 38 33
_formatBigDecimal10e100 99 64
_formatBigDecimal10e1000 306 249
_formatBigDecimal10e3 34 29
_formatBigDecimal10e9 39 33
_formatE 18 39
_formatEur 7 22
_formatEurWithCents 14 37
_formatGrouping_BigDecimal10e100 104 63
_formatGrouping_BigDecimal10e1000 307 249
_formatGrouping_BigDecimal10e3 34 29
_formatGrouping_BigDecimal10e9 35 34
_formatPi 18 39
_formatToCharacterIterator10e100 3231 148
_formatToCharacterIterator10e1000 90411 4789
_formatToCharacterIterator10e3 163 34
_formatToCharacterIterator10e9 318 44
_formatUSD 8 31
_formatUsdWithCents 14 38

Tested on Nexus 5, times in us.

Change-Id: I642fd02acd3bcd198960cdf2a8d973db7baec42b
rg/apache/harmony/tests/java/text/DecimalFormatTest.java
rg/apache/harmony/tests/java/text/NumberFormatTest.java
1df9390efb8ddc0ef92adcfceff544d4b7f33703 13-Oct-2015 Sergio Giro <sgiro@google.com> libcore: remove cancelled tasks from the queue in Timer at the time they're scheduled

Currently they are not executed, but kept in the queue

Change-Id: Iddaa84027a70ca28e8db8d84bb40579bc0bb115c
rg/apache/harmony/tests/java/util/TimerTest.java
d9aed1632ec6fdade72524261cb0489652b25ab4 12-Oct-2015 Sergio Giro <sgiro@google.com> Merge "libcore: rewrite Timer"
de81552caaae26dd1d2222e3923ce7a738540d5f 25-Sep-2015 Sergio Giro <sgiro@google.com> libcore: rewrite Timer

Change-Id: Ia37426a56b39eae4975535c08de938c9098d55b1
rg/apache/harmony/tests/java/util/TimerTaskTest.java
rg/apache/harmony/tests/java/util/TimerTest.java
0bb49368c73f9ff216993c469d842e83f43c0aaa 24-Sep-2015 Neil Fuller <nfuller@google.com> am 69f37702: Merge "Fix JarURLConnection.getJarFile() caching behavior"

* commit '69f3770205faf2fd0112bf63e662fde491a2cfad':
Fix JarURLConnection.getJarFile() caching behavior
ef411e4b8932bf0519ebf509817fac8506e44aa5 10-Sep-2015 Neil Fuller <nfuller@google.com> Fix JarURLConnection.getJarFile() caching behavior

Commits 05a5c2f and 2ce899f introduced alternative
handling for resources found in jars to reduce memory
usage.

There are a couple of issues fixed here to retain
behavior found on older Android releases (and still
implemented in libcore.net.url.JarURLConnecitonImpl):

1) There is an implicit contract on JarURLConnection that,
by default, any caller of JarURLConnection.getJarFile()
must not close the jar file. This is because
the default behavior is to use a VM-level cache of open
JarFile objects (see URLConnection.getUseCaches()).

In ClassPathURLStreamHandler, a JarFile was being
created on demand each time, regardless of the cache
setting. It was causing garbage collection warnings when
the caller abandoned it.

The exposure of the shared JarFile instance is
dangerous, but it is the way 3rd party code like ICU4J
assumes things work. It would be incorrect for the
caller to close the JarFile: to do so on earlier versions
of Android would cause problems for other users of the
classloader / jar.

2) There was an implicit contract on the InputStream
behavior when caching was switched off: closing the stream
should close the URLConnection and any associated JarFile.
This has now been implemented.

Bug: 20685844
Change-Id: I42e78fb74b40380fe1232e54876e75df1f434f1e
rg/apache/harmony/tests/java/lang/ClassLoaderTest.java
a82ee5c37b22ec0dc71fef010982919caa8b9ecc 04-Sep-2015 Neil Fuller <nfuller@google.com> Avoid using point-to-point interfaces in multicast socket tests

Multicast on a point-to-point interface isn't really multicast.

Bug: 23279677
(cherry-picked from commit 67d7597da46910e65a089bcce0afa8e0c2bed668)

Change-Id: Ib102e9d04744d3e99b8828ac31d9548e72b703dd
rg/apache/harmony/tests/java/net/MulticastSocketTest.java
3b68ef7c76be3cd0055ec10b561d7d5671076168 08-Sep-2015 Neil Fuller <nfuller@google.com> am 5af421c4: Merge "Avoid using point-to-point interfaces in multicast socket tests"

* commit '5af421c4c7748df09884ca2683e2cb816a334053':
Avoid using point-to-point interfaces in multicast socket tests
5af421c4c7748df09884ca2683e2cb816a334053 08-Sep-2015 Neil Fuller <nfuller@google.com> Merge "Avoid using point-to-point interfaces in multicast socket tests"
67d7597da46910e65a089bcce0afa8e0c2bed668 04-Sep-2015 Neil Fuller <nfuller@google.com> Avoid using point-to-point interfaces in multicast socket tests

Multicast on a point-to-point interface isn't really multicast.

Bug: 23279677
Change-Id: I64b1d17c6d7fcab66ecb14960a2e4493b144f7a9
rg/apache/harmony/tests/java/net/MulticastSocketTest.java
f13aa2ce1850c90e5705298bc5a21095b82c7eb8 04-Sep-2015 Neil Fuller <nfuller@google.com> am b8fcb81f: Merge "Revert "Revert "Migrate Collator classes to use ICU4J."""

* commit 'b8fcb81f03613bd18c6a64ff17ef01f17dbe3c57':
Revert "Revert "Migrate Collator classes to use ICU4J.""
3df3bfcbad6f4da20964424c4772985d1b1586a1 26-Aug-2015 Rayhaan Jaufeerally <rayhaan@google.com> Revert "Revert "Migrate Collator classes to use ICU4J.""

The SDK build is now fixed by adding icu4j as a dependency of docs.

This reverts commit 5fc822e7ef47448adccd73ca2ebbd28a068f5136.

Change-Id: Ibac9b40189a83323e5175e8ea26c973eb07bc34f
rg/apache/harmony/tests/java/text/CollationElementIteratorTest.java
rg/apache/harmony/tests/java/text/RuleBasedCollatorTest.java
8c36c45d9746cf2143d9d708103bbf3fbb0062e8 18-Aug-2015 Neil Fuller <nfuller@google.com> am 4fd38444: Merge "Revert "Migrate Collator classes to use ICU4J.""

* commit '4fd38444c4cc0fb0b529d4e9e3d7fd05e8edfac6':
Revert "Migrate Collator classes to use ICU4J."
5fc822e7ef47448adccd73ca2ebbd28a068f5136 18-Aug-2015 Neil Fuller <nfuller@google.com> Revert "Migrate Collator classes to use ICU4J."

This reverts commit bf7bbff3a512b3350911d129aba5503dcfde9311.

Change-Id: I5e3d3481d1df11d31871d63fd1575cbf46698dee
rg/apache/harmony/tests/java/text/CollationElementIteratorTest.java
rg/apache/harmony/tests/java/text/RuleBasedCollatorTest.java
8ada31a6212ab1974134d5f8a190ed9f8518646d 18-Aug-2015 Neil Fuller <nfuller@google.com> am 1a48afbe: Merge "Migrate Collator classes to use ICU4J."

* commit '1a48afbeed4601ab60845a20f985800474db16a0':
Migrate Collator classes to use ICU4J.
bf7bbff3a512b3350911d129aba5503dcfde9311 23-Jul-2015 Rayhaan Jaufeerally <rayhaan@google.com> Migrate Collator classes to use ICU4J.

The following benchmarks have been run and show the performance
gains from calling ICU4J.

----- ICU4J -----
benchmark us linear runtime
CollatorIdentical 6.90 ==============================
CollatorPrimary 3.20 =============
CollatorSecondary 3.79 ================
CollatorTertiary 4.28 ==================
vm: app_process

----- ICU4C -----
benchmark us linear runtime
CollatorIdentical 11.75 ==============================
CollatorPrimary 10.01 =========================
CollatorSecondary 9.88 =========================
CollatorTertiary 10.26 ==========================
vm: app_process

All tests relating to Collation pass after this change.

With respect to CJK character loading time, tests were done on a
Nexus 6 running this change, in the US locale and TRADITIONAL_CHINESE
locale.

In EN-US:
Time to load Traditional Chinese collator after boot: 76ms, 76ms
Time to load again: (39ms, 36ms, 36ms), (36ms, 36ms, 48ms)
In ZH-TW:
Time to load Traditional Chinese collator after boot: 37ms, 36ms
Time to load again: (36ms, 36ms, 36ms), (35ms, 37ms, 35ms)

This seems to indicate the system is creating a Collator on boot meaning
that ICU is caching it after the first creation. So if a device is in the
Traditional Chinese locale, the cost of creating Traditional Chinese
collators should have been absorbed at boot time.

Loading up the CJK ideographs uses up around ~500k of memory. From the
above findings, if the device is in a language requiring those characters
then they should be loaded up on boot in the Zygote, which may mean the
memory is shared across processes wishing to use the data.

Change-Id: I98a1c32c8f58e03d16d694b8a4fca4ced961af8e
rg/apache/harmony/tests/java/text/CollationElementIteratorTest.java
rg/apache/harmony/tests/java/text/RuleBasedCollatorTest.java
7c4fe3aa5f178f790c6e8279fd0f2d04543ba482 16-Jul-2015 Narayan Kamath <narayan@google.com> am de8d2c4f: Merge "Repurpose SHA1PRNG_SecureRandomTest."

* commit 'de8d2c4f44d39835dce66cc019586687500033f4':
Repurpose SHA1PRNG_SecureRandomTest.
a0f58d519eb1efbf182963d5e3b1274bba6d43bb 16-Jul-2015 Narayan Kamath <narayan@google.com> Repurpose SHA1PRNG_SecureRandomTest.

It's currently a test of harmony's SHA1PRNG implementation but
might be generally useful as a SecureRandomTest. A couple of test
cases fail with the stock Android provider. They will have to be
investigated.

Change-Id: I417ea8452747f4473881ead3c32165a6b013b36b
rg/apache/harmony/tests/javax/security/OldSHA1PRNGSecureRandomTest.java
022ced5080413e2311c35dcaf165ef321edd0fde 15-Jul-2015 Narayan Kamath <narayan@google.com> am eba48f22: Merge "JarEntry: test that certs/signers are null until the entry is read."

* commit 'eba48f2224fc020a74edfacd362bb67c63dd92a0':
JarEntry: test that certs/signers are null until the entry is read.
44bd14564d134fa7e35e06020fd1e223c7c2a53f 15-Jul-2015 Narayan Kamath <narayan@google.com> am a2794979: Merge "Get rid of as much of dalvik.annotation.* as we can."

* commit 'a279497915012a19196e64e7c3126bcae65ff871':
Get rid of as much of dalvik.annotation.* as we can.
d2f1d51a3f4fc3f936b10a052e5b3e1366dc3a9e 15-Jul-2015 Narayan Kamath <narayan@google.com> JarEntry: test that certs/signers are null until the entry is read.

bug: 1864326
Change-Id: I8c263c29cf794b6996f8dd5bdfcfd9deac665fc6
rg/apache/harmony/tests/java/util/jar/JarEntryTest.java
cff384fb32d139d2bda7c3dc872108fe9d86d6b1 09-Jul-2015 Narayan Kamath <narayan@google.com> Get rid of as much of dalvik.annotation.* as we can.

Some of it is public API (why oh why..) so we're forced to
keep it around.

Change-Id: Ic1e059d7162c442a1a996eb1510d0f7f84add34e
rg/apache/harmony/tests/java/lang/Process2Test.java
rg/apache/harmony/tests/java/lang/reflect/GenericSignatureFormatErrorTest.java
rg/apache/harmony/tests/java/util/EnumMapTest.java
rg/apache/harmony/tests/javax/net/ssl/HandshakeCompletedEventTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSocketTest.java
rg/apache/harmony/tests/javax/xml/parsers/SAXParserFactoryTest.java
82b5061b4648aa4c142ae159a6589528c2eb798a 04-Jul-2015 Neil Fuller <nfuller@google.com> am fa66b531: Merge "Make some tests independent of default Locale"

* commit 'fa66b531f3f536e5b9088dbfed81cb91f16dd330':
Make some tests independent of default Locale
1c07f6669c5b12285917f53e567492a391bfdb29 04-Jul-2015 Neil Fuller <nfuller@google.com> am bfead518: Merge "Fix test to avoid a fixed local port"

* commit 'bfead5182d0f5014acd901149befec73a8727f76':
Fix test to avoid a fixed local port
fa66b531f3f536e5b9088dbfed81cb91f16dd330 02-Jul-2015 Neil Fuller <nfuller@google.com> Merge "Make some tests independent of default Locale"
bfead5182d0f5014acd901149befec73a8727f76 02-Jul-2015 Neil Fuller <nfuller@google.com> Merge "Fix test to avoid a fixed local port"
41a3d4230837b1987538578a10b365d7f0c9ca13 02-Jul-2015 Neil Fuller <nfuller@google.com> Make some tests independent of default Locale

These tests were sensitive to the default Locale:
org.apache.harmony.tests.java.util.FormatterTest.test_DaylightTime
org.apache.harmony.tests.java.util.GregorianCalendarTest#test_rollIZ

The test now sets the Locale explicitly where it is important.

Bug: 20130892
Change-Id: I1682bc90018bab184010003a35bcac6a36ae30c5
rg/apache/harmony/tests/java/util/FormatterTest.java
rg/apache/harmony/tests/java/util/GregorianCalendarTest.java
719f2e5343ff2bba8f240e3fbe569a5078d9fafc 02-Jul-2015 Neil Fuller <nfuller@google.com> Fix test to avoid a fixed local port

The test now picks a free port rather than using a hardcoded
one.

Bug: 17979533
Change-Id: I84ac8e7ff00e106476210a1935fc41f9b5580ab2
rg/apache/harmony/tests/java/nio/channels/SinkChannelTest.java
a17cd65642e7f47b9ea23721c099d499ed4ec9f3 01-Jul-2015 Daniel Xie <dxie@google.com> Merge "Explicitly set DateFormat.is24Hour value needed by tests" into lollipop-mr1-cts-dev
fb1447ad51e7413c660abed086d9df498556038a 01-Jul-2015 Narayan Kamath <narayan@google.com> am 4ca2a04a: Merge "Clean up RandomTest."

* commit '4ca2a04ac8f2996a98c04b40b76df5fc81ce7ac9':
Clean up RandomTest.
5457b5d6aab795439f3948b4ab3f947508433ed5 01-Jul-2015 Narayan Kamath <narayan@google.com> Clean up RandomTest.

Make the intent of test_setSeed clearer. Also includes
borderline OCD induced cleanups.

bug: 21876569
Change-Id: Ie1f31ac25df742f8b32c43e69e15dd8c925c690a
rg/apache/harmony/tests/java/util/RandomTest.java
92ea4f2aca679aa7dc715bd53c768b2e6acb9fbf 22-Jun-2015 Narayan Kamath <narayan@google.com> am 3580b3a2: Merge "Add CTS test for unaligned reads / writes with swaps."

* commit '3580b3a2e3d01b17d68763ff1804956a717aca99':
Add CTS test for unaligned reads / writes with swaps.
9006e31bc25f3f3282d6d39f09e5dda5bd1be1ce 22-Jun-2015 Narayan Kamath <narayan@google.com> Add CTS test for unaligned reads / writes with swaps.

bug: 21491780

(cherry picked from commit 11b2b3f7d8ef8538bdda11db197eb68aa662678e)

Change-Id: I22a7307694dbd554566d8992e187f504665d5506
rg/apache/harmony/tests/java/nio/DirectByteBufferTest.java
11b2b3f7d8ef8538bdda11db197eb68aa662678e 22-Jun-2015 Narayan Kamath <narayan@google.com> Add CTS test for unaligned reads / writes with swaps.

bug: 21491780

Change-Id: Icf3f1c267e3e86077d25f23e537c46bb05e8480f
rg/apache/harmony/tests/java/nio/DirectByteBufferTest.java
b35aca285aeb796d65b1b723364cb8a37a7d359a 17-Mar-2015 Neil Fuller <nfuller@google.com> Fix for devices with multiple multicast-capable interfaces

test_joinGroupLjava_net_SocketAddressLjava_net_NetworkInterface
was wrong:

1) The sending socket was joining a group for no obvious reason except,
perhaps, to test null NetworkInterface handling.
2) The sending socket was always using the default interface to send
multicast packets, but receiving on a specified interface.

For devices with several interfaces we have reports of the test failing.
It is assumed to be because of (2) when the specified interface and
the default interface differ in the presence of multiple interfaces.

To explicitly test null handling for joinGroup() more tests have been
added.

Thanks to swl77wade for helping to track this down.

Bug: 159740
Change-Id: Ibb180f6d93770a95f70a6bfa34bfadd93aa3187e
(cherry picked from commit ef97a43c64f9b80714177ae16b5432fab7bdffde)
rg/apache/harmony/tests/java/net/MulticastSocketTest.java
6762debec42118b54d6210d43b72822d3c1008b4 17-Jun-2015 Sergio Giro <sgiro@google.com> am 7fc2f44a: Merge "harmony/security: fix bugs concerning escaping in X500Principal"

* commit '7fc2f44a6792c688ff077b7d50450b5d445df17a':
harmony/security: fix bugs concerning escaping in X500Principal
7fc2f44a6792c688ff077b7d50450b5d445df17a 17-Jun-2015 Sergio Giro <sgiro@google.com> Merge "harmony/security: fix bugs concerning escaping in X500Principal"
a89311332281f9959ee67b00875ff97230554587 12-May-2015 Sergio Giro <sgiro@google.com> harmony/security: fix bugs concerning escaping in X500Principal

Bug: 20043688
Bug: 20037536
Change-Id: Ife4c70e1d0c1ba046bf973fbee785a2c04164c16
rg/apache/harmony/tests/javax/security/auth/x500/X500PrincipalTest.java
2e2e29c3e70abebaf4e56cadffeed37ccf862836 09-Jun-2015 Neil Fuller <nfuller@google.com> Explicitly set DateFormat.is24Hour value needed by tests

Some tests fail under CTS if the device is set to use the 24 hour clock.
The tests that depend on the value of the setting are now being explicit.

Bug: 20899571
Bug: 20937589
Bug: 20939139
Bug: 20378566
Bug: 21585934
Bug: https://code.google.com/p/android/issues/detail?id=162384
(cherry-picked from commit 38a0b85afd4231f46fac59e59ee38729bd5154c4)

Change-Id: I1a369baeeac929ef010e7906e92544b9f483f02c
rg/apache/harmony/tests/java/text/MessageFormatTest.java
rg/apache/harmony/tests/java/text/Support_MessageFormat.java
rg/apache/harmony/tests/java/util/DateTest.java
ad4a67f05d001ee1a9a1e9c0069db2d637223288 09-Jun-2015 Neil Fuller <nfuller@google.com> Explicitly set DateFormat.is24Hour value needed by tests

Some tests fail under CTS if the device is set to use the 24 hour clock.
The tests that depend on the value of the setting are now being explicit.

Bug: 20899571
Bug: 20937589
Bug: 20939139
Bug: 20378566
Bug: 21585934
Bug: https://code.google.com/p/android/issues/detail?id=162384
(cherry-picked from commit 38a0b85afd4231f46fac59e59ee38729bd5154c4)

Change-Id: Iac9eb15e8bf767bb5f3e96f9ba0486a995eef034
rg/apache/harmony/tests/java/text/MessageFormatTest.java
rg/apache/harmony/tests/java/text/Support_MessageFormat.java
rg/apache/harmony/tests/java/util/DateTest.java
c48fd0ce3c3759c04e8f55f3500ab2c6922fa013 10-Jun-2015 Kenny Root <kroot@google.com> am c900ebd3: Merge "SSLEngineTest: set up server instead of using anon"

* commit 'c900ebd390c78b4d001d459d8e9eac5a5cf1fe86':
SSLEngineTest: set up server instead of using anon
3a2b724df2b617c4ed421215bab68ac4497d18f5 10-Jun-2015 Kenny Root <kroot@google.com> Merge "SSLEngineTest: set up server instead of using anon" into mnc-dev
229d56846bd56df1b2b6942a25127003bde88222 10-Jun-2015 Kenny Root <kroot@google.com> SSLEngineTest: set up server instead of using anon

This test was relying on "anon" cipher suites so that it didn't have to
do any complicated setup of the server certificate store. Fortunately we
already have a utility class we can use that does this setup for us so
there is no need to rely on anonymous cipher suites that do no
authentication.

(cherry picked from commit 5be4c97a83895b7e1385445db6a1717eb8df3e9b)

Bug: 21195269
Change-Id: I30bf4cd3b99bf946887cca293d616021cfce1bd7
rg/apache/harmony/tests/javax/net/ssl/SSLEngineTest.java
325f1f76d184020c086cd97445c0eca7094572eb 10-Jun-2015 Alex Klyubin <klyubin@google.com> am eb80877f: Merge "Fix X509CertificateTest.testVerifyPublicKeyString failure." into mnc-dev

* commit 'eb80877fdf508af478bf59b338cab127abc54d9a':
Fix X509CertificateTest.testVerifyPublicKeyString failure.
5be4c97a83895b7e1385445db6a1717eb8df3e9b 10-Jun-2015 Kenny Root <kroot@google.com> SSLEngineTest: set up server instead of using anon

This test was relying on "anon" cipher suites so that it didn't have to
do any complicated setup of the server certificate store. Fortunately we
already have a utility class we can use that does this setup for us so
there is no need to rely on anonymous cipher suites that do no
authentication.

Bug: 21195269
Change-Id: I30bf4cd3b99bf946887cca293d616021cfce1bd7
rg/apache/harmony/tests/javax/net/ssl/SSLEngineTest.java
eb80877fdf508af478bf59b338cab127abc54d9a 10-Jun-2015 Alex Klyubin <klyubin@google.com> Merge "Fix X509CertificateTest.testVerifyPublicKeyString failure." into mnc-dev
0c1fd5ae392a0d28481cd5680f0dce25e04409b5 10-Jun-2015 Alex Klyubin <klyubin@google.com> Fix X509CertificateTest.testVerifyPublicKeyString failure.

The test was failing because it was making the wrong assumption that
JCA's Signature implementation will select the implementation from the
highest priority provider which offers the matching signature
algorithm. This assumption is wrong because it does not take into
consideration that JCA also filters providers using
SupportedKeyClasses and SupportedKeyFormats attributes.

In this particular case, AndroidKeyStore Provider happens to be the
highest priority Provider which offers Signature.MD5withRSA. However,
according to its declaration, it offers that only for public keys
which are instances of AndroidKeyStorePublicKey.

The fix is to rely on JCA's Signature implementation selection
mechanism to find the highest priority provider which supports the
desired public key.

Bug: 21735869
Change-Id: Ie40f8a1cbf898966614a290c2d6cfe8350a1e99f
rg/apache/harmony/tests/javax/security/cert/X509CertificateTest.java
91b4134a2e03eddf6560bb8863e5e87e45cf8215 10-Jun-2015 Neil Fuller <nfuller@google.com> am 55b99f82: Merge "Explicitly set DateFormat.is24Hour value needed by tests" into mnc-dev

* commit '55b99f82dbdbe971914b47ef9262801046dd4f5a':
Explicitly set DateFormat.is24Hour value needed by tests
38a0b85afd4231f46fac59e59ee38729bd5154c4 09-Jun-2015 Neil Fuller <nfuller@google.com> Explicitly set DateFormat.is24Hour value needed by tests

Some tests fail under CTS if the device is set to use the 24 hour clock.
The tests that depend on the value of the setting are now being explicit.

Bug: 20899571
Bug: 20937589
Bug: 20939139
Bug: 20378566
Bug: 21585934
Bug: https://code.google.com/p/android/issues/detail?id=162384
Change-Id: I0f03f54b76dc5d343a2c842434412ff59908b129
rg/apache/harmony/tests/java/text/MessageFormatTest.java
rg/apache/harmony/tests/java/text/Support_MessageFormat.java
rg/apache/harmony/tests/java/util/DateTest.java
49f2d45b30c55a4e55dd19886b1c0ed7ba23fc52 02-Jun-2015 Neil Fuller <nfuller@google.com> Avoid binding a DatagramSocket before setReuseAddress

The API docs suggest the behavior of setResueAddress is undefined
if performed after a socket bind. In reality Android can cope with
it but it is easier to stop relying on that than make excuses.

Bug: 15413832
Change-Id: Ic4c19d58b410e7af9019a1727dc2b7b94e9fb81b
rg/apache/harmony/tests/java/net/DatagramSocketTest.java
b96afd7caf4486aa3306b62c08f43a660b5bf8f8 02-Jun-2015 Neil Fuller <nfuller@google.com> Merge "Fix for MulticastSocketTest for non-multicast interfaces" into lollipop-cts-dev
automerge: 27ef0eb

* commit '27ef0eb26e179b7750b9cb72018da9fab3a0bbb0':
Fix for MulticastSocketTest for non-multicast interfaces
94279b64bcc98d8e28170204cf4aef0d803c7705 19-Feb-2015 Neil Fuller <nfuller@google.com> Fix for MulticastSocketTest for non-multicast interfaces

test_setNetworkInterfaceLjava_net_NetworkInterface does not check that
the interface supports multicast.

Bug: 19232216
Change-Id: I755287c06c99f36d209a3a8d11b2c75fccfa630b
(cherry picked from commit f6e066e95859d3366a24da89736f487d980854ce)
rg/apache/harmony/tests/java/net/MulticastSocketTest.java
9ee28da751cc43fd62427ced9a220ea744e131d9 18-May-2015 Roland Levillain <rpl@google.com> Fix a cast in org.apache.harmony.tests.java.util.ArraysTest.

Change-Id: Ie960219cb103490edc16c1ffde131ff7eb3191a5
rg/apache/harmony/tests/java/util/ArraysTest.java
519bb724dc701bd0f59a4c27f72d4b589f382fad 21-Apr-2015 Narayan Kamath <narayan@google.com> X509Certificate: Narrow down the scope of caught exceptions.

Also, fix the package name of the corresponding test so that
vogar isn't confused.

bug: 19245702
Change-Id: I647f0c9ca4c81bb41d4b64088b60f37ebc671e84
rg/apache/harmony/tests/javax/security/cert/X509CertificateTest.java
db4d0bd54407d4f6116e51ba0668869f3f790b40 20-Apr-2015 Narayan Kamath <narayan@google.com> Remove support for reading mime types from property files.

This support was untested and unused and of very limited utility,
given that this class is initialized in the zygote. It also discourages
arbitrary changes to the priority order of mappings.

Change-Id: I2a7f91d2956627cd59f948561c37678bc45d118d
rg/apache/harmony/tests/java/io/FileTest.java
d4e4a4bb690247755ac261ac133892a27523610e 24-Mar-2015 Neil Fuller <nfuller@google.com> Merge "Fix for devices with multiple multicast-capable interfaces"
ef97a43c64f9b80714177ae16b5432fab7bdffde 17-Mar-2015 Neil Fuller <nfuller@google.com> Fix for devices with multiple multicast-capable interfaces

test_joinGroupLjava_net_SocketAddressLjava_net_NetworkInterface
was wrong:

1) The sending socket was joining a group for no obvious reason except,
perhaps, to test null NetworkInterface handling.
2) The sending socket was always using the default interface to send
multicast packets, but receiving on a specified interface.

For devices with several interfaces we have reports of the test failing.
It is assumed to be because of (2) when the specified interface and
the default interface differ in the presence of multiple interfaces.

To explicitly test null handling for joinGroup() more tests have been
added.

Thanks to swl77wade for helping to track this down.

Bug: 159740
Change-Id: Ibb180f6d93770a95f70a6bfa34bfadd93aa3187e
rg/apache/harmony/tests/java/net/MulticastSocketTest.java
e6381dd5d03723f95b1f128228f38020857c16ac 16-Mar-2015 Neil Fuller <nfuller@google.com> Merge "Fix for MulticastSocketTest for non-multicast interfaces"
1404d4401893306ac72a473807b4a39352fd8704 19-Feb-2015 Bill Yi <byi@google.com> Merge commit '405aeb8a97eb0a5194c2803dde3968e10e1e509e' into HEAD
f6e066e95859d3366a24da89736f487d980854ce 19-Feb-2015 Neil Fuller <nfuller@google.com> Fix for MulticastSocketTest for non-multicast interfaces

test_setNetworkInterfaceLjava_net_NetworkInterface does not check that
the interface supports multicast.

Bug: 19232216
Change-Id: I755287c06c99f36d209a3a8d11b2c75fccfa630b
rg/apache/harmony/tests/java/net/MulticastSocketTest.java
b87a2c8e03bb12e89e41a8284ae6c8c6941c78fa 18-Feb-2015 Mathieu Chartier <mathieuc@google.com> Merge "Make ReferenceQueueTest#test_removeJ more robust."
e7b8456e69c72dffc1c561c68cc320abfa6af241 18-Feb-2015 Mathieu Chartier <mathieuc@google.com> Make ReferenceQueueTest#test_removeJ more robust.

No spurrious failures if the sleep finishes before the RemoveThread
is inside the try catch block.

Bug: 19384923
Change-Id: I81e340e97eff5e1d011e980c2f89dfa679662547
rg/apache/harmony/tests/java/lang/ref/ReferenceQueueTest.java
0f702b5996488b8cc8cbe336e8098dd1b4de8dd3 18-Feb-2015 Narayan Kamath <narayan@google.com> Deal with quoted subformat patterns correctly.

This change might look like a hack, but the API it
implements is more than worthy of it.

bug: 19011159
Change-Id: I8a539f1b54282220fbb0a005a750819fa7873cc9
rg/apache/harmony/tests/java/text/MessageFormatTest.java
de75c0aa34c7db47ddec1704e94fa05c54687705 17-Feb-2015 Narayan Kamath <narayan@google.com> Fix handling of consecutive quotes in ChoiceFormat et al.

Two consecutive single quotes ('') must be interpreted as an
escaped single quite sequence. We were implementing it by simply
keeping track of whether the last character was a single quote.
This is insufficient for sequences of three or more quotes since
we shouldn't emit ('') for an escape sequence of ('''). We'll have
to keep track of the number of consecutive quotes we've seen in the
input instead.

This is a partial fix for the bug below. There appears to be another
bug in MessageFormat itself in its handling of subpatterns.

bug: 19011159
Change-Id: Ia71e5d8c1962356cabc265cf80ebc0a04ff84f17
rg/apache/harmony/tests/java/text/ChoiceFormatTest.java
c10ba1bf470b9ae0d9904e28105de5e679840cb9 17-Feb-2015 Narayan Kamath <narayan@google.com> Handle infinities correctly in ChoiceFormat.

We'd like ChoiceFormat.toPattern to emit a pattern that's parseable
by ChoiceFormat - which means we need an infinity that's parseable by
NumberFormat.parse().

Also, implement the nextDouble / previousDouble public API <sadface/>
in terms of Math.nextAfter and Math.nextUp.

bug: 19149384
Change-Id: Ieb13ee70c212d188ff9fde09463ced8d632f47ab
rg/apache/harmony/tests/java/text/ChoiceFormatTest.java
af9afbef141c04143fd9172880d469d498f915b2 30-Jan-2015 Elliott Hughes <enh@google.com> am 43bcec28: Merge "Remove flakiness from ProcessTest."

* commit '43bcec288e4b2e3f70903c6661c87a3edbec9e69':
Remove flakiness from ProcessTest.
14f694589bb5944e7f3e6862600ba25b15a37d18 30-Jan-2015 Elliott Hughes <enh@google.com> Remove flakiness from ProcessTest.

If run as root, ps(1) will list far too many processes, some of which
might coincidentally be zombies.

Note that we wanted "ps S" to show the STAT field, not "ps s" to
show the signal masks which also shows the STAT field as a side-effect.

Change-Id: Iedbcb45b871b1207248cb59c3a5fae9be5b0b3e2
rg/apache/harmony/tests/java/lang/ProcessTest.java
e001a6e4b9f965c18750f66e7648cd103cca7b2a 22-Jan-2015 Lorenzo Colitti <lorenzo@google.com> am 26bb4803: Merge "Use the IPv6 instead of the IPv4 wildcard address in sockets."

* commit '26bb48032cdcc8d69484ff168389c34e1f873250':
Use the IPv6 instead of the IPv4 wildcard address in sockets.
72ed50d1e9048b79efdb5b9e4ffb07c99a302d84 16-Jan-2015 Lorenzo Colitti <lorenzo@google.com> Use the IPv6 instead of the IPv4 wildcard address in sockets.

A few places in libcore consider the local address of an unbound
socket to be Inet4Address.ANY. For example, calling
getLocalAddress on an uncreated Socket will return 0.0.0.0, and
when creating a DatagramSocket, libcore attempts to bind it to
0.0.0.0 unless the caller specifies another address.

On Android, this is incorrect. All native socket filedescriptors
that underpin Java socket objects are created by IoBridge.socket,
and are dual-stack AF_INET6 sockets, not AF_INET sockets. When
such a socket is created, its local address is ::, not 0.0.0.0.
Thus, for example, calling getLocalAddress on a just-created
ServerSocket object will return ::. Binding to 0.0.0.0 is not
even allowed by os.bind, which silently converts it to :: instead
(in inetAddresstoSockaddr).

Therefore, accept reality and use :: instead of 0.0.0.0 in the
Java layer as well. Specifically:

1. Change DatagramSocket's constructors to bind to :: instead of
0.0.0.0. This is a complete no-op, because os.bind() silently
converts 0.0.0.0 into ::. Add a test for the other of the two
codepaths.
2. Change InetSocketAddress so that an uninitialized object has
an IP address of :: and not 0.0.0.0, and update its test. This
is unlikely to break anything short of an app that explicitly
depends on this behaviour, because os.bind() converts 0.0.0.0
to ::, and because any SocketAddress returned by any real
socket will never contain 0.0.0.0 anyway.
3. Change Socket so that calling getLocalAddress() when there is
no underlying socket file descriptor is will return :: instead
of 0.0.0.0. This is more correct, because it's consistent with
sockets that have been created, which will never have a local
address of 0.0.0.0.

Tested: vogar $(find libcore/*Socket*Test*) all passes on device.

Bug: 18094870
Change-Id: I9d60710fe945a99d6a5e65430248a889008ef4b1
rg/apache/harmony/tests/java/net/DatagramSocketTest.java
ab6feac62ab875a593f83864045704d894ae0bd8 22-Jan-2015 Narayan Kamath <narayan@google.com> am 1b462a5d: Merge "Fix ProcessTest#getErrorStream."

* commit '1b462a5d4a5cd4f28c9c7b368110128520a84594':
Fix ProcessTest#getErrorStream.
432abb6e8635e3dcac46648e158b5dc2c71b84fc 21-Jan-2015 Narayan Kamath <narayan@google.com> Fix ProcessTest#getErrorStream.

Broken by the move to toybox. Instead of double guessing the
error message, just assume that all "cat" variants (host / target etc.)
output the name of the "bad" paramater to the error stream.

Change-Id: If19fa737e0d3a3dd023185fa23854da3022020fa
rg/apache/harmony/tests/java/lang/ProcessTest.java
b131ebca5c4aaab6aef7975a819d86c1afadbb4d 20-Jan-2015 Narayan Kamath <narayan@google.com> am 6dc0ed72: Merge "Add a unit test to demonstrate ICU CharsetProvider problems"

* commit '6dc0ed7247a7520bf14a89db9b4bc3015d3cdcb2':
Add a unit test to demonstrate ICU CharsetProvider problems
1895955344b23f4d8a01596906a62f521c5463ef 12-Jan-2015 Narayan Kamath <narayan@google.com> Add a unit test to demonstrate ICU CharsetProvider problems

Also add a single FakeCharsetProvider for unit tests that
does nothing by default, so that we can stub it in for tests
that do care about it and none of our other tests are affected.

Change-Id: I03abb8f1aff53c160935b4cdbeaef764d30f240a
rg/apache/harmony/tests/java/nio/charset/CharsetTest.java
7cac0839477a6ac8f8a4111aacbdec3a52b61f9c 14-Jan-2015 Neil Fuller <nfuller@google.com> am 1a923668: Merge "Fix the hostname for the IPv6 loopback address"

* commit '1a923668463640b1e0cbdc9d90bc4530240fc75d':
Fix the hostname for the IPv6 loopback address
a43c5da446e8f02ebe23b6a026c25f4e25d89318 14-Jan-2015 Neil Fuller <nfuller@google.com> Fix the hostname for the IPv6 loopback address

Previously the hostname was "localhost", which
resolves to the IPv4 loopback address.

Also fixed the documentation for getAllByName(null)
which has returned the loopback addresses all the way
back to 2009 and not thrown an exception as
suggested in the docs.

Test fixes and new tests included.

Depends on commit 25147416bb105914c3cdf8fd65ca7cc20dae0f3e

Bug: 18991397
Bug: https://code.google.com/p/android/issues/detail?id=96801
Change-Id: I9723516a977e2a3b97412bc1d7e58b36df327feb
rg/apache/harmony/tests/java/net/InetAddressTest.java
6e3262f89ee6b2eb5ff6cca2d70cd1d210857e34 13-Jan-2015 Mathieu Chartier <mathieuc@google.com> am 0311cd2b: Increase ThreadTest tolerance

* commit '0311cd2be856e4c5872ebbe5ac7e12eac334ad73':
Increase ThreadTest tolerance
6db3d0ce897acb80416f8bb82695a8743856cedb 13-Jan-2015 Mathieu Chartier <mathieuc@google.com> Increase ThreadTest tolerance

Aims to fix flaky test.
Decreased minimum from 90% to 80%.
Increased maximum from 110% to 120%.
Increased maximum waitMillis from 10ms to 30ms.

Bug: 18788389

(cherry picked from commit 0311cd2be856e4c5872ebbe5ac7e12eac334ad73)

Change-Id: Ie3d84cf71769208e851b9fa7587c62858efdf4dd
rg/apache/harmony/tests/org/apache/harmony/kernel/dalvik/ThreadsTest.java
0311cd2be856e4c5872ebbe5ac7e12eac334ad73 13-Jan-2015 Mathieu Chartier <mathieuc@google.com> Increase ThreadTest tolerance

Aims to fix flaky test.
Decreased minimum from 90% to 80%.
Increased maximum from 110% to 120%.
Increased maximum waitMillis from 10ms to 30ms.

Bug: 18788389
Change-Id: I92477225492712448b0a78354730a037e2dda1a1
rg/apache/harmony/tests/org/apache/harmony/kernel/dalvik/ThreadsTest.java
8ccf76192ade429da560e9b077eaca33183a670a 05-Jan-2015 Alex Klyubin <klyubin@google.com> am d0f39dbb: Merge "Fix Harmony\'s HostnameVerifierTest breakage."

* commit 'd0f39dbb37a6c6d32b481067517daae95b360555':
Fix Harmony's HostnameVerifierTest breakage.
cf26d521c0606e37dc4346522b635de411517860 05-Jan-2015 Alex Klyubin <klyubin@google.com> Fix Harmony's HostnameVerifierTest breakage.

These tests got broken by recent changes to the platform-default
HostnameVerifier which no longer matches *.domain.com to domain.com.

This CL fixes the affected tests by changing their expectaions.

Bug: 18869757
Change-Id: I293b5f97f603a26a13cfd272a6175ef217ed4de3
rg/apache/harmony/tests/javax/net/ssl/HostnameVerifierTest.java
6d24bc8cf5bade9450ebd715e60d80f788726571 08-Dec-2014 Narayan Kamath <narayan@google.com> am a951e748: Fix failing socket tests.

* commit 'a951e74897193848ee88ed1c5b0a1d536f403d70':
Fix failing socket tests.
a951e74897193848ee88ed1c5b0a1d536f403d70 04-Dec-2014 Narayan Kamath <narayan@google.com> Fix failing socket tests.

Use bogus numeric addresses instead of invalid hostnames to make
InetAddress.getAllByName fail before we ask a DNS server. This guards
against flakiness caused by evil DNS servers.

Note that from an API perspective, Socket* and SSLSocket* don't care
about *why* getAllByName failed, just that it did.

This change also fixes a test that was asserting that the exception we
throw contains a useful error message. Again, this test was changed
to use a broken numeric address.

bug: 18575971

(cherry picked from commit 83b5554108e839b0c78178a029b65fddce8983f0)

Change-Id: Ia1c521c05634ce798a61b060f4d3fbbc164bb9fc
rg/apache/harmony/tests/java/net/InetAddressTest.java
rg/apache/harmony/tests/java/net/SocketTest.java
rg/apache/harmony/tests/javax/net/SocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSocketTest.java
c04b43461b80ceb1ecd035d17b88ebd89fa82219 05-Dec-2014 Narayan Kamath <narayan@google.com> am 89b456da: Merge "Fix failing socket tests."

* commit '89b456da4190576d2c89ad01bd5a7627b0676c2c':
Fix failing socket tests.
5e3ba3df4cd39a592694e526f02c2ad1f3fc2e83 04-Dec-2014 Narayan Kamath <narayan@google.com> am 382575b5: Merge "Rename packages to match directory structure."

* commit '382575b597f209f04ecdb5efae1036bf241c8d70':
Rename packages to match directory structure.
83b5554108e839b0c78178a029b65fddce8983f0 04-Dec-2014 Narayan Kamath <narayan@google.com> Fix failing socket tests.

Use bogus numeric addresses instead of invalid hostnames to make
InetAddress.getAllByName fail before we ask a DNS server. This guards
against flakiness caused by evil DNS servers.

Note that from an API perspective, Socket* and SSLSocket* don't care
about *why* getAllByName failed, just that it did.

This change also fixes a test that was asserting that the exception we
throw contains a useful error message. Again, this test was changed
to use a broken numeric address.

bug: 18575971
Change-Id: I0b49e5e66717dc29a3401f45af0ef2d5bb955219
rg/apache/harmony/tests/java/net/InetAddressTest.java
rg/apache/harmony/tests/java/net/SocketTest.java
rg/apache/harmony/tests/javax/net/SocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSocketTest.java
e82be46881b2ab9d64b35c0ee53fc359b5cfd18a 04-Dec-2014 Narayan Kamath <narayan@google.com> Rename packages to match directory structure.

Doesn't make a difference to the CTS test runner (which runs these
tests anyway) but vogar complains.

bug: 18575971

Change-Id: Ifd323300f9c70a8625c215d8ff7d48ddd18083bd
rg/apache/harmony/tests/javax/net/ServerSocketFactoryTest.java
rg/apache/harmony/tests/javax/net/SocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/CertPathTrustManagerParametersTest.java
rg/apache/harmony/tests/javax/net/ssl/CertificatesToPlayWith.java
rg/apache/harmony/tests/javax/net/ssl/HandshakeCompletedEventTest.java
rg/apache/harmony/tests/javax/net/ssl/HostnameVerifierTest.java
rg/apache/harmony/tests/javax/net/ssl/HttpsURLConnectionTest.java
rg/apache/harmony/tests/javax/net/ssl/KeyManagerFactory1Test.java
rg/apache/harmony/tests/javax/net/ssl/KeyManagerFactory2Test.java
rg/apache/harmony/tests/javax/net/ssl/KeyManagerFactorySpiTest.java
rg/apache/harmony/tests/javax/net/ssl/KeyStoreBuilderParametersTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLContext1Test.java
rg/apache/harmony/tests/javax/net/ssl/SSLContext2Test.java
rg/apache/harmony/tests/javax/net/ssl/SSLContextSpiTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineResultHandshakeStatusTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineResultStatusTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineResultTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLHandshakeExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLKeyExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLPeerUnverifiedExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLProtocolExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLServerSocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLServerSocketTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionBindingEventTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionBindingListenerTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionContextTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSocketTest.java
rg/apache/harmony/tests/javax/net/ssl/TrustManagerFactory1Test.java
rg/apache/harmony/tests/javax/net/ssl/TrustManagerFactory2Test.java
rg/apache/harmony/tests/javax/net/ssl/TrustManagerFactorySpiTest.java
rg/apache/harmony/tests/javax/net/ssl/X509ExtendedKeyManagerTest.java
rg/apache/harmony/tests/javax/net/ssl/X509KeyManagerTest.java
rg/apache/harmony/tests/javax/net/ssl/X509TrustManagerTest.java
a15eb800707e8f0d14d5f8c0e1976c4931f2e2b4 27-Nov-2014 Narayan Kamath <narayan@google.com> am 765a6c4e: Merge "Track CLDR-26 updates to currency data."

* commit '765a6c4ece178f90c3b5c2ddd1693c81700113ff':
Track CLDR-26 updates to currency data.
85e839fc507baedf3a7b99c3269ab54208eb6f25 27-Nov-2014 Narayan Kamath <narayan@google.com> Track CLDR-26 updates to currency data.

source/data/curr/it.txt : The "Svizzero" for CHF is now lowercase.
source/data/curr/fr_CA.txt : US dollars are now "$ US".
source/data/curr/en_GB.txt : Removed GB specific override ("$") for USD.
We now fall back to en_001 for USD, which is "US$".

Change-Id: I985897c67ed9ae831aa6b0eeb6d601a4adeeb2f9
rg/apache/harmony/tests/java/util/CurrencyTest.java
4010561042db08d7b8934983a63bef58b8ece4c2 22-Nov-2014 Jason Parks <jparks@google.com> am fc91c292: am 80a166b4: Merge "Do not run the multicast tests if the device doesn’t support multicast." into lmp-sprout-dev

* commit 'fc91c292a8cc5aaba60470f3057bc915e713109d':
Do not run the multicast tests if the device doesn’t support multicast.
fc91c292a8cc5aaba60470f3057bc915e713109d 22-Nov-2014 Jason Parks <jparks@google.com> am 80a166b4: Merge "Do not run the multicast tests if the device doesn’t support multicast." into lmp-sprout-dev

* commit '80a166b4cbdf3ea41e0e35db21208a8e5df78993':
Do not run the multicast tests if the device doesn’t support multicast.
944632aa6018d04d5acfa12879fb7f01ba2959ff 21-Nov-2014 Jason Parks <jparks@google.com> Do not run the multicast tests if the device doesn’t support multicast.

Bug: 18449007
Change-Id: Ia7511083cc36dd7d6835191bf4b79d23ed039b5b
rg/apache/harmony/tests/java/net/MulticastSocketTest.java
8d4127b6f07ff8b01cef5e29932bd21cf14d9921 14-Nov-2014 Kenny Root <kroot@google.com> am 657afa6c: Merge "JarUtils: stop trying to build chain past candidates length" into lmp-mr1-dev

* commit '657afa6cd8da378f30afe7b491e6d9de6c7c23fd':
JarUtils: stop trying to build chain past candidates length
ef7f5a16547089a7cdba9e48d780720f606ff54a 13-Nov-2014 Kenny Root <kroot@google.com> JarUtils: stop trying to build chain past candidates length

If the certs in the PKCS#7 bag are in a loop, it will go on forever
trying to build a chain. Instead just stop trying to build the chain
when our chain exceeds the length of the candidates.

Bug: 17972577
Change-Id: If4f92e3eeabe893612a618bab0068a0f8cf75ea9
rg/apache/harmony/tests/java/util/jar/JarFileTest.java
00bf89dd858de6c7eaca555210ba429a89193722 07-Nov-2014 Kenny Root <kroot@google.com> Switch order of digest and digest encryption algorithm

Sometimes "digest encryption algorithm" would be "RSA" which would match
a Signature provider, but its default setup would be whatever the
provider chose. This works fine with newer algorithms that have a
specific OID for their signature format (e.g., ECDSA and SHA256), but
not with algorithms that just have a generic OID for all possible uses
(e.g., RSA). Stock Android never hits this problem, because nothing
registers a "Signature.RSA" provider, but Spongycastle does so using
JarURLClassLoader after inserting Spongycastle causes a problem.

Flip the order of tries to make this work more uniformly with more JAR
and provider combinations.

(cherry picked from commit b1da6d3df5f9cce6e6d77c63599eba62edb465d6)

Bug: 17790692
Bug: https://code.google.com/p/android/issues/detail?id=68562
Change-Id: I3bb07ea25d7bf1d55fa2466b204594179ac38932
rg/apache/harmony/tests/java/util/jar/JarFileTest.java
b1da6d3df5f9cce6e6d77c63599eba62edb465d6 07-Nov-2014 Kenny Root <kroot@google.com> Switch order of digest and digest encryption algorithm

Sometimes "digest encryption algorithm" would be "RSA" which would match
a Signature provider, but its default setup would be whatever the
provider chose. This works fine with newer algorithms that have a
specific OID for their signature format (e.g., ECDSA and SHA256), but
not with algorithms that just have a generic OID for all possible uses
(e.g., RSA). Stock Android never hits this problem, because nothing
registers a "Signature.RSA" provider, but Spongycastle does so using
JarURLClassLoader after inserting Spongycastle causes a problem.

Flip the order of tries to make this work more uniformly with more JAR
and provider combinations.

Bug: 17790692
Bug: https://code.google.com/p/android/issues/detail?id=68562
Change-Id: I3bb07ea25d7bf1d55fa2466b204594179ac38932
rg/apache/harmony/tests/java/util/jar/JarFileTest.java
05f28ddd8b33d5f8f22fb9b95794aef074079f23 28-Oct-2014 Elliott Hughes <enh@google.com> am be4e0fd0: Merge "Allow 1 ulp difference in test_cbrt_D and test_sinh_D."

* commit 'be4e0fd06b44731bbe617a5a59e2d7c969a5d5cd':
Allow 1 ulp difference in test_cbrt_D and test_sinh_D.
9ed62cd1e87a433130a089f8cf27de560c643c8a 26-Oct-2014 Elliott Hughes <enh@google.com> Allow 1 ulp difference in test_cbrt_D and test_sinh_D.

Bug: 18016320

(cherry picked from commit cf5f86467f5be5f1c3ae2a5518c65f496ac93e33)

Change-Id: I05c3810320d035323e5fec07712b47586eb100bb
(cherry picked from commit 8afb381342e073b3bfcc8700b370e381ac23b2e0)
rg/apache/harmony/tests/java/lang/MathTest.java
8afb381342e073b3bfcc8700b370e381ac23b2e0 26-Oct-2014 Elliott Hughes <enh@google.com> Allow 1 ulp difference in test_cbrt_D and test_sinh_D.

Bug: 18016320

(cherry picked from commit cf5f86467f5be5f1c3ae2a5518c65f496ac93e33)

Change-Id: I05c3810320d035323e5fec07712b47586eb100bb
rg/apache/harmony/tests/java/lang/MathTest.java
cf5f86467f5be5f1c3ae2a5518c65f496ac93e33 26-Oct-2014 Elliott Hughes <enh@google.com> Allow 1 ulp difference in test_cbrt_D and test_sinh_D.

Bug: 18016320
Change-Id: Ic1d09473d42922c75274635029a2d21f3691e674
rg/apache/harmony/tests/java/lang/MathTest.java
6803c3e6c0d80f6cf79ca6338341a9fa423a763a 08-Oct-2014 Narayan Kamath <narayan@google.com> am 593a2e16: Fix FileTest.

* commit '593a2e1667f8923dff875268169bb5dfa4c67bef':
Fix FileTest.
593a2e1667f8923dff875268169bb5dfa4c67bef 08-Oct-2014 Narayan Kamath <narayan@google.com> Fix FileTest.

FileTest.testParent expects "user.home" to be non empty. The test
uses "user.home" because the author of the test (mistakenly) assumed
that calling "new File(path)" creates a new file. The value can be
safely replaced by a non-empty and non-existent path.

This test was broken by commit 566618403d002719a94a6624 changed
"user.home" from "/" to "" to match the documented value of the
property and to match all older versions of android *except* for
kitkat (which sets "/").

Note that this test is new with "L".

bug: 17906647
Change-Id: I21ca18c8d53095c37a9068ce18bcf937a0ccf877
rg/apache/harmony/tests/java/io/FileTest.java
08e093e6aecfff0605b34d7138560998d0334ccd 06-Oct-2014 Mathieu Chartier <mathieuc@google.com> am a912bd88: Merge "Fix RuntimeTest.freeMemory" into lmp-dev

* commit 'a912bd88ce8001c65d367d06cde1680bd344b9ce':
Fix RuntimeTest.freeMemory
4c8cbbd148b3478a597ac6bc95c17115fdd865a8 05-Oct-2014 Mathieu Chartier <mathieuc@google.com> Fix RuntimeTest.freeMemory

Previously the test asserted that freeMemory > 0, but it can be 0 if
the heap is full. Now we check that it is non negative.

Bug: 17448025
Change-Id: If8198e8f76543caea665caf77a37ac33dda38517
rg/apache/harmony/tests/java/lang/RuntimeTest.java
d910b55f913a31f467431eac8e1977844738543a 03-Oct-2014 Narayan Kamath <narayan@google.com> am d3b74a8a: Delete RuntimeTest.test_gc.

* commit 'd3b74a8affe39699df64469c955d0e925e1566fb':
Delete RuntimeTest.test_gc.
d3b74a8affe39699df64469c955d0e925e1566fb 03-Oct-2014 Narayan Kamath <narayan@google.com> Delete RuntimeTest.test_gc.

This test is flaky (see below), and it's not testing anything useful.

- the value returned by totalMemory() can increase if the heap expands
- similar issue with freeMemory(), which is only measured against the
current heap size
- the test assumes that there aren't any other threads in the process
allocating objects.

bug: 17663212
Change-Id: I43fb4c2d4412033cd01bb3a533a34e47905ff229
rg/apache/harmony/tests/java/lang/RuntimeTest.java
5e46bd928832dc638f41f9959427bef088d2184e 26-Sep-2014 Neil Fuller <nfuller@google.com> Rewrite tests and add tests that demonstrate a bug

The bug:
DecimalFormat.format() behavior is slightly
lossy around 15 decimal digits even without any
digit constraints.

This change isolates the test failures that result from
this bug to 2 test cases:

test_formatDouble_bug17656132
test_formatDouble_roundingProblemCases

Example of the bug:

Double: 999999999999999.9 is represented as an IEEE 754
value which is exactly decimal 999999999999999.875

When format(999999999999999.9) is called on a DecimalFormat
with large MaxIntegerDigit and MaxFractionDigit....

Correct answer: "999999999999999.9"
Actual answer: "1000000000000000"

By contrast Double.toString() prints 9.999999999999999E14
for Android and the RI (correctly).

The DecimalFormat is printing to 16 decimal digits: The
inclusion of the 16th digit implies slightly more precision
than IEEE 754 provides (~15.9 decimal digits for most of the
representable range).
However, the use of 16 decimal digits for outputting IEEE 754
appears consistent with Double.toString() and elsewhere.

Before printing, DecimalFormat appears to be rounding to
15 decimal digits internally (or something similar).

Parsing "1000000000000000" produces a different double
representation than the original double
(one that is closer to 1000000000000000 than
999999999999999.9). This is the bug - we just lost information.
We should be able to round-trip a double if there is no rounding
since every double is representable with decimal and we have
sufficient digits available to represent it (close enough) in
decimal.

Additional tests have been added to demonstrate the bug
and also demonstrate the (correct) formatting behavior when the
formatter is rounding.

test_formatDouble_maxFractionDigits: rounding at 1, 10, 14 digits
after the dp.
test_formatDouble_roundingTo15Digits: rounding at 15 total digits
overall
test_formatDouble_bug17656132: Demonstrates the bug concisely.

The test changes:

test_formatDouble_wideRange():
implicitly assumed that the any loss of accuracy
when a decimal string was turned into a double
would be undone when format() was called, and it would
always arrive back at the original string. The test
has been re-written here to use BigDecimal rather than
Double.parseDouble(), and to compare two doubles rather
than original string with the output from format().

The test was previously failing with the RI for 1E23:
the closest representable double to 1E23 is exactly
99999999999999991611392.
The value produces "99999999999999990000000" when formatted
with the RI and not "100000000000000000000000". On Android
it was passing for 1E23 because of bug 17656132 rounding
back to the original decimal value.

This test was previously failing on Android with 1E-309 because
below 1E-308 IEEE 754 starts losing precision and the closest
representable value is not close to the original string. The
test now isn't affected if the double being tested is not close
to the original decimal; it passes providing the can be round
tripped.

test_formatDouble_roundingProblemCases: Re-written like the
_wideRange test but continues to demonstrate the bug due to
the test values (intentionally) chosen.

Bug: 17656132

(cherry picked from commit 4e92b6265acb1d12109e311819dd64b27ec85df5)

Change-Id: I0b3245d8984999b2731508bb90de785492bb211b
rg/apache/harmony/tests/java/text/DecimalFormatTest.java
7e9ba6479f0f350be6f3aef91b9ffdb7c0a46995 25-Sep-2014 Neil Fuller <nfuller@google.com> Fix test_formatToCharacterIterator_original

Two issues fixed:
1) The negative currency cases appear to have never been correct. Almost
certainly they would have had the sign bit as the first element in the
format.
2) The recent change in Android to support the Turkish currency format
broke the TR tests (previously obscured by 1). Bug 16727554 /
commits ef91d1dbd60e9a245b121e3d31c8aad0332a64c7 and
44b0a574cbc3a54e421f5c79020cc59fbd4f34b9.

Bug: 12781028

(cherry picked from commit d90019a2d2e56ef56b412f7c11264148b075f4ba)

Change-Id: I050473f19646942a8ba4bde4b2c2847f4b516f7b
rg/apache/harmony/tests/java/text/Support_DecimalFormat.java
93ad3c2aba58918769a99b1fcf842fc92b473511 25-Sep-2014 Neil Fuller <nfuller@google.com> Fixing formatDouble scientific notation tests

Rather than having perpetually failing test cases the current Android
behavior has been captured and compared against the Android docs.
The "problem cases" have been merged into one test.

The tests now execute all format() calls and report at the end if any
fail, rather than failing at the first problem. This makes debugging
and comparison easier.

Each output from the affected tests has been inspected. The formatter
settings and some justification have been documented in the tests for
later engineers.

For format() with scientific notation the desired behavior is often
unclear because some parts of the docs contradict others about how
much the min/max integer/fraction values are used.

Many of the "problem cases" were the result of the significant
digit rules not being obeyed by the RI which probably introduced
doubt as to whether Android/ICU was correct.

None of the results were found to be actually wrong, i.e. they appear
to output the input number to the correct amount of precision.

When using min/max integer/fraction digits (i.e. not using '@'
characters), apparently by design DecimalFormat does
not produce strings that make clear the number of significant digits
used to generate them. e.g. 1.0 output to 4 sig digits does not output
1.000E0, but may output 1.0E0 or 1E0 depending on the pattern.

Bug reports have been created to record why some categories of results
are ok or to follow up where behavior is open to interpretation, e.g.
the choice of exponent, or whether leading or trailing zeros are
present in the output.

Bug: 17654561
Bug: 17653864
Bug: 17652647
Bug: 17652196
Bug: 12781028

(cherry picked from commit 279c42d3171bb72601f24de842a8770f903edcfe)

Change-Id: I2968e1d977a8a4e40381da330e38209a268d90fb
rg/apache/harmony/tests/java/text/DecimalFormatTest.java
bd1ed0e04e15d81a8a1f9eae1ce14c0d2829bb35 23-Sep-2014 Neil Fuller <nfuller@google.com> Tidy up DecimalFormatTest

The intent is to clean up the code to make it more obvious
where things are failing and why. The names of the tests now
better reflect their purpose and the code is reformatted.

Some tests have been merged where they overlapped and some
have been split.

(cherry picked from commit 8f4123761cebf7a925b1df887282014e420ac14e)

Change-Id: Ia0e99d3620c30933f9a6ed1143b915dd843e521e
rg/apache/harmony/tests/java/text/DecimalFormatTest.java
b1acb15cf862c5174971b3d3654f245ec156d4d7 26-Sep-2014 Neil Fuller <nfuller@google.com> am 972b7282: Merge "Rewrite tests and add tests that demonstrate a bug"

* commit '972b728220e3d85eb549aa3451e872f5a06e25c1':
Rewrite tests and add tests that demonstrate a bug
4e92b6265acb1d12109e311819dd64b27ec85df5 26-Sep-2014 Neil Fuller <nfuller@google.com> Rewrite tests and add tests that demonstrate a bug

The bug:
DecimalFormat.format() behavior is slightly
lossy around 15 decimal digits even without any
digit constraints.

This change isolates the test failures that result from
this bug to 2 test cases:

test_formatDouble_bug17656132
test_formatDouble_roundingProblemCases

Example of the bug:

Double: 999999999999999.9 is represented as an IEEE 754
value which is exactly decimal 999999999999999.875

When format(999999999999999.9) is called on a DecimalFormat
with large MaxIntegerDigit and MaxFractionDigit....

Correct answer: "999999999999999.9"
Actual answer: "1000000000000000"

By contrast Double.toString() prints 9.999999999999999E14
for Android and the RI (correctly).

The DecimalFormat is printing to 16 decimal digits: The
inclusion of the 16th digit implies slightly more precision
than IEEE 754 provides (~15.9 decimal digits for most of the
representable range).
However, the use of 16 decimal digits for outputting IEEE 754
appears consistent with Double.toString() and elsewhere.

Before printing, DecimalFormat appears to be rounding to
15 decimal digits internally (or something similar).

Parsing "1000000000000000" produces a different double
representation than the original double
(one that is closer to 1000000000000000 than
999999999999999.9). This is the bug - we just lost information.
We should be able to round-trip a double if there is no rounding
since every double is representable with decimal and we have
sufficient digits available to represent it (close enough) in
decimal.

Additional tests have been added to demonstrate the bug
and also demonstrate the (correct) formatting behavior when the
formatter is rounding.

test_formatDouble_maxFractionDigits: rounding at 1, 10, 14 digits
after the dp.
test_formatDouble_roundingTo15Digits: rounding at 15 total digits
overall
test_formatDouble_bug17656132: Demonstrates the bug concisely.

The test changes:

test_formatDouble_wideRange():
implicitly assumed that the any loss of accuracy
when a decimal string was turned into a double
would be undone when format() was called, and it would
always arrive back at the original string. The test
has been re-written here to use BigDecimal rather than
Double.parseDouble(), and to compare two doubles rather
than original string with the output from format().

The test was previously failing with the RI for 1E23:
the closest representable double to 1E23 is exactly
99999999999999991611392.
The value produces "99999999999999990000000" when formatted
with the RI and not "100000000000000000000000". On Android
it was passing for 1E23 because of bug 17656132 rounding
back to the original decimal value.

This test was previously failing on Android with 1E-309 because
below 1E-308 IEEE 754 starts losing precision and the closest
representable value is not close to the original string. The
test now isn't affected if the double being tested is not close
to the original decimal; it passes providing the can be round
tripped.

test_formatDouble_roundingProblemCases: Re-written like the
_wideRange test but continues to demonstrate the bug due to
the test values (intentionally) chosen.

Bug: 17656132
Change-Id: I7d81e38bd1f9dbfd1e1b2caa60a6bb16b871b925
rg/apache/harmony/tests/java/text/DecimalFormatTest.java
f239e3a739cbee33d48fc76264c4ffa0b4a90db8 26-Sep-2014 Neil Fuller <nfuller@google.com> am 77afa6c6: Merge "Fix test_formatToCharacterIterator_original"

* commit '77afa6c64f0af91224368452e3cce74338d667d2':
Fix test_formatToCharacterIterator_original
b4776bf1fb44bbb49620631dd224e1dd86a41ab0 26-Sep-2014 Neil Fuller <nfuller@google.com> am df014f5f: Merge "Fixing formatDouble scientific notation tests"

* commit 'df014f5f051130daf16599c8989bc157fe8dda5b':
Fixing formatDouble scientific notation tests
77afa6c64f0af91224368452e3cce74338d667d2 26-Sep-2014 Neil Fuller <nfuller@google.com> Merge "Fix test_formatToCharacterIterator_original"
d90019a2d2e56ef56b412f7c11264148b075f4ba 25-Sep-2014 Neil Fuller <nfuller@google.com> Fix test_formatToCharacterIterator_original

Two issues fixed:
1) The negative currency cases appear to have never been correct. Almost
certainly they would have had the sign bit as the first element in the
format.
2) The recent change in Android to support the Turkish currency format
broke the TR tests (previously obscured by 1). Bug 16727554 /
commits ef91d1dbd60e9a245b121e3d31c8aad0332a64c7 and
44b0a574cbc3a54e421f5c79020cc59fbd4f34b9.

Bug: 12781028
Change-Id: I6187f7f1feed915b1d8fd5fb398caef7998bfa04
rg/apache/harmony/tests/java/text/Support_DecimalFormat.java
279c42d3171bb72601f24de842a8770f903edcfe 25-Sep-2014 Neil Fuller <nfuller@google.com> Fixing formatDouble scientific notation tests

Rather than having perpetually failing test cases the current Android
behavior has been captured and compared against the Android docs.
The "problem cases" have been merged into one test.

The tests now execute all format() calls and report at the end if any
fail, rather than failing at the first problem. This makes debugging
and comparison easier.

Each output from the affected tests has been inspected. The formatter
settings and some justification have been documented in the tests for
later engineers.

For format() with scientific notation the desired behavior is often
unclear because some parts of the docs contradict others about how
much the min/max integer/fraction values are used.

Many of the "problem cases" were the result of the significant
digit rules not being obeyed by the RI which probably introduced
doubt as to whether Android/ICU was correct.

None of the results were found to be actually wrong, i.e. they appear
to output the input number to the correct amount of precision.

When using min/max integer/fraction digits (i.e. not using '@'
characters), apparently by design DecimalFormat does
not produce strings that make clear the number of significant digits
used to generate them. e.g. 1.0 output to 4 sig digits does not output
1.000E0, but may output 1.0E0 or 1E0 depending on the pattern.

Bug reports have been created to record why some categories of results
are ok or to follow up where behavior is open to interpretation, e.g.
the choice of exponent, or whether leading or trailing zeros are
present in the output.

Bug: 17654561
Bug: 17653864
Bug: 17652647
Bug: 17652196
Bug: 12781028
Change-Id: I6b3944b40ff837ecafd1b1be62c5824edb979930
rg/apache/harmony/tests/java/text/DecimalFormatTest.java
94d064c13bc3568c17d28c07a264af3e335f07d1 24-Sep-2014 Neil Fuller <nfuller@google.com> am b632c302: Merge "Tidy up DecimalFormatTest"

* commit 'b632c3020038351efe98a0a87ac0394c89b8b2d1':
Tidy up DecimalFormatTest
8f4123761cebf7a925b1df887282014e420ac14e 23-Sep-2014 Neil Fuller <nfuller@google.com> Tidy up DecimalFormatTest

The intent is to clean up the code to make it more obvious
where things are failing and why. The names of the tests now
better reflect their purpose and the code is reformatted.

Some tests have been merged where they overlapped and some
have been split.

Change-Id: Ic31e2062c2682b6b3ac349c8fb76c9b9809e2150
rg/apache/harmony/tests/java/text/DecimalFormatTest.java
9252ce2bef667745ad23601d5ac25b435e6e77f5 17-Sep-2014 Neil Fuller <nfuller@google.com> Fix FilePreferencesImplTest test initialization errors.

Fix IllegalAccessException from Preferences when this
test is run "stand alone".

The java.util.prefs.Preferences class is normally already
initialized by the time this test runs (and initialized
when there is no system property). However, in
standalone cases the system property is pointing to a
class that cannot be instantiated by ServiceLoader.

The normal fallback process when the system property is
not set would lead to FilePreferencesFactoryImpl being
instantiated directly by java.util.prefs.Preferences,
which is legal.

Removing the system property fixes the issue. The
FilePreferencesFactoryImpl is not intended to be created
by ServiceLoader and so it is reasonable that the class
is declared as package-protected. This test is for
the implementation so it's reasonable just to bypass
Preferences entirely.

Bug: 17515057

(cherry picked from commit 95c68ff724f7cf1afc2970b0d25e108e580307ed)

Change-Id: Ia860e299983b7b87753fe1dc0259b0d4ea2477f3
rg/apache/harmony/tests/java/util/prefs/FilePreferencesImplTest.java
e1252379251b251d11f165471fe286099de8569c 17-Sep-2014 Neil Fuller <nfuller@google.com> am bf5b79fd: Merge "Fix FilePreferencesImplTest test initialization errors."

* commit 'bf5b79fd518a0a769f7fae74d8704bdebc744f03':
Fix FilePreferencesImplTest test initialization errors.
95c68ff724f7cf1afc2970b0d25e108e580307ed 17-Sep-2014 Neil Fuller <nfuller@google.com> Fix FilePreferencesImplTest test initialization errors.

Fix IllegalAccessException from Preferences when this
test is run "stand alone".

The java.util.prefs.Preferences class is normally already
initialized by the time this test runs (and initialized
when there is no system property). However, in
standalone cases the system property is pointing to a
class that cannot be instantiated by ServiceLoader.

The normal fallback process when the system property is
not set would lead to FilePreferencesFactoryImpl being
instantiated directly by java.util.prefs.Preferences,
which is legal.

Removing the system property fixes the issue. The
FilePreferencesFactoryImpl is not intended to be created
by ServiceLoader and so it is reasonable that the class
is declared as package-protected. This test is for
the implementation so it's reasonable just to bypass
Preferences entirely.

Bug: 17515057
Change-Id: I02ea38b4a50fc3b7299a35d0a1050455cb9ca970
rg/apache/harmony/tests/java/util/prefs/FilePreferencesImplTest.java
4cc1c67c065453aba33ddeb5b1910544a7f895f0 16-Sep-2014 Neil Fuller <nfuller@google.com> am 64bbdb2e: Merge "Removing some compiler-warning suppressions from EnumMap"

* commit '64bbdb2e53712e7acc77fbb8b61a8888767610e0':
Removing some compiler-warning suppressions from EnumMap
64bbdb2e53712e7acc77fbb8b61a8888767610e0 16-Sep-2014 Neil Fuller <nfuller@google.com> Merge "Removing some compiler-warning suppressions from EnumMap"
a9f1fb9100f9f84f55c0572940a214a106e93f14 15-Sep-2014 Neil Fuller <nfuller@google.com> Removing some compiler-warning suppressions from EnumMap

The original motivation was to fix a report that
line 162 does not compile with newer compilers:
https://code.google.com/p/android/issues/detail?id=73244

There are a lot of compiler warning suppressions which made
the problem less obvious than it should have been.
The fact it compiled before was possibly a compiler bug.
This change removes a lot of the suppression, and where it
cannot be removed it narrows the scope to just local-variable
declarations. One method-level suppression remains.

This commit also adds a bug fix for situations where the raw
type is being used and an EnumMap is being created from an
existing Map. Previously a NullPointerException would have been
thrown if the first key found was not actually an enum, now a
ClassCastException will be thrown.

Some additional comments have been added and some loops made
into foreach.

Bug: https://code.google.com/p/android/issues/detail?id=73244
Change-Id: I7f23744dc55237a94e5906e77720a9595caa64e8
rg/apache/harmony/tests/java/util/EnumMapTest.java
e5f353301f2882776155fd1673c61a289d5eeaa1 12-Sep-2014 Mathieu Chartier <mathieuc@google.com> Delete RuntimeTest freeMemory test

Test was flaky due to bad assumptions, Runtime.freeMemory is already
tested by test_memory, test_gc.

Bug: 17448025

(cherry picked from commit e2233ca92da0339686da18db4a1e27b9a4c76b91)

Change-Id: I88d09ee5cd1c4e34c97814afd2cbadc870222738
rg/apache/harmony/tests/java/lang/RuntimeTest.java
e2233ca92da0339686da18db4a1e27b9a4c76b91 12-Sep-2014 Mathieu Chartier <mathieuc@google.com> Delete RuntimeTest freeMemory test

Test was flaky due to bad assumptions, Runtime.freeMemory is already
tested by test_memory, test_gc.

Bug: 17448025
Change-Id: I62a8e0240a8a8a95dcb9a8a2423bb57dfcff3c1a
rg/apache/harmony/tests/java/lang/RuntimeTest.java
b0b81dfb681cf401b3fc108b9abe432ee6736164 22-Aug-2014 Narayan Kamath <narayan@google.com> Move preference tests over from external/apache-harmony.

Also fixes all remaining failures. Most of them were
due to us not setting "user.dir" and "user.home" correctly.
Android has traditionally left those values blank. To fix
these tests, we need to change the default prefs factory
to one rooted at a temporary directory.

Note that this change attempts the minimal possible cleanup
(mainly style, commented code formatting etc.) to these files.

bug: 13881847

(cherry picked from commit a152f62d4d81ef6500b3e02dbc381e2414f9a11f)

Change-Id: Ie32a61e1b911dcd317c688f86e487f9ea778b31f
rg/apache/harmony/tests/java/util/prefs/AbstractPreferencesTest.java
rg/apache/harmony/tests/java/util/prefs/BackingStoreExceptionTest.java
rg/apache/harmony/tests/java/util/prefs/FilePreferencesImplTest.java
rg/apache/harmony/tests/java/util/prefs/InvalidPreferencesFormatExceptionTest.java
rg/apache/harmony/tests/java/util/prefs/MockAbstractPreferences.java
rg/apache/harmony/tests/java/util/prefs/MockPreferencesFactory.java
rg/apache/harmony/tests/java/util/prefs/NodeChangeEventTest.java
rg/apache/harmony/tests/java/util/prefs/NodeChangeListenerTest.java
rg/apache/harmony/tests/java/util/prefs/PreferenceChangeEventTest.java
rg/apache/harmony/tests/java/util/prefs/PreferenceChangeListenerTest.java
rg/apache/harmony/tests/java/util/prefs/PreferencesFactoryTest.java
rg/apache/harmony/tests/java/util/prefs/PreferencesTest.java
ef91d1dbd60e9a245b121e3d31c8aad0332a64c7 23-Aug-2014 Elliott Hughes <enh@google.com> Fix the Turkish Lira test.

Turkey switched from "123,45 TL" to "₺123,45" in 2012. It's taken
a while for our font to catch up, but now it has.

(cherry-pick of c56ec7b571ba6cc02ae9c1b5a790b7141b4de394.)

Bug: 16727554
Change-Id: I3c80f95d5f620c905247c9f227171717180106b4
rg/apache/harmony/tests/java/text/Support_DecimalFormat.java
c56ec7b571ba6cc02ae9c1b5a790b7141b4de394 23-Aug-2014 Elliott Hughes <enh@google.com> Fix the Turkish Lira test.

Turkey switched from "123,45 TL" to "₺123,45" in 2012. It's taken
a while for our font to catch up, but now it has.

Bug: 16727554
Change-Id: I3c80f95d5f620c905247c9f227171717180106b4
rg/apache/harmony/tests/java/text/Support_DecimalFormat.java
a152f62d4d81ef6500b3e02dbc381e2414f9a11f 22-Aug-2014 Narayan Kamath <narayan@google.com> Move preference tests over from external/apache-harmony.

Also fixes all remaining failures. Most of them were
due to us not setting "user.dir" and "user.home" correctly.
Android has traditionally left those values blank. To fix
these tests, we need to change the default prefs factory
to one rooted at a temporary directory.

Note that this change attempts the minimal possible cleanup
(mainly style, commented code formatting etc.) to these files.

bug: 13881847
Change-Id: I1918ee9af07be9612a7da142b3e584aabc860085
rg/apache/harmony/tests/java/util/prefs/AbstractPreferencesTest.java
rg/apache/harmony/tests/java/util/prefs/BackingStoreExceptionTest.java
rg/apache/harmony/tests/java/util/prefs/FilePreferencesImplTest.java
rg/apache/harmony/tests/java/util/prefs/InvalidPreferencesFormatExceptionTest.java
rg/apache/harmony/tests/java/util/prefs/MockAbstractPreferences.java
rg/apache/harmony/tests/java/util/prefs/MockPreferencesFactory.java
rg/apache/harmony/tests/java/util/prefs/NodeChangeEventTest.java
rg/apache/harmony/tests/java/util/prefs/NodeChangeListenerTest.java
rg/apache/harmony/tests/java/util/prefs/PreferenceChangeEventTest.java
rg/apache/harmony/tests/java/util/prefs/PreferenceChangeListenerTest.java
rg/apache/harmony/tests/java/util/prefs/PreferencesFactoryTest.java
rg/apache/harmony/tests/java/util/prefs/PreferencesTest.java
065d7764ac1dfe74ee94d17ca6c810de37b57d3e 11-Aug-2014 Elliott Hughes <enh@google.com> Fix TimeZone.getAvailableIDs(int).

This was broken by the removal of the pre-computed raw offsets from
the tzdata file. I think that's still the direction we want to go (with
us hopefully using more of icu4j at some point, and eventually relying
solely on the icu time zone data), so this patch adds code to lazily
evaluate all the offsets by instantiating all the time zones.

Bug: 16947622
Change-Id: I6d1dfe5ee6c99338f9807c3af5b6f04539c256c3
rg/apache/harmony/tests/java/util/TimeZoneTest.java
249a29f9e33e742c101ff5138ba56034ab2e5bf9 11-Aug-2014 Elliott Hughes <enh@google.com> Fix TimeZone.getAvailableIDs(int).

This was broken by the removal of the pre-computed raw offsets from
the tzdata file. I think that's still the direction we want to go (with
us hopefully using more of icu4j at some point, and eventually relying
solely on the icu time zone data), so this patch adds code to lazily
evaluate all the offsets by instantiating all the time zones.

(cherry-pick of 065d7764ac1dfe74ee94d17ca6c810de37b57d3e.)

Bug: 16947622
Change-Id: I6d1dfe5ee6c99338f9807c3af5b6f04539c256c3
rg/apache/harmony/tests/java/util/TimeZoneTest.java
bed66d8e567935f9de6fc748c22d4b8eadd8b00d 31-Jul-2014 Neil Fuller <nfuller@google.com> am 1aea503e: Merge "Fix SimpleDateFormatTest when run outside California"

* commit '1aea503e8f568f9c17c14335783a89d41787e657':
Fix SimpleDateFormatTest when run outside California
3b8f0286509a116326dc5d65fcbed1c93f85d2a4 31-Jul-2014 Neil Fuller <nfuller@google.com> am f814c4f5: Merge "Fix the OOME in ScannerParseLargeFileBenchmarkTest"

* commit 'f814c4f5445887275d9d58d21843e6d80fbdae27':
Fix the OOME in ScannerParseLargeFileBenchmarkTest
a3c7ce6ee877f73d6e0629bcb8d4cb2b123f3261 30-Jul-2014 Neil Fuller <nfuller@google.com> am 1ff54651: Merge "Change the DateFormatSymbols serialized form"

* commit '1ff5465107e518d45cadeebbe70d23e2a8f8c56e':
Change the DateFormatSymbols serialized form
1aea503e8f568f9c17c14335783a89d41787e657 31-Jul-2014 Neil Fuller <nfuller@google.com> Merge "Fix SimpleDateFormatTest when run outside California"
a4b67b6f5ba9d233023c55c816121070770e4ac5 30-Jul-2014 Neil Fuller <nfuller@google.com> Fix SimpleDateFormatTest when run outside California

If the device was set to a timezone besides America/Los_Angeles
the test would fail. Under cts-tradefed the SimpleDateFormat
was being created at class load time (using the device default)
and then the timezone default was being set to
America/Los_Angeles during setUp().

Contains refactoring to remove nested test case and
reformatting.

Change-Id: I26a7a2c6ce0d6205cf6d20c9b4cbebf550da19ce
rg/apache/harmony/tests/java/text/SimpleDateFormatTest.java
f814c4f5445887275d9d58d21843e6d80fbdae27 31-Jul-2014 Neil Fuller <nfuller@google.com> Merge "Fix the OOME in ScannerParseLargeFileBenchmarkTest"
4b116a2f5d3c6e2a0a7fe39d5eb956563138d542 20-Jun-2014 Neil Fuller <nfuller@google.com> Fix the OOME in ScannerParseLargeFileBenchmarkTest

Scanner had no mechanism for recovering buffer space it didn't
need.

Now, if the buffer is more than 50% full of ignorable characters
the remaining characters are shuffled to the beginning to recover
space. For most expected usecases this means that the buffer will
stay 1k and contain up to 512 characters of useful data. A
growable, circular character buffer could have been introduced
to avoid the copy but is not worth the effort.

Previously the buffer would double in size until the data or memory
was exhausted, and each read would also double in size to fill the
empty half of the buffer. This was fine providing the input
could fit in memory.

On top of that the 1k, 2k, 4k, etc. buffer was repeatedly turned
into a String and passed to the (native) matcher, and then the
matcher was told to ignore more than half of it.

As a consequence of keeping the buffer a fixed size (and only
filling 50% of it at a time), this change may cause a performance
regression: for most usecases where delimiters are closer together
than 512 bytes, reads after the first will now usually be 512 bytes
and not the 1k, 2k, 4k, etc. it was previously.

Having fixed the test so it doesn't OOM, the test now
takes 6 minutes to pass on host and so is unsuitable for inclusion
in CTS tests and so is being suppressed.

This change also includes so tidy up changes to the test and the
Scanner class.

The implementation could no doubt be improved but the API makes
it inherently slow. It would be surprising if anybody uses the
Scanner class on Android with so many better alternatives.

Bug: 14865710
Change-Id: I40a7fc0c2bfaf6db4e42108efe417303e76bde24
rg/apache/harmony/tests/java/util/ScannerParseLargeFileBenchmarkTest.java
77c859f4301633b033dc55f366884f55a1041e67 28-Jul-2014 Neil Fuller <nfuller@google.com> am 9ae2eb2e: Merge "Fix Harmony-707 test for CTS"

* commit '9ae2eb2e586d43f92c6339e9d7072ec1eef3f0ed':
Fix Harmony-707 test for CTS
1ff5465107e518d45cadeebbe70d23e2a8f8c56e 30-Jul-2014 Neil Fuller <nfuller@google.com> Merge "Change the DateFormatSymbols serialized form"
f39e1d71b478bafac028043a59683dfbed1d9df0 29-Jul-2014 Neil Fuller <nfuller@google.com> Change the DateFormatSymbols serialized form

Adding locale to the serialized form of
DateFormatSymbols.

Some duplicated code around the generation of
numeric / offset timezone strings (e.g. GMT+08:00) has
been removed. A new hidden method has been added
to TimeZone to create this string.

The timezone string lookup has been moved into
LocaleData and it now has a single path rather
than treating the customZoneStrings path as special.

customZoneStrings has been removed from
DateFormatSymbols because it would potentially
have an incorrect value after serialization and
it is no longer required.

Bug: 16502916
Change-Id: I2b317e34ba4772beb372a75dd08c95113408b9cc
rg/apache/harmony/tests/java/text/DateFormatSymbolsTest.java
bf48d2be36b35619309c70dce565d98cc3d17b1b 25-Jul-2014 Samuel Rats <samuel.rats@gmail.com> Fix Harmony-707 test for CTS

Change the way Harmony-707 test works.
We cannot check timeouts equality, as timeout is approximated
by the Linux Kernel (see set_sock_timeout() in net/core/sock.c).

Previously, testing with the value provided to setSoTimout()
could fail, depending on the Kernel configuration:
- On a device running a kernel compiled with CONFIG_HZ=100,
it would work
- On a device running a kernel compiled with CONFIG_HZ=250,
it would not:
* Kernel stored a timeout of 3 (3.49975 cast to long)
*timeo_p = tv.tv_sec*HZ + (tv.tv_usec+(1000000/HZ-1))/(1000000/HZ)
with tv.tv_sec=0, tv.tv_usec=10000 (10ms), and HZ=250
* Kernel returned a timeout of 12ms
v.tm.tv_usec = ((sk->sk_rcvtimeo % HZ) * 1000000) / HZ
with sk->sk_rcvtimeo=3 and HZ=250

Instead, we have to ensure that the timeout is not reset to the
internal default timeout after calling accept():
- set a timeout
- immediately retrieve it and store it (this value may differ
from the previously set value)
- call accept()
- retrieve and check the timeout with the previously stored
timeout

Change-Id: I7f05c6843d9e48e6d696dca17173fce028a45a68
Signed-off-by: Samuel Rats <samuel.rats@gmail.com>
rg/apache/harmony/tests/java/nio/channels/ServerSocketChannelTest.java
df624c1cc36dc17e4051d1100a3400aeb4252511 25-Jun-2014 Narayan Kamath <narayan@google.com> Fix handling of invalid locales in Date/DecimalFormatSymbols.

For locales whose language code is "und" we use Locale.ROOT
instead. This also fixes two other corner cases :

- We were using the wrong locale to fetch timezone strings
when the input locale was null. we now use the same locale
throughout by making sure we don't perform any subsititutions
in LocaleData.get.

- Adds a clearer comment about the broken serialization
behaviour.

bug: 15849709

(cherry picked from commit 043a1424a4e3bbb5abc9d9e11c9c088b20f4ca7d)

Change-Id: I716fb421fb8643dedebb3a7797a76ed1dd86c548
rg/apache/harmony/tests/java/text/DateFormatSymbolsTest.java
2b6169d920f6b88a4d665713081b35e44a1d7532 22-Jul-2014 Narayan Kamath <narayan@google.com> Fix Collator tests.

Use the modern "es-u-co-trad" instead of "es-TRADITIONAL".
The latter is an invalid language tag (TRADITIONAL is an invalid
variant) so we will not support it any longer.

bug: 15849709

(cherry picked from commit ee7d0c5bfcc6891034eaea0fa4a9571ffde5d2ae)

Change-Id: I560837f07fa67cc556381e0644dd49e6c9fdc59c
rg/apache/harmony/tests/java/text/CollationElementIteratorTest.java
rg/apache/harmony/tests/java/text/RuleBasedCollatorTest.java
5c0472fd7c53464e526bb833707551d85dbafec1 25-Jun-2014 Narayan Kamath <narayan@google.com> Fix handling of invalid locales in Date/DecimalFormatSymbols.

For locales whose language code is "und" we use Locale.ROOT
instead. This also fixes two other corner cases :

- We were using the wrong locale to fetch timezone strings
when the input locale was null. we now use the same locale
throughout by making sure we don't perform any subsititutions
in LocaleData.get.

- Adds a clearer comment about the broken serialization
behaviour.

bug: 15849709

Change-Id: I95e7eb0ccb7458711038ce9b1c76b3279acda9d6
rg/apache/harmony/tests/java/text/DateFormatSymbolsTest.java
ee7d0c5bfcc6891034eaea0fa4a9571ffde5d2ae 22-Jul-2014 Narayan Kamath <narayan@google.com> Fix Collator tests.

Use the modern "es-u-co-trad" instead of "es-TRADITIONAL".
The latter is an invalid language tag (TRADITIONAL is an invalid
variant) so we will not support it any longer.

bug: 15849709
Change-Id: Ia4172879041f42a3b5ff8b027b44c48b3c336f2c
rg/apache/harmony/tests/java/text/CollationElementIteratorTest.java
rg/apache/harmony/tests/java/text/RuleBasedCollatorTest.java
8acf1a7ee895565ab92626540308f3d893f88005 23-Jun-2014 Neil Fuller <nfuller@google.com> Fix UnmodifiableEntrySet.toArray() ordering

toArray() was returning entries in reverse order.
toArray(T[]) was correct.

Thanks to Chris Povirk for discovering.

The fix is simple.

Change includes additional tests to avoid regressions.
Test & support code has been cleaned up a little to
improve coverage and make it (slightly) less horrible.

Bug: https://code.google.com/p/android/issues/detail?id=72073
(cherry picked from commit 244e90adfe67264364de88df0fd741db0eb12b7f)

Change-Id: Ief017ca70863b799242ccfd04b8827e548548ea4
rg/apache/harmony/tests/java/util/CollectionsTest.java
9a497b6d3b95d774f28f0203409ce6ebf6cb1241 17-Jul-2014 Neil Fuller <nfuller@google.com> Merge "Fix UnmodifiableEntrySet.toArray() ordering"
d45744281bc05a21aec647fbd2cccdaedf9e1ff1 17-Jun-2014 Elliott Hughes <enh@google.com> Remove more.

(cherry-pick of f39b5ca3c6378c3c36c63889577004b9693ea9c6.)

Change-Id: Idaf030cd369e728ec37df7107cd30062db899b7c
rg/apache/harmony/tests/internal/net/www/protocol/file/FileURLConnectionTest.java
0aff1dd0b4be1b8d8cb45b59079ca883a1b3205a 17-Jun-2014 Elliott Hughes <enh@google.com> Remove.

(cherry-pick of 63744c884dd4b4f4307f2b021fb894af164972af.)

Change-Id: Ibf79a402e1bad98a262e380fcee3d35c127ae6d5
rg/apache/harmony/tests/java/net/HttpCookieTest.java
rg/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java
rg/apache/harmony/tests/java/nio/channels/FileChannelTest.java
rg/apache/harmony/tests/java/nio/channels/FileLockTest.java
rg/apache/harmony/tests/java/nio/channels/ServerSocketChannelTest.java
rg/apache/harmony/tests/java/nio/channels/SocketChannelTest.java
fdf7f349f5744b442e7c45d54c45342d0301c961 24-Jun-2014 Mathieu Chartier <mathieuc@google.com> am 47c61891: am 31e8ef04: Merge "Fix race condition in WeakHashMapTest."

* commit '47c61891491acce74675622abf3132ff03464ae5':
Fix race condition in WeakHashMapTest.
47c61891491acce74675622abf3132ff03464ae5 24-Jun-2014 Mathieu Chartier <mathieuc@google.com> am 31e8ef04: Merge "Fix race condition in WeakHashMapTest."

* commit '31e8ef04eb3bc2029eb94393c3ce87245dd75da2':
Fix race condition in WeakHashMapTest.
97afbd7972a43345ea12eb442b2a4e473b03d881 23-Jun-2014 Mathieu Chartier <mathieuc@google.com> Fix race condition in WeakHashMapTest.

There was a race condition where the reference queue daemon wouldn't
necessarily have processed the cleared references by the time we
called WeakHashMap.size(). The race is fixed by doing a busy wait
with a 5 second timeout. This should't increase the test time in the
average case since the cleared weak references should be processed
shortly after induceFinalization finishes.

Bug: 15775475

Change-Id: I66350b6c87252e98bfbd945fe1f96bef58ec24a9
rg/apache/harmony/tests/java/util/WeakHashMapTest.java
244e90adfe67264364de88df0fd741db0eb12b7f 23-Jun-2014 Neil Fuller <nfuller@google.com> Fix UnmodifiableEntrySet.toArray() ordering

toArray() was returning entries in reverse order.
toArray(T[]) was correct.

Thanks to Chris Povirk for discovering.

The fix is simple.

Change includes additional tests to avoid regressions.
Test & support code has been cleaned up a little to
improve coverage and make it (slightly) less horrible.

Bug: https://code.google.com/p/android/issues/detail?id=72073
Change-Id: I42ff90e0f592482289cd0cd9fdbdaabf0c17ad93
rg/apache/harmony/tests/java/util/CollectionsTest.java
f53e9d6701c6bd9730acb7c6f960a84461e95e4a 23-Jun-2014 Neil Fuller <nfuller@google.com> am 3568b562: am c477bf9e: Merge "Unimplement Console.readPassword and remove test"

* commit '3568b5622585cdde1f15503784971653710fc2aa':
Unimplement Console.readPassword and remove test
3568b5622585cdde1f15503784971653710fc2aa 23-Jun-2014 Neil Fuller <nfuller@google.com> am c477bf9e: Merge "Unimplement Console.readPassword and remove test"

* commit 'c477bf9eaf4553ed55b9d26c6bd65be3cc5665c6':
Unimplement Console.readPassword and remove test
1f3014901704f3ae81538773b8a0b382945adc8d 20-Jun-2014 Neil Fuller <nfuller@google.com> Unimplement Console.readPassword and remove test

ConsoleTest.test_readPassword* fails CTS tests.

Context: Under standard Android applications the
System.console() method will return null.

The Console.readPassword() method must turn off echo.

Under automated tests the ConsoleTest is exercising
a Console object with fake stdout / stdin streams to
get around the absence of a System.console().

setEcho() is hardcoded to use stdin / stdout in
the native code. Under the test runners stdin / stdout
are not connected to a TTY leading to a ENOTTY.

Under Android readPassword is unimportant. Rather than leaving
untested security-related code the password methods are being
unimplemented. It is unlikely this code has ever been used on
Android given the absence of a System Console instance.

Bug: 12491103
Change-Id: I755c014e6b53236f5bef0535be137dd721918b44
rg/apache/harmony/tests/java/io/ConsoleTest.java
b465afc2e95cf8d18b4925854923a41322322d2e 19-Jun-2014 Neil Fuller <nfuller@google.com> am 8c83d2aa: am 2eb56b69: Merge "Fix CurrencyTest.test_getSymbol for unknown variants"

* commit '8c83d2aa1fd7b7e3f9ca7415f9dfdf94de1314ec':
Fix CurrencyTest.test_getSymbol for unknown variants
8c83d2aa1fd7b7e3f9ca7415f9dfdf94de1314ec 19-Jun-2014 Neil Fuller <nfuller@google.com> am 2eb56b69: Merge "Fix CurrencyTest.test_getSymbol for unknown variants"

* commit '2eb56b69de339978a29d94531759b465742f027f':
Fix CurrencyTest.test_getSymbol for unknown variants
280a6d7eff0147bfbabe6d407e68ee911ebcb469 18-Jun-2014 Anwar Ghuloum <anwarg@google.com> am 4aadbe01: Merge "Remove more." into lmp-preview-dev

* commit '4aadbe01b75956c4a1c5af56723e5e6e3da25c47':
Remove more.
1d3d40749170e945b778e74786543520fbe9d14c 17-Jun-2014 Neil Fuller <nfuller@google.com> Fix CurrencyTest.test_getSymbol for unknown variants

The behavior of CurrencyTest.getSymbol has changed since
K for unrecoginzed locales.

Commit de0eb683370d789e7bb25673b350b8dbf2ba5d69 now means
the ICU default locale is set when the Java default locale
is changed. Previously it would have been left unset and
would have fallen back to using the system settings (most
likely US or UK English during tests).

The test is setting the Java default locale to "kr-KR"
(a locale unrecognized by ICU) and requesting the currency
symbol for USD for locale "kr-KR" (still unrecognized by
ICU).

Before the commit: Because the kr-KR argument is unrecognized
ICU tries the ICU default (which was unset and so picked
system setting of en). It returned "$".

After the commit: As above, but now the ICU default is set to
kr-KR. Since there is no entry for USD in the default it falls
back to "root", and returns the value found there: "US$".

Behavior when the default locale is unrecognized is edge-case
and arguably it is no more / less correct before or after
this commit. The test has been updated to reflect
the new value + some tidy up of the test generally.

This change also contains a more focused test that demonstrates
the behavior in ICU and adds documentation to make ICU
slightly clearer.

Arguably neither the new ICUTest nor the existing
CurrencyTest code should exist because they assert edge-case behavior
that Android may wish to change in future.

Bug: 14821275
Change-Id: I8beb6004b0c37d2fe59855d13d2c8e2e6fe1c530
rg/apache/harmony/tests/java/util/CurrencyTest.java
6188cc840d4987d2445740ce8a13dd335b6c6f73 17-Jun-2014 Elliott Hughes <enh@google.com> resolved conflicts for merge of 63744c88 to master

Change-Id: I2dbbda225d0fbe61da34f93abbb466ed490ba405
4aadbe01b75956c4a1c5af56723e5e6e3da25c47 17-Jun-2014 Anwar Ghuloum <anwarg@google.com> Merge "Remove more." into lmp-preview-dev
63744c884dd4b4f4307f2b021fb894af164972af 17-Jun-2014 Elliott Hughes <enh@google.com> Remove.

Change-Id: Ibf79a402e1bad98a262e380fcee3d35c127ae6d5
rg/apache/harmony/tests/java/net/HttpCookieTest.java
rg/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java
rg/apache/harmony/tests/java/nio/channels/FileChannelTest.java
rg/apache/harmony/tests/java/nio/channels/FileLockTest.java
rg/apache/harmony/tests/java/nio/channels/ServerSocketChannelTest.java
rg/apache/harmony/tests/java/nio/channels/SocketChannelTest.java
f39b5ca3c6378c3c36c63889577004b9693ea9c6 17-Jun-2014 Elliott Hughes <enh@google.com> Remove more.

Change-Id: Idaf030cd369e728ec37df7107cd30062db899b7c
rg/apache/harmony/tests/internal/net/www/protocol/file/FileURLConnectionTest.java
50a0959835100823848d9476bc3c5cad5a34bc92 16-Jun-2014 Neil Fuller <nfuller@google.com> am 4a35ec7e: am 2b931177: Merge "Tidy up MulticastSocketTest and fix execution on hammerhead"

* commit '4a35ec7e9eacc403a904d83df09a7bd762ebec0f':
Tidy up MulticastSocketTest and fix execution on hammerhead
4a35ec7e9eacc403a904d83df09a7bd762ebec0f 16-Jun-2014 Neil Fuller <nfuller@google.com> am 2b931177: Merge "Tidy up MulticastSocketTest and fix execution on hammerhead"

* commit '2b9311770bc531f15edb43f382696f3954a7c4e8':
Tidy up MulticastSocketTest and fix execution on hammerhead
886a55157f2feda49098fe5b118280268a306830 11-Jun-2014 Neil Fuller <nfuller@google.com> am 3dc2e67e: am 995dc174: Merge "Tests for Runtime.*Memory()"

* commit '3dc2e67e393d89902fac3deee351ee20cde3d2e3':
Tests for Runtime.*Memory()
2b9311770bc531f15edb43f382696f3954a7c4e8 16-Jun-2014 Neil Fuller <nfuller@google.com> Merge "Tidy up MulticastSocketTest and fix execution on hammerhead"
0233d6a99b5c2bd1f643909403977b373e6e2400 10-Jun-2014 Neil Fuller <nfuller@google.com> Tidy up MulticastSocketTest and fix execution on hammerhead

Similar to the fixes for DatagramChannelMulticastTest
in 6d7b081971d12b25426c46e4989e7df3a5995eae but
for java.net.MulticastSocket.

Because MulticastSocketTest was the genesis of
DatagramChannelMulticastTest it had similar issues to that one,
but also contained other unnecessary or badly formatted code.

The main changes here are:
1) Fix the tests that were implicitly assuming that the
IPv6NetworkInterface1 was the same interface as the IPv4
version (networkInterface1).

2) Renamed variables / moved setUp to the top of the class /
closed sockets after use / fixed try/catch blocks to only wrap
expected throwing code / pulled out common code into new methods
and generally tidied up.

3) Removed the use of the "MulticastServer" class entirely.
This "server" would listen to socket on a separate thread and
was the source of multiple Thread.sleep(1000) calls in the test.
The tests rely exclusively on multicast loopback mode anyway
(MulticastSocket.setLoopbackMode()) and
MulticastSocket.receive() is blocking, which means it either
gets an immediate result or the test can rely on the
setSoTimeout() method to limit the time spent waiting. The use
of multiple threads was therefore unnecessary.

Bug: 15509450
Change-Id: Ie448cc3b2d7432012957db34c72949a7b4da359f
rg/apache/harmony/tests/java/net/MulticastSocketTest.java
3dc2e67e393d89902fac3deee351ee20cde3d2e3 10-Jun-2014 Neil Fuller <nfuller@google.com> am 995dc174: Merge "Tests for Runtime.*Memory()"

* commit '995dc1746d6723734892b348e8faf627d830695e':
Tests for Runtime.*Memory()
f54d81e0e2d97798b928ba32f5edab5519622f28 10-Jun-2014 Neil Fuller <nfuller@google.com> Tests for Runtime.*Memory()

The docs describe a condition we do not test for.
The freeMemory / totalMemory tests have been consolidated
into a single test and joined by an additional assertion for
maxMemory().

The test for freeMemory from OldRuntimeTest has been tidied
up and moved to RuntimeTest.

Bug: 15507122
Change-Id: I4343215fb7f6b441613e25d3844d67812f5b5e94
rg/apache/harmony/tests/java/lang/RuntimeTest.java
e43a1534a04d2a3e7d2e4e7161b06f59b38fd64f 09-Jun-2014 Neil Fuller <nfuller@google.com> am 35f521cd: Merge "DO NOT MERGE : Fix for InetAddressTest#test_isReachableLjava_net_NetworkInterfaceII" into klp-modular-dev

* commit '35f521cdcd0b877b3a3c4a7df631529a31cee45b':
DO NOT MERGE : Fix for InetAddressTest#test_isReachableLjava_net_NetworkInterfaceII
dab07d8ea264efd3b7821663eec81b57ef4786bf 06-Jun-2014 Neil Fuller <nfuller@google.com> DO NOT MERGE : Fix for InetAddressTest#test_isReachableLjava_net_NetworkInterfaceII

This is speculative because the test passes for most devices
making it difficult to test.

The test was expecting IP 1.1.1.1 to be "unreachable". 1.1.1.1
may have special significance for the devices the test fails
for or the test environment they are using. 1.1.1.1 is not a
good choice for an "unreachable IP" since it is not only a
valid IP, but it was assigned to Google. It is also like to be
picked for (non-standard compliant) local networks due to its
ease of typing.

Switching the test to an IP address that should truly be
unreachable should not break anything and may fix the test.

This patch will also be applied to AOSP/master separately.

Bug: 15453368
Change-Id: I4f7e5b95d72b4952716581a783f520f6a8d7392d
rg/apache/harmony/tests/java/net/InetAddressTest.java
5d5d74033d8aa4e7d053ecf0f9f3fd8c50187bfe 21-May-2014 Neil Fuller <nfuller@google.com> resolved conflicts for merge of 8c208c01 to klp-modular-dev-plus-aosp

Change-Id: I54e57263e968e3f28ae07949d74d47f0907ab175
6cc167354969859a27919a8d7f546cb4bd74d51e 27-Feb-2014 Brett Chabot <brettchabot@google.com> Deprecate use of BrokenTest and SideEffect

Use expectations files instead.

(cherry picked from commit 6a6b612286976cc185c898803fe51e4e062bd9eb)

Bug: 12924356
Change-Id: I9b7e71805a80176c873cffe46bed65f81de1903d
rg/apache/harmony/tests/java/lang/ProcessManagerTest.java
rg/apache/harmony/tests/java/lang/ref/SoftReferenceTest.java
rg/apache/harmony/tests/java/lang/reflect/GenericSignatureFormatErrorTest.java
rg/apache/harmony/tests/javax/security/cert/X509CertificateTest.java
4cc6f6459c7db214be8d48ae980218ffb4297265 14-May-2014 Narayan Kamath <narayan@google.com> Merge "Fix broken CTS test" into klp-modular-dev
83503b28ef1361319dfb3e698a9861cbaa7ef703 15-Apr-2014 Neil Fuller <nfuller@google.com> Fix broken CTS test

The fix is in test_isJavaIdentifierPartC() and reverses
the assertion for Character.isJavaIdentifierPart('\u200b')
from false to true. The test method below it
(isIdentifierPart(int)) was already asserting this and
the behavior has been confirmed against the RI.

Other changes made:

Uncommented some assertions that now pass, removed unnecessary /
incorrect comments, added missing braces, some reformatting to 100
chars to improve readability, removed empty lines at the beginning of
methods . Converted all assertTrue(msg, !condition); to
assertFalse(msg, condition).

Bug: 13748395

(cherry picked from commit 2a025c1955e9fccac12587c019f3ae82ff5505c3)

Change-Id: I18ac7d2b0b8f87d4a13cb32113bbea1abe691a4a
rg/apache/harmony/tests/java/lang/CharacterTest.java
96905cbea69f50b8bab0e3d6e9d25fcae151bdb4 19-Feb-2014 Narayan Kamath <narayan@google.com> Fix remaining file related CTS Test failures.

Most failures were because tests were trying to
open files relative to the current working directory,
instead of in a temp directory.

FileTest was failing because it didn't construct
paths correctly. It would add an additional separator
char even if the path already ended with one.

bug:14895550
bug:14893836
bug:14893333

(cherry picked from commit e10c61bb13373b95ba857cc3af60f94b9941ab9e)

Change-Id: I083f6d5713fd55e44b7e14a9bef7ec136fac3ce4
rg/apache/harmony/tests/java/io/FileOutputStreamTest.java
rg/apache/harmony/tests/java/io/FileTest.java
rg/apache/harmony/tests/java/util/zip/CheckedInputStreamTest.java
rg/apache/harmony/tests/java/util/zip/CheckedOutputStreamTest.java
rg/apache/harmony/tests/java/util/zip/DeflaterOutputStreamTest.java
rg/apache/harmony/tests/java/util/zip/GZIPOutputStreamTest.java
rg/apache/harmony/tests/java/util/zip/ZipEntryTest.java
rg/apache/harmony/tests/java/util/zip/ZipFileTest.java
ddb6061eb51e5a8fe841e6ae88999ad7581f568a 13-May-2014 Narayan Kamath <narayan@google.com> am 100e8709: am c490e4dc: am 85cd6a19: Merge "Fix tests that relied on ReferenceQueue ordering semantics."

* commit '100e8709eff57f7803a6337d278a5c3b2cf12bb4':
Fix tests that relied on ReferenceQueue ordering semantics.
100e8709eff57f7803a6337d278a5c3b2cf12bb4 13-May-2014 Narayan Kamath <narayan@google.com> am c490e4dc: am 85cd6a19: Merge "Fix tests that relied on ReferenceQueue ordering semantics."

* commit 'c490e4dc33f0fe2086ec8d9cd872b9a358801eab':
Fix tests that relied on ReferenceQueue ordering semantics.
5e303c68fd65e388d74f37bc6554713d07e559ac 12-May-2014 Narayan Kamath <narayan@google.com> Fix tests that relied on ReferenceQueue ordering semantics.

Commit eb3e5888d4b3 changed ReferenceQueue from LIFO
to FIFO. Fix tests that were expecting it to be LIFO.

Change-Id: I222513ddb091755fb27294939beb6565b661dd3d
rg/apache/harmony/tests/java/lang/ref/ReferenceQueueTest.java
2b20f515d5d2a3c31e8f4699dd52900beaced6e4 12-May-2014 Neil Fuller <nfuller@google.com> Fix Hashtable CTS test

The test assumed that the Enumeration returned from
element() and keys() could be cast to Iterator. Even if it was
previously ok, it isn't now and it is not part of the public
API.

Manual merge from aosp/master for klp-modular-dev.

(cherry-pick of commit 4df29e1e1cf169ff6c77b8dd247de8c79b81d552
from aosp/master)

Bug: 13747624
Change-Id: Ifc3acc0e70bad561f8d9aa443494b40ba0e37346
rg/apache/harmony/tests/java/util/HashtableTest.java
7ca4240c7ade63a7f34f49ab306a8d79eab04726 12-May-2014 Neil Fuller <nfuller@google.com> am a053112a: am c1fa5983: am 52fb2230: Merge "Fix Hashtable CTS test"

* commit 'a053112a228fa8df4e3692cdf2553ef96ae43602':
Fix Hashtable CTS test
a053112a228fa8df4e3692cdf2553ef96ae43602 12-May-2014 Neil Fuller <nfuller@google.com> am c1fa5983: am 52fb2230: Merge "Fix Hashtable CTS test"

* commit 'c1fa59836cb9699e22b90eba7fa443e41ac9530e':
Fix Hashtable CTS test
52fb2230feb2726ab48704a0fd8d8c9c138db4d5 12-May-2014 Neil Fuller <nfuller@google.com> Merge "Fix Hashtable CTS test"
4df29e1e1cf169ff6c77b8dd247de8c79b81d552 12-May-2014 Neil Fuller <nfuller@google.com> Fix Hashtable CTS test

The test assumed that the Enumeration returned from
element() and keys() could be cast to Iterator. Even if it was
previously ok, it isn't now and it is not part of the public
API.

Bug: 13747624
Change-Id: I552a886711178708cbe7b6d87a976b6c1a839467
rg/apache/harmony/tests/java/util/HashtableTest.java
c9c4914ca5590cc9a788f7c96e16544f28e21048 12-May-2014 Narayan Kamath <narayan@google.com> Merge "Fix UnicodeBlockTest." into klp-modular-dev
73f10ba15e88eacf8b09eba73dbeef1a7193a930 09-May-2014 Narayan Kamath <narayan@google.com> Fix UnicodeBlockTest.

Remove negative tests for blocks that weren't assigned in
Java6 but are currently assigned. Those tests weren't very
useful anyway, since this class must serve as a test of our
ICU glue and not of the underlying ICU data.

Also removes a test for the deprecated SURROGATES_AREA member
which we don't support to remain consistent with ICU's treatment
of blocks in patterns.

bug: 12491302

(cherry picked from commit 7ed285657c33638ed939da5b2751e02f8e42648e)

Change-Id: I30313c7c63df1832b8fdc227bfe9cab46434d81d
rg/apache/harmony/tests/java/lang/Character_UnicodeBlockTest.java
b97e56a516c98de008dd20ed52c6e4fb30a6922c 08-May-2014 Narayan Kamath <narayan@google.com> Remove test for unsupported GregorianCalendar functionality.

Also adds an explanatory comment and makes the
intent of the implementation clearer without changing
any of the functionality.

TL;DR - there doesn't appear to be any sensible way
to provide any sort of consisent semantics if we plan
on supporting these fields.

Partial cherry-pick from commit
5eea675931db0bf976c2347f4e3b7e4703d337a4.
The implementation is left unmodified.

bug: 12778197
Change-Id: I0f161967412a42c582ba60da1c96d0ce37a90bcf
rg/apache/harmony/tests/java/util/GregorianCalendarTest.java
21181a03aaf07b3fdb2b7d8e941fe1deb452c6c4 09-May-2014 Narayan Kamath <narayan@google.com> Blacklist a known failure in GregorianCalendarTest.

The issues here relate to how we deal with ambiguous wall
clock times, i.e, wall clock values that we "skip" when we
move the clock forward when transitioning into daylight
savings, and wall clock times that occur twice when we
move the clock backward

This isn't a regression. We've never handled this correctly.

bug: 12778197

(cherry picked from commit 3f2128b3408255e317f66c10c6dd5edbff53b3ee)

Change-Id: If0fd5b5e0cb79363ffd3759c7cb6b2c63aabee82
rg/apache/harmony/tests/java/util/GregorianCalendarTest.java
d912c8b342defd57a30722f15e98140bc71ff537 13-Feb-2014 Narayan Kamath <narayan@google.com> Fix GregorianCalendarTest#test_addII.

We're going through the trouble of accounting for
DST changes in GregorianCalendar.add(int, int) (as per
the spec), so adjust our tests to agree.

bug: 12778197

(cherry picked from commit 1326a80ee854ad7df3ac183874734e418194572c)

Change-Id: I92b072e2385c7fbd6fcac9de25eec7542d53e2d6
rg/apache/harmony/tests/java/util/GregorianCalendarTest.java
713313d3acfba677b72ee8e6b2a7de57c28e2587 13-Feb-2014 Narayan Kamath <narayan@google.com> Partially fix GregorianCalendarTest.

ICU4C data (see icu4c/data/misc/supplementalData.txt)
as well as the RI agree that the minimum number of days
in the first week of the year should be 1 in canada.

(I'm not a 100% convinced that this is correct, the
canadian standards board claims to have implemented
ISO 8601, which requires a 4 day minimum. However, that
site links to several documents such as CSA Z234.5 that
are not publicly accessible).

(cherry picked from commit ce54057889055ab8c4cb45c51df0ca9ee09ebb43)

Change-Id: I7d152ba1f157bfaffeac6c38c37828aaf0004cb2
rg/apache/harmony/tests/java/util/GregorianCalendarTest.java
007945d23d8df43aa89d3a30177cae6e82c73d8e 12-May-2014 Narayan Kamath <narayan@google.com> am ee998bd7: am 3ba6fc84: am 0a2ddb63: Merge "Remove test for unsupported GregorianCalendar functionality."

* commit 'ee998bd77e0367865b524cdbd4a0659a0b5d8bd5':
Remove test for unsupported GregorianCalendar functionality.
e18365395f77e671675b7f155e9516005854d33a 12-May-2014 Narayan Kamath <narayan@google.com> am 3ac87904: am c2ec0af0: am f7892a21: Merge "Fix UnicodeBlockTest."

* commit '3ac87904eeb5f902a02da18d2994fe87ae97bf6c':
Fix UnicodeBlockTest.
9a000495e89271419ab9dff9b581745e3581be5d 12-May-2014 Narayan Kamath <narayan@google.com> resolved conflicts for merge of 2b6c9f55 to master

Change-Id: I7bd8df2f8679fe85bb95a371fc9cc564581fa29b
ee998bd77e0367865b524cdbd4a0659a0b5d8bd5 12-May-2014 Narayan Kamath <narayan@google.com> am 3ba6fc84: am 0a2ddb63: Merge "Remove test for unsupported GregorianCalendar functionality."

* commit '3ba6fc848a3080c09326399793231323188dca91':
Remove test for unsupported GregorianCalendar functionality.
3ac87904eeb5f902a02da18d2994fe87ae97bf6c 12-May-2014 Narayan Kamath <narayan@google.com> am c2ec0af0: am f7892a21: Merge "Fix UnicodeBlockTest."

* commit 'c2ec0af034d1f432c38b3bf61b03ea8c266921d1':
Fix UnicodeBlockTest.
2b6c9f5506aaa53cf7003585077a9b9b57bd685b 12-May-2014 Narayan Kamath <narayan@google.com> resolved conflicts for merge of e111e5a4 to klp-modular-dev-plus-aosp

Change-Id: Iaf9c22378a35a0bd2d9e20c6afeb208c468234ab
5eea675931db0bf976c2347f4e3b7e4703d337a4 08-May-2014 Narayan Kamath <narayan@google.com> Remove test for unsupported GregorianCalendar functionality.

Also adds an explanatory comment and makes the
intent of the implementation clearer without changing
any of the functionality.

TL;DR - there doesn't appear to be any sensible way
to provide any sort of consisent semantics if we plan
on supporting these fields.

bug: 12778197

Change-Id: Iadaaaa5d4bdddec4aceca498ffc870edf2cbefed
rg/apache/harmony/tests/java/util/GregorianCalendarTest.java
7ed285657c33638ed939da5b2751e02f8e42648e 09-May-2014 Narayan Kamath <narayan@google.com> Fix UnicodeBlockTest.

Remove negative tests for blocks that weren't assigned in
Java6 but are currently assigned. Those tests weren't very
useful anyway, since this class must serve as a test of our
ICU glue and not of the underlying ICU data.

Also removes a test for the deprecated SURROGATES_AREA member
which we don't support to remain consistent with ICU's treatment
of blocks in patterns.

bug: 12491302
Change-Id: I9301cab55913df635128fe77f820729c34aa6fe3
rg/apache/harmony/tests/java/lang/Character_UnicodeBlockTest.java
3f2128b3408255e317f66c10c6dd5edbff53b3ee 09-May-2014 Narayan Kamath <narayan@google.com> Blacklist a known failure in GregorianCalendarTest.

The issues here relate to how we deal with ambiguous wall
clock times, i.e, wall clock values that we "skip" when we
move the clock forward when transitioning into daylight
savings, and wall clock times that occur twice when we
move the clock backward

This isn't a regression. We've never handled this correctly.

bug: 12778197
Change-Id: Ida79583c02c6895096a8afdd8f59b1002b282d32
rg/apache/harmony/tests/java/util/GregorianCalendarTest.java
40bb958bb2776fe50244ebdce1b59a7234f911d9 09-May-2014 Narayan Kamath <narayan@google.com> am 00c64297: am 469b6955: am 567dcb29: Merge "Fix various errors in FileURLConnectionTest."

* commit '00c642971127aa804eca93bf770eb9802fb5a159':
Fix various errors in FileURLConnectionTest.
00c642971127aa804eca93bf770eb9802fb5a159 09-May-2014 Narayan Kamath <narayan@google.com> am 469b6955: am 567dcb29: Merge "Fix various errors in FileURLConnectionTest."

* commit '469b6955a8ee5039a61eb195a034684f513f6b21':
Fix various errors in FileURLConnectionTest.
d94e746976d2906b89197448db15e4a0e355d98a 08-May-2014 Narayan Kamath <narayan@google.com> Fix various errors in FileURLConnectionTest.

- First, the test was broken pretty badly. It would pass a
Jar style URL to a FileURLConnection and expect it to
work, this is out of spec and seems wrong in general
(file:///foo.apk!resources/foo.txt).

- The RI supports various "headers" on file URL connections
(sigh). As if the getHeaderField(int) and getHeaderFieldKey(int)
APIs weren't bad enough. This has now been implemented with
a naive implementation.

- Fixes FileURLConnection to populate a header map for
information it provides (content length, content type
etc.)

bug: 11664881

Change-Id: I7a3e9aaa79bf125abbcfe8367574115ce54718e3
rg/apache/harmony/tests/internal/net/www/protocol/file/FileURLConnectionTest.java
33aeb892a68274a5ec67f374f86c7b5cb06d1890 01-May-2014 Kenny Root <kroot@google.com> resolved conflicts for merge of 9687e46b to master

Change-Id: Iaeaea9b44423257e8ccbcf631f40720d3035cecd
9687e46bcb2299492a55a97e0ddc1eb4db3517f8 30-Apr-2014 Kenny Root <kroot@google.com> am 42db8377: am 15e6f173: am d353b8e2: am ddc91700: am 0a0379d4: am 297a7de2: am 183efbb4: am 4629f94a: am e0350a80: am afd7d947: Merge "JarFile: make test chain 3 long" into jb-dev

* commit '42db8377fdd20cdff6cac1994b25382551270a26':
JarFile: make test chain 3 long
42db8377fdd20cdff6cac1994b25382551270a26 30-Apr-2014 Kenny Root <kroot@google.com> am 15e6f173: am d353b8e2: am ddc91700: am 0a0379d4: am 297a7de2: am 183efbb4: am 4629f94a: am e0350a80: am afd7d947: Merge "JarFile: make test chain 3 long" into jb-dev

* commit '15e6f173de11133e1a61090635e350303ac0481a':
JarFile: make test chain 3 long
cdd4aae90277f2182420526c14b9d77a9e7f1203 29-Apr-2014 Kenny Root <kroot@google.com> JarFile: remove tests for chainCheck hidden API, part 2

The hidden API was reverted since the fix is now in
PackageManagerService.

This was PS#2 of the original change, but didn't get uploaded.

Bug: 13678484
Change-Id: Ic488ec5cd7c0d1bf6fb2d7aba16deaee8b6f98a5
rg/apache/harmony/tests/java/util/jar/JarFileTest.java
fe821d0a3d96518107489e22b37f664632472c41 29-Apr-2014 Kenny Root <kroot@google.com> JarFile: remove tests for chainCheck hidden API

The hidden API was reverted since the fix is now in
PackageManagerService.

Bug: 13678484
Change-Id: I9b5478af9145df82eea01e768d02945f14524bf7
rg/apache/harmony/tests/java/util/jar/JarFileTest.java
de916a09d6fe2fc76e423022214ed9eac57e4f8c 29-Apr-2014 Neil Fuller <nfuller@google.com> am 8f5ff15d: am 97e35de3: Merge "1.7 interoperability changes for FileLock"

* commit '8f5ff15dc0428bbef5911776ae1f4d2730de4ed4':
1.7 interoperability changes for FileLock
8f5ff15dc0428bbef5911776ae1f4d2730de4ed4 29-Apr-2014 Neil Fuller <nfuller@google.com> am 97e35de3: Merge "1.7 interoperability changes for FileLock"

* commit '97e35de30fcddd7eaa0d6eb7a100bcf9bdd824a1':
1.7 interoperability changes for FileLock
a10637a26dc17501789edde0f4675e1639741f71 12-Mar-2014 Neil Fuller <nfuller@google.com> 1.7 interoperability changes for FileLock

Adding acquiredBy(). This method is effectively a synonym for
channel().

Change-Id: Ifa0b89debb42a7181f1f5f188ae7175970286adb
rg/apache/harmony/tests/java/nio/channels/FileChannelTest.java
rg/apache/harmony/tests/java/nio/channels/FileLockTest.java
6e27400ac47d70697bcff38b052113ccf577c279 26-Apr-2014 Kenny Root <kroot@google.com> am fee4f2a7: am edbc606d: Merge "SSLEngine: update harmony tests"

* commit 'fee4f2a76db67900455049d81d241852ea6fb041':
SSLEngine: update harmony tests
fee4f2a76db67900455049d81d241852ea6fb041 26-Apr-2014 Kenny Root <kroot@google.com> am edbc606d: Merge "SSLEngine: update harmony tests"

* commit 'edbc606d8ff8a32d17f26da4d4fbfbe8e2363955':
SSLEngine: update harmony tests
b330a5e324ef8d399f12db82b4bf472859815faf 25-Apr-2014 Kenny Root <kroot@google.com> SSLEngine: update harmony tests

The old tests were broken and difficult to debug because of catching
exceptions and calling fail()

Change-Id: Idad6774e5f0839242b0667be1a25784b7ec70aef
rg/apache/harmony/tests/javax/net/ssl/SSLEngineTest.java
d434a6072462b8ba01a41f9febdaabc383e0e31e 17-Apr-2014 Neil Fuller <nfuller@google.com> DO NOT MERGE Fix for ThreadGroup CTS test.

Fixed the test for UncaughtExceptionHandler. This was actually
several tests in one. Each has been broken out. The ones that
were failing were a result of the CTS test runner executing as
an instrumented Android app. The default behavior (configured in
com.android.internal.os.RuntimeInit) is to kill an app if an
uncaught exception reaches the top-most handler. The solution
was to set an alternative default UncaughtExceptionHandler on
Thread to suppress this behavior for the duration of the test
by installing an alternative handler. This handler could also
then be used to confirm the ThreadGroup behavior of "if an
exception is handled by the ThreadGroup hierarchy, use the
Thread default UncaughtExceptionHandler".

The functionality changes are in:
1) setUp()/tearDown() - installing, uninstalling the handler and
removing a Thread.sleep(50).
2) test_uncaughtException_* methods split out. Additional tests
were added and one was removed.
3) Tidied up test_list(), which was relying on particular
thread names and would have used Thread.stop() (which is
unimplemented) if those threads were found.

The remaining changes were refactorings to pull out common code,
remove unneccessary newlines / comments / semi-colons, reformat
to 100 chars width, remove == true / == false conditions, delete
dead code. All pure functions have been made static to make it
clearer they have no side-effects.

What remains is still not nice, but is improved and ~300 lines
shorter.

Bug: 13748422

(cherry picked from commit 071ba8eb49cc6ea63dc913aab145076dbeff0049)

Change-Id: I995553a909974cb0bb6b9521a6a39fd0d6014a3f
rg/apache/harmony/tests/java/lang/ThreadGroupTest.java
79dafc5268c73584b02dc4b54d96192357f8710b 24-Apr-2014 Kenny Root <kroot@google.com> Merge "JarFile: Add tests for ambiguous chains"
c13009ec0a0c20440f49294a4a4c0833fe071af4 23-Apr-2014 Neil Fuller <nfuller@google.com> am e9d51850: am 2e667679: Merge "Removal of a broken CTS test"

* commit 'e9d51850d10bac6ab5e2ba5a113d1b0b8e9ee198':
Removal of a broken CTS test
a34ccacaff560954a63a05c5df32e89de2fcb07b 23-Apr-2014 Neil Fuller <nfuller@google.com> am 50765f55: am 5f38b08c: Merge "Fix for ThreadGroup CTS test."

* commit '50765f55fc3cc18d7b8aa40113935c6d3419aab0':
Fix for ThreadGroup CTS test.
e9d51850d10bac6ab5e2ba5a113d1b0b8e9ee198 23-Apr-2014 Neil Fuller <nfuller@google.com> am 2e667679: Merge "Removal of a broken CTS test"

* commit '2e667679740a2a204b7f0566d2ba334b3fb2acc1':
Removal of a broken CTS test
2e667679740a2a204b7f0566d2ba334b3fb2acc1 23-Apr-2014 Neil Fuller <nfuller@google.com> Merge "Removal of a broken CTS test"
50765f55fc3cc18d7b8aa40113935c6d3419aab0 23-Apr-2014 Neil Fuller <nfuller@google.com> am 5f38b08c: Merge "Fix for ThreadGroup CTS test."

* commit '5f38b08cb74495fbab7b541040de3248a3d49593':
Fix for ThreadGroup CTS test.
1f91ac84933dfab9ce09c31b736b45a22f0fed56 23-Apr-2014 Neil Fuller <nfuller@google.com> Removal of a broken CTS test

The cause of the failure is that the test asserts that the
entrySet() Set from an UnmodifiableMap is Serializable,
when it is not.

The test fails under the RI as well so I have removed it.

Bug: 11668227
Change-Id: Ife3ce848f77d6f63931852792e0f6f0db83382a8
rg/apache/harmony/tests/java/io/SerializationStressTest4.java
071ba8eb49cc6ea63dc913aab145076dbeff0049 17-Apr-2014 Neil Fuller <nfuller@google.com> Fix for ThreadGroup CTS test.

Fixed the test for UncaughtExceptionHandler. This was actually
several tests in one. Each has been broken out. The ones that
were failing were a result of the CTS test runner executing as
an instrumented Android app. The default behavior (configured in
com.android.internal.os.RuntimeInit) is to kill an app if an
uncaught exception reaches the top-most handler. The solution
was to set an alternative default UncaughtExceptionHandler on
Thread to suppress this behavior for the duration of the test
by installing an alternative handler. This handler could also
then be used to confirm the ThreadGroup behavior of "if an
exception is handled by the ThreadGroup hierarchy, use the
Thread default UncaughtExceptionHandler".

The functionality changes are in:
1) setUp()/tearDown() - installing, uninstalling the handler and
removing a Thread.sleep(50).
2) test_uncaughtException_* methods split out. Additional tests
were added and one was removed.
3) Tidied up test_list(), which was relying on particular
thread names and would have used Thread.stop() (which is
unimplemented) if those threads were found.

The remaining changes were refactorings to pull out common code,
remove unneccessary newlines / comments / semi-colons, reformat
to 100 chars width, remove == true / == false conditions, delete
dead code. All pure functions have been made static to make it
clearer they have no side-effects.

What remains is still not nice, but is improved and ~300 lines
shorter.

Bug: 13748422
Change-Id: I995553a909974cb0bb6b9521a6a39fd0d6014a3f
rg/apache/harmony/tests/java/lang/ThreadGroupTest.java
a3d40b4064c0f4de77122eff9253da242877c938 23-Apr-2014 Kenny Root <kroot@google.com> JarFile: Add tests for ambiguous chains

Some chains using the old code will have incorrect splits between
CodeSigner paths.

Bug: 13678484
Change-Id: Ia77b7cbcde9394e0d48a6f082bbd1cdfd880d74b
rg/apache/harmony/tests/java/util/jar/JarFileTest.java
d32a5c2f44587946ad9d4de26117e45b610b0a6d 23-Apr-2014 Kenny Root <kroot@google.com> Add tests for getCodeSigners

Change-Id: I2bf7449eb72319a547abfd439cabfcc41982d668
rg/apache/harmony/tests/java/util/jar/JarFileTest.java
c77306770421da11fde22fb0cd86c94c8e2d72b5 22-Apr-2014 Kenny Root <kroot@google.com> am 5978b692: am 0779dcac: am 008fbfd0: am a317f758: am ced71a50: am 99a25a47: am 5321ebb7: am 6d949cbf: am 951aa4f4: am 531968cf: am cb11b9ff: Tests for API to check certificate chain signatures

* commit '5978b69274677753bc3049b4dc89625291a66912':
Tests for API to check certificate chain signatures
5978b69274677753bc3049b4dc89625291a66912 22-Apr-2014 Kenny Root <kroot@google.com> am 0779dcac: am 008fbfd0: am a317f758: am ced71a50: am 99a25a47: am 5321ebb7: am 6d949cbf: am 951aa4f4: am 531968cf: am cb11b9ff: Tests for API to check certificate chain signatures

* commit '0779dcac1bdc0d6d02ef6e4843a312aa03081f03':
Tests for API to check certificate chain signatures
0779dcac1bdc0d6d02ef6e4843a312aa03081f03 22-Apr-2014 Kenny Root <kroot@google.com> am 008fbfd0: am a317f758: am ced71a50: am 99a25a47: am 5321ebb7: am 6d949cbf: am 951aa4f4: am 531968cf: am cb11b9ff: Tests for API to check certificate chain signatures

* commit '008fbfd0ff37cb88047825d56d2116d0f62b69a5':
Tests for API to check certificate chain signatures
8fd85f49c6689a98a4f9981b0a4b4b13358f6c13 22-Apr-2014 Neil Fuller <nfuller@google.com> am 5c3502f3: am 0d18ebc5: Merge "Change DecimalFormat.setRoundingMode() behavior to stay in spec"

* commit '5c3502f3d13ef2bebdeba86b9d7839ad834ce583':
Change DecimalFormat.setRoundingMode() behavior to stay in spec
08a7d35341be3983ccdfc805986dfd72f4d0759f 22-Apr-2014 Elliott Hughes <enh@google.com> am 2f727a24: am 2704e87d: Merge "Allow empty rules in a RuleBasedCollator."

* commit '2f727a24d92062997e71f1067b2d4ad589c4e58c':
Allow empty rules in a RuleBasedCollator.
f62affecd53a2caef7b5ef39d7cd7d60d6ac8874 22-Apr-2014 Elliott Hughes <enh@google.com> am 3df173cd: am 5d51965a: Merge "Update collation tests for icu4c 53."

* commit '3df173cd6c2e73219c754dbb80be5a362f2e8f54':
Update collation tests for icu4c 53.
0d18ebc5a68d096ce2aa5b5af09bb38453007d7c 22-Apr-2014 Neil Fuller <nfuller@google.com> Merge "Change DecimalFormat.setRoundingMode() behavior to stay in spec"
3e3ea7374ec174050c91066bf2e3b154bffd4e96 22-Apr-2014 Elliott Hughes <enh@google.com> Allow empty rules in a RuleBasedCollator.

This is allowed by the CLDR specification, and we were already allowing
most forms of empty rules, just not the zero-length string.

Change-Id: I3c2a020aac23e54f8044defbfe2e2a5b600e454c
rg/apache/harmony/tests/java/text/RuleBasedCollatorTest.java
55dfcd8b9609f112b0542af6a705080d98e00d2a 18-Apr-2014 ccornelius <ccornelius@google.com> Update collation tests for icu4c 53.

As of ICU 53, rule strings must begin with a reset '&'.
http://www.unicode.org/reports/tr35/tr35-35/tr35-collation.html#Rules

Also, fewer collation elements exist in ICU 53 because ae-ligature maps to
two rather than three logical collation elements. Now the last one
yields only one CollationElementIterator value rather than two.

Finally, it's no longer possible to switch from forward to backward iteration
without calling reset/setOffset/setText. This used to be undefined behavior
but is now checked.

Change-Id: I663a2b229e551cd6f5753ddae0660f813dbbf866
rg/apache/harmony/tests/java/text/CollationElementIteratorTest.java
rg/apache/harmony/tests/java/text/CollatorTest.java
rg/apache/harmony/tests/java/text/RuleBasedCollatorTest.java
feef8785d9326f83527a945279e3af278996d489 16-Apr-2014 Neil Fuller <nfuller@google.com> am a435c8d3: am 8f32b988: Merge "Fix broken CTS test"

* commit 'a435c8d3869592ea86c7ecf73e273e1c4ff0e047':
Fix broken CTS test
2a025c1955e9fccac12587c019f3ae82ff5505c3 15-Apr-2014 Neil Fuller <nfuller@google.com> Fix broken CTS test

The fix is in test_isJavaIdentifierPartC() and reverses
the assertion for Character.isJavaIdentifierPart('\u200b')
from false to true. The test method below it
(isIdentifierPart(int)) was already asserting this and
the behavior has been confirmed against the RI.

Other changes made:

Uncommented some assertions that now pass, removed unnecessary /
incorrect comments, added missing braces, some reformatting to 100
chars to improve readability, removed empty lines at the beginning of
methods . Converted all assertTrue(msg, !condition); to
assertFalse(msg, condition).

Change-Id: I0a339df3cd594252a13083e4d4319260ce43fa5d
Bug: 13748395
rg/apache/harmony/tests/java/lang/CharacterTest.java
c96651d01dc87a20aa718d60feaff6611451852e 09-Apr-2014 Neil Fuller <nfuller@google.com> Change DecimalFormat.setRoundingMode() behavior to stay in spec

The serialization tests revealed that some DecimalFormat instances
could not be round-tripped. The reason is that the setRoundingMode()
method was setting a non-zero rounding increment, which cannot
be persisted, and also creates patterns that are outside of the
DecimalFormat spec.

Addressed the fact that ICU4C appears to support
RoundingMode.UNNECESSARY now by deleting special-case code.

Changed SerializationStressTest to use canonical DecimalFormat
patterns:

The ones chosen had a couple things that were not ideal:
1) Putting '-' in quotes causes ICU (for non-obvious reasons)
treat the negative pattern prefix as not being default. Default
in this case means "the positive prefix with a preceding '-'.
Removing the quotes meant it would recognize the pattern as
not needing everything after ;., so the pattern would be shrunk.
2) The positive pattern was also not one ICU could deal with
fully. ICU changed "#.#" to "#0.#" at parse time (which can be
corrected with a setMinimumIntegerDigits(0)). It's not clear why
ICU cannot deal with parsing "#.#" when it can produce it, but
there is a long comment in decimfmt.cc suggesting it is
intentional and to avoid format producing empty strings.

The pattern has been changed to one that ICU can handle and would
choose when the various serialized fields are read back. This is
necessary because NativeDecimalFormat compares the patterns and
not just the serialized fields. Leaving the pattern check part of
equals() means that two non-spec patterns will not be considered
equal(), which is important while Android allows non-spec patterns.
Restricting support in DecimalFormat to the documented subset of
characters is not worth the effort and may cause problems
elsewhere.

Change-Id: I2de588458b86619733c0dc1692d526f179059910
Bug: 11668227
rg/apache/harmony/tests/java/io/SerializationStressTest.java
19745ce89add193c0e13c18979a3c9fb25bee475 18-Feb-2014 Narayan Kamath <narayan@google.com> DO NOT MERGE Fix another set of file related tests.

- Get rid of Support_PlatformFile, use File.createTempFile
instead.
- Replace numerous uses of "user.dir" / "user.home" etc. with
File.createTempFile
- Replace calls to Process / chmod with Libcore.os.chmod. The
calls wouldn't have worked anyway, since chmod on android
doesn't understand the incremental (+w, -x) syntax.

(cherry picked from commit 2b7c83942a5e28c53698232182193d5118028e6c)

Bug: 13763685
Bug: 13763900

Change-Id: Ic6944568bbee6a548da6dcb4364b882636f2959f
rg/apache/harmony/tests/java/io/BufferedInputStreamTest.java
rg/apache/harmony/tests/java/io/FileDescriptorTest.java
rg/apache/harmony/tests/java/io/FileInputStreamTest.java
rg/apache/harmony/tests/java/io/FileOutputStreamTest.java
rg/apache/harmony/tests/java/io/FileReaderTest.java
rg/apache/harmony/tests/java/io/FileTest.java
rg/apache/harmony/tests/java/io/FileWriterTest.java
rg/apache/harmony/tests/java/io/FilterInputStreamTest.java
rg/apache/harmony/tests/java/io/SyncFailedExceptionTest.java
rg/apache/harmony/tests/java/net/JarURLConnectionTest.java
rg/apache/harmony/tests/java/util/jar/JarFileTest.java
rg/apache/harmony/tests/java/util/zip/ZipFileTest.java
85e8e4c142e5299fccbe2b9b6f844290ff39c4d2 17-Feb-2014 Narayan Kamath <narayan@google.com> DO NOT MERGE Fix PropertiesTest.

A test case was using HashTable.get instead of
Properties.getProperty.

The problem is that Properties.propertyNames will
enumerate all properties from the object as well as
from the "default" Properties object it was constructed
with. The get method derived from HashTable isn't
aware of default properties though, so it will fail.

Using composition instead of inheritance would've
resulted in a cleaner design.

(cherry picked from commit 79395265fdd07388849b16695c437583415b7a6b)

Bug: 13763685
Bug: 13763900

Change-Id: I58323767e6872ed1722167d2a4a6d89a98d26ec7
rg/apache/harmony/tests/java/util/PropertiesTest.java
4fea514ce0a4ed4cfd73457e46e144f9bda408c9 04-Apr-2014 Neil Fuller <nfuller@google.com> DO NOT MERGE Fix for ClassLoaderTest under CTS

The tests could not work given the arrangement of classloaders
in Android apps. This also fixes a known failure case in
ClassLoaderTest which was due to missing resources. Also updated
ClassTest.

(cherry picked from commit 63291dd98b3df687d87c7a95b8813e1cd75f3715)

Change-Id: I114aa9b1a177911aed0aef87819d93a260f0b8d1
Bug: 12491655
rg/apache/harmony/tests/java/lang/ClassLoaderTest.java
rg/apache/harmony/tests/java/lang/ClassTest.java
ff4d3dc9ffc14e71bd5918f0492f6182a3752609 04-Apr-2014 Neil Fuller <nfuller@google.com> DO NOT MERGE Fix broken CTS HttpCookie test

Added some test cases and corrected the test to conform
to the RI behavior.

(cherry picked from commit 154d3fb470158aa01cae000781d0d65cf4c186dd)

Change-Id: Ib32baf2e923c50fca1a5a4cb7cbd7f55ed70e760
Bug: 13748507
rg/apache/harmony/tests/java/net/HttpCookieTest.java
56e6f2c92902dcf0c562972f4472224dad4558b6 07-Apr-2014 Neil Fuller <nfuller@google.com> am 1e527edc: am 86d9e253: Merge "Fix for ClassLoaderTest under CTS"

* commit '1e527edc0c3e9483104a76f4917aafc379d5b5c6':
Fix for ClassLoaderTest under CTS
bb99ef0166c208b2a40008062f35d767a5a20f19 07-Apr-2014 Neil Fuller <nfuller@google.com> am e05b49cc: am 23bdc757: Merge "Fix broken CTS HttpCookie test"

* commit 'e05b49cc2e55d4e23135a69f199b5fb09d94c4f5':
Fix broken CTS HttpCookie test
86d9e253247b530a5f234a2210450ae34ec408fb 07-Apr-2014 Neil Fuller <nfuller@google.com> Merge "Fix for ClassLoaderTest under CTS"
63291dd98b3df687d87c7a95b8813e1cd75f3715 04-Apr-2014 Neil Fuller <nfuller@google.com> Fix for ClassLoaderTest under CTS

The tests could not work given the arrangement of classloaders
in Android apps. This also fixes a known failure case in
ClassLoaderTest which was due to missing resources. Also updated
ClassTest.

Change-Id: I114aa9b1a177911aed0aef87819d93a260f0b8d1
Bug: 12491655
rg/apache/harmony/tests/java/lang/ClassLoaderTest.java
rg/apache/harmony/tests/java/lang/ClassTest.java
154d3fb470158aa01cae000781d0d65cf4c186dd 04-Apr-2014 Neil Fuller <nfuller@google.com> Fix broken CTS HttpCookie test

Added some test cases and corrected the test to conform
to the RI behavior.

Change-Id: Ib32baf2e923c50fca1a5a4cb7cbd7f55ed70e760
Bug: 13748507
rg/apache/harmony/tests/java/net/HttpCookieTest.java
d5556772acc27e45b5060544ffdbd96099817394 21-Mar-2014 Narayan Kamath <narayan@google.com> am 9079159a: am eb5a9394: Merge "Fix test failures due to the ICU-52 update."

* commit '9079159a43b4a39126ae709c7abf327a86a6501b':
Fix test failures due to the ICU-52 update.
60a27a2be820124baa3bac417ac6828ede3d1bd8 20-Mar-2014 Narayan Kamath <narayan@google.com> Fix test failures due to the ICU-52 update.

Some of the failures were due to the fact that we stopped
parsing numbers like "36-" for RTL locales, and others were
due to the fact that we were using reference equality for
comparing minusSign.

Change-Id: I239e6b8b77165a4665c554e46e6fb652beec2ec2
rg/apache/harmony/tests/java/text/NumberFormatTest.java
rg/apache/harmony/tests/java/util/LocaleTest.java
rg/apache/harmony/tests/java/util/ScannerTest.java
7abd45639f239e1bb84cc00da45a6dda9da11500 11-Mar-2014 Brett Chabot <brettchabot@google.com> Merge "Deprecate use of BrokenTest and SideEffect"
883084f7eac26f1fdd79858c8bd2e68600011b0b 10-Mar-2014 Neil Fuller <nfuller@google.com> Merge "Add 1.7 methods to HttpCookie."
6a6b612286976cc185c898803fe51e4e062bd9eb 27-Feb-2014 Brett Chabot <brettchabot@google.com> Deprecate use of BrokenTest and SideEffect

Use expectations files instead.

Bug: 12924356

Change-Id: I0ea7917384adf7849404b6da5b7704e6f0c0c1c7
rg/apache/harmony/tests/java/lang/ProcessManagerTest.java
rg/apache/harmony/tests/java/lang/ref/SoftReferenceTest.java
rg/apache/harmony/tests/java/lang/reflect/GenericSignatureFormatErrorTest.java
rg/apache/harmony/tests/javax/security/cert/X509CertificateTest.java
3bb69fa0b8fe5119c3f19cd7f5d725118aa506af 07-Mar-2014 Neil Fuller <nfuller@google.com> Add 1.7 methods to HttpCookie.

Adding isHttpOnly() and setHttpOnly(). Added more
documentation around the specifications supported since
the HttpOnly attribute was added by RFC 6265. Improved
documentation around toString() because I found the method
confusing, plus RFC 6265 goes back to a simpler format
than the RFC it obsoletes meaning callers should use
version 0 not version 1.

Change-Id: Ie52ea80dc5bd7d1575fcaccde70976ed29729817
rg/apache/harmony/tests/java/net/HttpCookieTest.java
b8d16154cf66c619a24449040d4576b61098e7fb 13-Feb-2014 Narayan Kamath <narayan@google.com> Tidy up Console, fix ConsoleTest

- Use a more specific exception type. The use of
IOException led me to believe that the constructor
was performing i/o ops on the underlying file
descriptors. (They were not.)

- Delete a test that asserted that System.console() was
always non-null. It will be non-null only for command
line apps (tests run from vogar), and not for
"regular" android apps (tests run from CTS) because
stdin / stdout will not be TTY devices regular apps.

bug: 12490236

(cherry-picked from 7fbd82c654d1ad2348769b9340a1181abfa98fe9)

Change-Id: I8c1e37bcb21de5862dc8ea198852995a020437a7
rg/apache/harmony/tests/java/io/ConsoleTest.java
df29508a7aa622f265aaebdc472eb7d679185ebb 30-Jan-2014 Neil Fuller <nfuller@google.com> Implementation of MulticastChannel.

Note: ProtocolFamily / StandardProtocolFamily /
DatagramChannel.open(ProtocolFamily) have not been
implemented.

There is a related change to libnativehelper that
must be merged at the same time to avoid
build breakage. See
https://android-review.googlesource.com/#/c/81371/

Bug: 12464155
Change-Id: I07fc049b429a2d373e9bd7b07149632f5cd69f9d
rg/apache/harmony/tests/java/net/MulticastSocketTest.java
ef164bf196538c04f499dcbb49a389c70ff5601a 26-Feb-2014 Paul Duffin <paulduffin@google.com> Improve error message when attempting to open an empty zip

The bug report states that the behaviour of ZipFile has changed between 4.3 and
4.4 when opening an empty zip file. I did some investigation and it appears as
though the reference implementation also throws an exception in that case so I
decided that 4.4 is working as designed. However, to make it clearer I made a
minor change to explicitly check for an empty zip file so that we can report a
slightly improved message explaining that they are not supported. I added a
test for various forms of empty streams and zip files and removed part of an
older test from harmony tests as it is no longer necessary.

Bug: https://code.google.com/p/android/issues/detail?id=65380
Change-Id: I1f2fcbf6bbaedb7dbccf8dd4f1cec4e330274524
rg/apache/harmony/tests/java/util/zip/ZipOutputStreamTest.java
e10c61bb13373b95ba857cc3af60f94b9941ab9e 19-Feb-2014 Narayan Kamath <narayan@google.com> Fix remaining file related CTS Test failures.

Most failures were because tests were trying to
open files relative to the current working directory,
instead of in a temp directory.

FileTest was failing because it didn't construct
paths correctly. It would add an additional separator
char even if the path already ended with one.

Change-Id: Ie90aed84f81275924558e9dba43d71748dbb4076
rg/apache/harmony/tests/java/io/FileOutputStreamTest.java
rg/apache/harmony/tests/java/io/FileTest.java
rg/apache/harmony/tests/java/util/zip/CheckedInputStreamTest.java
rg/apache/harmony/tests/java/util/zip/CheckedOutputStreamTest.java
rg/apache/harmony/tests/java/util/zip/DeflaterOutputStreamTest.java
rg/apache/harmony/tests/java/util/zip/GZIPOutputStreamTest.java
rg/apache/harmony/tests/java/util/zip/ZipEntryTest.java
rg/apache/harmony/tests/java/util/zip/ZipFileTest.java
2587ef91ba693d73e97704e8163c050b286e7330 14-Feb-2014 Neil Fuller <nfuller@google.com> Addition of 1.7 methods to URLConnection.

URLConnection.getHeaderLong() and
URLConnection.getContentLengthLong().
These methods are required by okhttp.

Changed JarURLConnectionImpl.getContentLength() to return -1
when the size of an entry cannot be represented as an int.
Previously it would have returned a corrupted, possibly
negative, value due to a cast.

Changed FileURLConnection.getContentLength() to return -1
when the size of the file cannot be represented as an int.
Previously it would have returned a corrupted, possibly
negative, value due to a cast.

Change-Id: Ib43e68a2536c2602b4c7ee0cda68fa1f90045f57
rg/apache/harmony/tests/internal/net/www/protocol/file/FileURLConnectionTest.java
5a95445260e22dcca730b582c881cc67b8de640e 19-Feb-2014 Narayan Kamath <narayan@google.com> Merge "Fix another set of file related tests."
2b7c83942a5e28c53698232182193d5118028e6c 18-Feb-2014 Narayan Kamath <narayan@google.com> Fix another set of file related tests.

- Get rid of Support_PlatformFile, use File.createTempFile
instead.
- Replace numerous uses of "user.dir" / "user.home" etc. with
File.createTempFile
- Replace calls to Process / chmod with Libcore.os.chmod. The
calls wouldn't have worked anyway, since chmod on android
doesn't understand the incremental (+w, -x) syntax.

Change-Id: Ic6944568bbee6a548da6dcb4364b882636f2959f
rg/apache/harmony/tests/java/io/BufferedInputStreamTest.java
rg/apache/harmony/tests/java/io/FileDescriptorTest.java
rg/apache/harmony/tests/java/io/FileInputStreamTest.java
rg/apache/harmony/tests/java/io/FileOutputStreamTest.java
rg/apache/harmony/tests/java/io/FileReaderTest.java
rg/apache/harmony/tests/java/io/FileTest.java
rg/apache/harmony/tests/java/io/FileWriterTest.java
rg/apache/harmony/tests/java/io/FilterInputStreamTest.java
rg/apache/harmony/tests/java/io/SyncFailedExceptionTest.java
rg/apache/harmony/tests/java/net/JarURLConnectionTest.java
rg/apache/harmony/tests/java/util/jar/JarFileTest.java
rg/apache/harmony/tests/java/util/zip/ZipFileTest.java
79395265fdd07388849b16695c437583415b7a6b 17-Feb-2014 Narayan Kamath <narayan@google.com> Fix PropertiesTest.

A test case was using HashTable.get instead of
Properties.getProperty.

The problem is that Properties.propertyNames will
enumerate all properties from the object as well as
from the "default" Properties object it was constructed
with. The get method derived from HashTable isn't
aware of default properties though, so it will fail.

Using composition instead of inheritance would've
resulted in a cleaner design.

Change-Id: I58323767e6872ed1722167d2a4a6d89a98d26ec7
rg/apache/harmony/tests/java/util/PropertiesTest.java
71eec8821710d08047ac1bff44fa5b5362ae39cb 14-Feb-2014 Narayan Kamath <narayan@google.com> Merge "Tidy up Console, fix ConsoleTest"
d035213a8ddc7bff77a76a0bd6437305e2887f09 14-Feb-2014 Narayan Kamath <narayan@google.com> Merge "Fix GregorianCalendarTest#test_addII."
1326a80ee854ad7df3ac183874734e418194572c 13-Feb-2014 Narayan Kamath <narayan@google.com> Fix GregorianCalendarTest#test_addII.

We're going through the trouble of accounting for
DST changes in GregorianCalendar.add(int, int) (as per
the spec), so adjust our tests to agree.

bug: 12778197
Change-Id: Ie98cc11c2a2f7f6d9c7be8d725960552309f4f5d
rg/apache/harmony/tests/java/util/GregorianCalendarTest.java
ce54057889055ab8c4cb45c51df0ca9ee09ebb43 13-Feb-2014 Narayan Kamath <narayan@google.com> Partially fix GregorianCalendarTest.

ICU4C data (see icu4c/data/misc/supplementalData.txt)
as well as the RI agree that the minimum number of days
in the first week of the year should be 1 in canada.

(I'm not a 100% convinced that this is correct, the
canadian standards board claims to have implemented
ISO 8601, which requires a 4 day minimum. However, that
site links to several documents such as CSA Z234.5 that
are not publicly accessible).

Change-Id: I1d62c7f94d5f059b6ba2ad60bcf8434cdea0d9ce
rg/apache/harmony/tests/java/util/GregorianCalendarTest.java
7fbd82c654d1ad2348769b9340a1181abfa98fe9 13-Feb-2014 Narayan Kamath <narayan@google.com> Tidy up Console, fix ConsoleTest

- Use a more specific exception type. The use of
IOException led me to believe that the constructor
was performing i/o ops on the underlying file
descriptors. (They were not.)

- Delete a test that asserted that System.console() was
always non-null. It will be non-null only for command
line apps (tests run from vogar), and not for
"regular" android apps (tests run from CTS) because
stdin / stdout will not be TTY devices regular apps.

bug: 12490236
Change-Id: I8c1e37bcb21de5862dc8ea198852995a020437a7
rg/apache/harmony/tests/java/io/ConsoleTest.java
47ae0b5a1d96c8030e0963ccc5b44c3ee66aaec3 20-Jan-2014 Neil Fuller <nfuller@google.com> Implementing bind() and getLocalAddress() for NIO2.

This change introduces NetworkChannel, but only bind() and
getLocalAddress() methods. To avoid breaking existing Android
applications that extend ServerSocketChannel, DatagramChannel and
SocketChannel the methods have been added with concrete
implementations that throw exceptions rather than leaving them
abstract.

In channel tests, usages of channel.socket().bind() and
channel.socket().getLocalSocketAddress() have been changed to
channel.bind() and channel.getLocalAddress(), since the behavior is
close enough and the tests should be written against the channel APIs
as much as possible. Tests have been added for new methods.

Removed further overriding in
DatagramChannelImpl.DatagramSocketAdapter and
SocketChannelImpl.SocketAdapter which revealed some bugs and lack of
clarity in the docs for the socket methods:

Improved the documentation for DatagramSocket.getLocalAddress(),
DatagramSocket.getLocalSocketAddress(),
ServerSocket.getInetAddress(), ServerSocket.getLocalPort(),
ServerSocket.getLocalSocketAddress(), Socket.getLocalAddress(),
Socket.getLocalPort(), Socket.getLocalSocketAddress(). These methods
treat special cases differently.

Fixed a bug in DatagramSocket.getLocalSocketAddress() where it would
incorrect throw an exception if the socket has been closed, which
contradicts the (updated) documentation and the RI. It now returns
null. Added tests.

Fixed a bug in Socket.close(): a closed socket would still report as
being connected. Added tests.

Fixed a bug in Socket.startupSocket() - the socket was recording it
was being bound, but was not updating the cached local address. This
method is called during ServerSocketChannel.accept() and would cause
the socket to report its local address as being the wildcard address,
when it is not. Added a test.

Change-Id: Ibec8527e1c72597e268d23e6c1f03eb16e46cdc4
Bug: 12464155
rg/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java
rg/apache/harmony/tests/java/nio/channels/ServerSocketChannelTest.java
rg/apache/harmony/tests/java/nio/channels/SocketChannelTest.java
5bdb797e4f545c6b16f44523cdab2500460f290d 30-Jan-2014 Neil Fuller <nfuller@google.com> Merge "Refactoring in preparation for NIO2 changes."
933fbbf606268eec9fc430632b8bca7002a833b3 14-Jan-2014 Neil Fuller <nfuller@google.com> Refactoring in preparation for NIO2 changes.

Making the various Socket/Channel classes more consistent with each
other for synchronizing state between the Channel, Socket and the OS.
This is in preparation for NetworkChannel.bind().
Synchronizing state revealed a test that relied upon a Socket from a
channel not reporting isConnected() properly after a connect(). Tests
have been updated.

Reading the local address back from the OS revealed that Android is
using IPv6 and reports the string equivalent of IPv4's 0.0.0.0 as
"::". Updated a test that was relying on the string form.

Calling connect() twice on a DatagramSocket appears inconsistent with
itself and Channel and other Sockets. A pure DatagramSocket switches
over to the new remote address. I have changed the Channel-backed
DatagramSocket to throw an IllegalStateException exception, and have
created a bug to discuss making the calls more consistent.

Socket has been modified to avoid using the address field to store
the local address after a bind(). This field is documented as holding
the remote address, not the local.

Changed implementation of SocketChannelImpl.socket().getInputStream()
and SocketChannelImpl.socket().getOutputStream() to use the one that
is implemented by Socket and not a custom NIO-based implementation.
The use of NIO provided two parallel implementations for the same
thing. This change alters behavior when attempting to read zero bytes
and when a Channel is in non-blocking mode: now it throws
IllegalBlockingModeException rather than
ArrayIndexOutOfBoundsException. The tests have been updated.

Various tidying up changes to introduce @Override, remove
unnecessarily initialized local variables, fields, semi-colons,
javadocs and imports. Added close() calls for objects during tests
that were cluttering the logs.

Modified IoBridge.connect() to be void. Adjusted SocketChannelImpl
accordingly and tidied up impossible cases. Modified
SocketChannel.connect() so that it always returns false in
non-blocking mode. This looks like an existing bug:
it would previously have returned true, even though the connection
was potentially still pending. Tests have been added.

Also tidied up SocketChannelImpl.finishConnect() - it was potentially
resetting the isBound state.

Change-Id: Ic7943615b4b763f77e74397e0e91a62edc7d7017
bug: 12464155
rg/apache/harmony/tests/java/net/ServerSocketTest.java
rg/apache/harmony/tests/java/net/SocketTest.java
rg/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java
rg/apache/harmony/tests/java/nio/channels/MockDatagramChannel.java
rg/apache/harmony/tests/java/nio/channels/MockServerSocketChannel.java
rg/apache/harmony/tests/java/nio/channels/MockSocketChannel.java
rg/apache/harmony/tests/java/nio/channels/SocketChannelTest.java
3cc0bda1e2573caf5cfafaaef08eb6b5beba5c0a 22-Jan-2014 Narayan Kamath <narayan@google.com> Fix ComputeSerialVersionUIDTest.

The old golden files were referring to the wrong class,
and contained serial version UIDs that didn't match those
generated by any version of android (or the RI).

This change deletes the golden files and switches to
direct assertions in the test. All tests pass on
aosp-master, v4.xx of android and the RI.

bug: 12490445

Change-Id: Ia65b6d65bc9a3d4cbc62a7a0f7bdfc004e7315e2
rg/apache/harmony/tests/java/io/ComputeSerialVersionUIDTest.java
rg/apache/harmony/tests/java/io/SerializationTestClass.java
b2dc38f35ead619dd01d53dafee018266301bff5 21-Jan-2014 Paul Duffin <paulduffin@google.com> Fixed broken EnumTest

A previous file move changed the class name for various classes used
in the EnumTest. That broke the tests as they relied on files
containing serialized forms of those classes and so had hard coded
references to the old class names which no longer existed. The fix
was two part:

- Use the correct class names in the serialized files
- Remove duplicate serialized files that are no longer used

Bug: 12491225

Change-Id: I60b503bb2509071ccac5fec7b05dd5160d9dd7d0
rg/apache/harmony/tests/java/lang/EnumTest.java
155ee0c0ba582c28487cd5c3964ff8645478c628 13-Jan-2014 Kenny Root <kroot@google.com> Fix encodings in X500PrincipalTest

As said in AttributeValue, DC and emailAddress should be encoded in
IA5String as specified by RFC5280.

Also the canonical encoding of a T61String could be PrintableString when
the string is only 'A' according to b/2102191 but this could be a
mistake.

Consecutive spaces and leading and trailing runs of spaces should be
escaped for RFC 1779.

Also the RFC 2259 doesn't specify anything other than the beginning or
end spaces, but the RI escapes the beginning and ending runs of spaces.

Bug: 12490346
Bug: 12490876
Change-Id: I6591156ba0a27a894241b039570488f89c885242
rg/apache/harmony/tests/javax/security/auth/x500/X500PrincipalTest.java
7f46d8400a45ff2fc08e06b7fc8ea0db5e3f7e5a 14-Jan-2014 Narayan Kamath <narayan@google.com> Merge "Fix SerializationStressTest1#test_18_33_writeObject"
67b29d93704633ca6f9714e4d0a694afbf557f83 14-Jan-2014 Neil Fuller <nfuller@google.com> Fix SerializationStressTest1#test_18_33_writeObject

Since commit 086002299f96dbbec18a061e812dc1cb79cb1f10
ObjectOutputStream.writeObject() no longer throws StreamCorruptedException when
encountering an IOException during serialization. It now throws the actual
IOException.

bug: 6447733
Change-Id: I2b4add330cbb67d6d1db159940cb2e1fe2216bcc
rg/apache/harmony/tests/java/io/SerializationStressTest1.java
b52bc3ea9e79642c275ea6d9ac2342b5746e55c9 13-Jan-2014 Alex Klyubin <klyubin@google.com> Fix test breakage in Harmony SSLSessionTest.

The breakage was caused by the SSLSessionTest assuming that TLS/SSL
connections by default handshake to the SSL_RSA_WITH_RC4_128_MD5 cipher suite.

Bug: 11220570
Change-Id: Ib1ac44f83c968ec3dc7432339e1fc0f64d63733f
rg/apache/harmony/tests/javax/net/ssl/SSLSessionTest.java
82c642531ba3c9ad29cb3125f7547a226b661b11 02-Jan-2014 Narayan Kamath <narayan@google.com> Delete Support_PortManager & OldDatagramSocketTest

Support_PortManager didn't really work, so rewrite all tests
that use it.

Also, dedup OldDatagramSocketTest with the harmony DatagramSocketTest.

Fix various broken test cases and terribly written tests.

bug: 11689863

Change-Id: I4efb9e02eb88517273fff50a0dec1d0262feafb2
rg/apache/harmony/tests/java/net/AuthenticatorTest.java
rg/apache/harmony/tests/java/net/ConnectExceptionTest.java
rg/apache/harmony/tests/java/net/DatagramSocketTest.java
rg/apache/harmony/tests/java/net/MulticastSocketTest.java
rg/apache/harmony/tests/java/nio/channels/ChannelsTest.java
rg/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java
rg/apache/harmony/tests/java/nio/channels/SelectionKeyTest.java
rg/apache/harmony/tests/java/nio/channels/ServerSocketChannelTest.java
rg/apache/harmony/tests/java/nio/channels/SocketChannelTest.java
9de94e4aaa6de951d1c7ca08d137d57b36d24fa3 19-Dec-2013 Alex Klyubin <klyubin@google.com> Fix test breakages due to TLSv1.2 enabled and FS preferred.

Bug: 11220570
Change-Id: Ic918e806ae1d8ea9b98c690cfabd9c3245886525
rg/apache/harmony/tests/javax/net/ssl/SSLSessionTest.java
108a6c5cbecfea0bb2ea15e522b4e5474c4f81bd 19-Dec-2013 Narayan Kamath <narayan@google.com> Fix broken test cases in DeflaterTest & InflaterTest

We explicitly disallow setLevel or setStrategy after
setInput. (It's clearly documented in the method docs).
Presumably, this is to prevent users from shooting
themselves in the foot & causing issues by changing
the strategy / level after we've started deflating.

Change-Id: Ifd65728ff0ec7e47aeec716aeb6f44242573c491
rg/apache/harmony/tests/java/util/zip/DeflaterTest.java
rg/apache/harmony/tests/java/util/zip/InflaterTest.java
99b471492b5e0910653f115094d77d633bd340ec 19-Dec-2013 Narayan Kamath <narayan@google.com> Fix broken assumption in a unit test.

Change-Id: I15c25ff373b1ca4acb5e530f75d028b971779549
rg/apache/harmony/tests/java/util/zip/GZIPOutputStreamTest.java
ab646c8866f5bf4bfaeb811c7dce434e130eb44e 19-Dec-2013 Narayan Kamath <narayan@google.com> Fix a brain dead mistake in DeflaterInputStreamTest.

Removal of debug code gone bad.

Change-Id: I93d9decbd9d733cbeccd7832fef6857cf1b41b25
rg/apache/harmony/tests/java/util/zip/DeflaterInputStreamTest.java
14dade3dfbf9933fd179af0d5f1f87ae6f608418 17-Dec-2013 Narayan Kamath <narayan@google.com> Make DeflaterInputStream#available more consistent.

- We now guarantee that available() returns 0 iff.
deflater.finished() == true. Note that this is still
inconsistent with the specification of InputStream#available.

- Remove an unnecessary array copy in DeflaterInputStream#read.

- Remove tests that expect an IllegalArgumentException for
negative skip count values. The InputStream spec doesn't mandate
that we must throw here, and it's better to be consistent with
every othem InputStream specialization in the code.

- Remove obsolete failures from brokentests.txt.

bug: 12189307

Change-Id: Ie9b1ad5d7c050b005b5f6f44a5a283bfdaeb1e81
rg/apache/harmony/tests/java/util/zip/DeflaterInputStreamTest.java
939d2d74a21edd7f6ffa06645d8a50dde16463ca 17-Dec-2013 Narayan Kamath <narayan@google.com> Throw an NPE in a more obvious manner.

Also remove tests with broken expectations that were never
implemented.

Change-Id: I5eb60d3e6dfb8ead6e23941fca1bc19f79c4a158
rg/apache/harmony/tests/java/util/jar/AttributesTest.java
d567f9025c4b94fc5e9b47f5702c1b48c2a45c96 17-Dec-2013 Narayan Kamath <narayan@google.com> Move tests from harmony/archive to libcore.

Also moves a couple of tests from luni/src/test to
harmony-tests/ where they belong.

Change-Id: I0b441b1fcbd355bd3c66551d16732a671fb64f54
rg/apache/harmony/tests/java/util/jar/AttributesNameTest.java
rg/apache/harmony/tests/java/util/jar/AttributesTest.java
rg/apache/harmony/tests/java/util/jar/JarEntryTest.java
rg/apache/harmony/tests/java/util/jar/JarExceptionTest.java
rg/apache/harmony/tests/java/util/jar/JarFileTest.java
rg/apache/harmony/tests/java/util/jar/JarInputStreamTest.java
rg/apache/harmony/tests/java/util/jar/JarOutputStreamTest.java
rg/apache/harmony/tests/java/util/jar/ManifestTest.java
rg/apache/harmony/tests/java/util/zip/Adler32Test.java
rg/apache/harmony/tests/java/util/zip/CRC32Test.java
rg/apache/harmony/tests/java/util/zip/CheckedInputStreamTest.java
rg/apache/harmony/tests/java/util/zip/CheckedOutputStreamTest.java
rg/apache/harmony/tests/java/util/zip/DeflaterInputStreamTest.java
rg/apache/harmony/tests/java/util/zip/DeflaterOutputStreamTest.java
rg/apache/harmony/tests/java/util/zip/DeflaterTest.java
rg/apache/harmony/tests/java/util/zip/GZIPInputStreamTest.java
rg/apache/harmony/tests/java/util/zip/GZIPOutputStreamTest.java
rg/apache/harmony/tests/java/util/zip/InflaterInputStreamTest.java
rg/apache/harmony/tests/java/util/zip/InflaterOutputStreamTest.java
rg/apache/harmony/tests/java/util/zip/InflaterTest.java
rg/apache/harmony/tests/java/util/zip/ZipEntryTest.java
rg/apache/harmony/tests/java/util/zip/ZipErrorTest.java
rg/apache/harmony/tests/java/util/zip/ZipFileTest.java
rg/apache/harmony/tests/java/util/zip/ZipInputStreamTest.java
rg/apache/harmony/tests/java/util/zip/ZipOutputStreamTest.java
857b660ca3f07fe8775a62c9b23992d3ac5c0c7f 12-Dec-2013 Narayan Kamath <narayan@google.com> Address review comment for OutputStreamWriterTest.

A comment was missing the word "the".

Change-Id: I592c998774e7335881f03006c9e28700b048b8db
rg/apache/harmony/tests/java/io/OutputStreamWriterTest.java
5b9ea87a5ac3acd3a4c5209a4c335ce8c6563a12 12-Dec-2013 Narayan Kamath <narayan@google.com> Address review comments.

Automatic IntelliJ reformatting of a weirdly formatted
test.

Change-Id: I9ce29d9004dfe625a8479a77230248db3d1b9e3b
rg/apache/harmony/tests/java/nio/charset/ASCIICharsetEncoderTest.java
91bb19d2ef9822cfb50fd1191cdb3ee06e2939b9 27-Nov-2013 Narayan Kamath <narayan@google.com> Fix a CharsetEncoder bug.

When malformed or unmappable characters span input
buffers, we'd end up setting a negative position on the
buffer.

Also fix up a few test cases which were wrong in
several ways.
- One test was simply checking for the wrong sort
of exception (unmappable vs malformed)
- Another test was expecting encode() to throw an
error (and ignoring flush) but the API allows flush
to throw an error instead of encode.

bug: 10729779

Change-Id: I6560b749ca2445651d61ca651f8a5e388cf1c1b0
rg/apache/harmony/tests/java/nio/charset/ASCIICharsetEncoderTest.java
f25dfbd1b88a63029bcf391600f9d1a30c98be99 27-Nov-2013 Narayan Kamath <narayan@google.com> Fix several issues in CookieManagerTest

- Fix a mistaken assumption about how path matching
works.
- Change a TreeMap to a LinkedHashMap, because TreeMaps
are not required to support null keys.
- Change a bogus "equals" check for the version to a
startsWith check.
- Change various tests re: the size of the output list.
The specification doesn't require us to create separate
Cookie headers for each cookie found in the store. It is
free to concatenate the contents of matching cookies.
- Change tests that expected the addition of an empty list
to the headers map when there are no matching cookies.
The spec does not require this.

bug: 11689102

Change-Id: I341c301f18e410b983d010b5d2f14b3462901bf5
rg/apache/harmony/tests/java/net/CookieManagerTest.java
6efeeab6133ba601dc4bec7f528c8f8e98508573 28-Nov-2013 Narayan Kamath <narayan@google.com> Fix PasswordCallback serialization test.

The object doesn't override equals & hashCode so it needs
a serialization comparator.

Change-Id: Ie6067ad1e6cd22f5e2b83907e5bf2ea0039466cb
rg/apache/harmony/tests/javax/security/auth/callback/PasswordCallbackTest.java
418e036b21553e18575099e1ad7760e4a35c9770 27-Nov-2013 Narayan Kamath <narayan@google.com> Fix an OutputStreamWriterTest test case.

Check for the nio canonical name instead of
the "old" canonical name.

bug: 11665359

Change-Id: Icc813a77cfb7d61ddb0ce33fbdf48ccbe0ded7fb
rg/apache/harmony/tests/java/io/OutputStreamWriterTest.java
5f1d50932b9ce1e21e8588abe3bbd6bad649247a 27-Nov-2013 Narayan Kamath <narayan@google.com> Delete a few bad test cases from CharsetEncoderTest.

These tests were added in commit 5ec6bf8d0 and were
assumed to have been caused by an ICU bug. They were
in fact caused by bugs in our ICU glue code and those
issues have now been fixed.

Change-Id: Ia21a5b466eea685f175fa370d9e2b3b3342cd1b8
rg/apache/harmony/tests/java/nio/charset/CharsetEncoderTest.java
c7f4b4822dfd4c7522a21fbec1c5900c1a9802c4 27-Nov-2013 Narayan Kamath <narayan@google.com> Merge "Fix a testcase in InputStreamReaderTest."
bd024cc687470a008999d96fd3af4a1261413d55 26-Nov-2013 Narayan Kamath <narayan@google.com> Fix several decoder bugs.

- NativeConverter should report unterminated character
sequences to managed code.
- CharsetDecoderIcu should report those errors correctly
from flush()
- InputStreamReader should check the return value of
flush() and not ignore it altogether.

bug: 11665359
bug: 10729779

Change-Id: Ic678a645a4ef2b3fe70e2c900c0cd393679f1037
rg/apache/harmony/tests/java/io/InputStreamReaderTest.java
e0e5a7a0bb9c4412664807c8150e453c611cc4f7 26-Nov-2013 Narayan Kamath <narayan@google.com> Fix a testcase in InputStreamReaderTest.

Fix path to test resource.

bug: 11665359

Change-Id: Id360215499bc20620c096a3f0a4e85970e606c2b
rg/apache/harmony/tests/java/io/InputStreamReaderTest.java
c510d99d32b57cd7d93ca2430b6e6fa3bbe6aa1f 26-Nov-2013 Narayan Kamath <narayan@google.com> Merge "Import missing harmony tests for javax.security.auth."
62542d811e9bc4126ef912bc6e60e1b9952b4e09 25-Nov-2013 Narayan Kamath <narayan@google.com> Import missing harmony tests for javax.security.auth.

Mostly missing serialization tests.

Also
- Fix up package names for tests.
- Move tests under the right subpackage where applicable.

Change-Id: If30995f5b62a1dcc9f0150d2c16e29bb1b65a48c
rg/apache/harmony/tests/javax/security/auth/CallbackHandlerTest.java
rg/apache/harmony/tests/javax/security/auth/DestroyFailedExceptionTest.java
rg/apache/harmony/tests/javax/security/auth/DestroyableTest.java
rg/apache/harmony/tests/javax/security/auth/LoginExceptionTest.java
rg/apache/harmony/tests/javax/security/auth/PasswordCallbackTest.java
rg/apache/harmony/tests/javax/security/auth/SubjectTest.java
rg/apache/harmony/tests/javax/security/auth/UnsupportedCallbackExceptionTest.java
rg/apache/harmony/tests/javax/security/auth/X500PrincipalTest.java
rg/apache/harmony/tests/javax/security/auth/callback/CallbackHandlerTest.java
rg/apache/harmony/tests/javax/security/auth/callback/PasswordCallbackTest.java
rg/apache/harmony/tests/javax/security/auth/callback/UnsupportedCallbackExceptionTest.java
rg/apache/harmony/tests/javax/security/auth/login/LoginExceptionTest.java
rg/apache/harmony/tests/javax/security/auth/x500/X500PrincipalTest.java
c57d3bbeb0059318deb0deb1c173035002fec259 22-Nov-2013 Narayan Kamath <narayan@google.com> am 0af9d85d: am 2e8bdf33: Merge "Make PipedWriter#flush throw if the reader is closed."

* commit '0af9d85d7071ca74b12418595b8c42533007fad5':
Make PipedWriter#flush throw if the reader is closed.
d6aba0dcafb39f47c7dbb5f4849ba404c0a1b06c 22-Nov-2013 Narayan Kamath <narayan@google.com> am 7420e424: am 68cf52ad: Merge "Clean up & fix PipedInputStreamTest."

* commit '7420e4247b897a723c6a04c05e70eebcd556af8d':
Clean up & fix PipedInputStreamTest.
cdba761a5c3e17749cc987f8a3e30a261d021aff 21-Nov-2013 Narayan Kamath <narayan@google.com> am d121f03c: am a79889ac: Merge "Remove bogus test case in TreeSetTest."

* commit 'd121f03c3de5a260444740a185c0afb71e5fb423':
Remove bogus test case in TreeSetTest.
5c4a8db5654fe317b1c059bdaa9699a8d3979858 21-Nov-2013 Narayan Kamath <narayan@google.com> am 93a3a9cc: am a95d8947: Merge "Fix typos in comments."

* commit '93a3a9ccc64094da3771bfa4795967639ef34307':
Fix typos in comments.
0048bf7983e68d6d99b7b1332db8a2239de50949 19-Nov-2013 Narayan Kamath <narayan@google.com> Make PipedWriter#flush throw if the reader is closed.

bug: 11666814
Change-Id: I25dc56f5e50e0cfb14e5781e953115864be612a9
rg/apache/harmony/tests/java/io/PipedWriterTest.java
19509358bac0d311c0eeecc8c12b2cd3d0d635d4 19-Nov-2013 Narayan Kamath <narayan@google.com> Clean up & fix PipedInputStreamTest.

Add additional documentation where necessary.

bug: 11666814
Change-Id: I622d180c89f835e9466c7efe8f6a079c2516b73f
rg/apache/harmony/tests/java/io/PipedInputStreamTest.java
a79889ac5314b45c19074974de349ff93eaa41f1 18-Nov-2013 Narayan Kamath <narayan@google.com> Merge "Remove bogus test case in TreeSetTest."
5b41c432d47966720a17da18f42c84ef6d21258a 18-Nov-2013 Narayan Kamath <narayan@google.com> Fix typos in comments.

Addresses review comments from :

https://android-review.googlesource.com/#/c/70041

Change-Id: Idcb799a24f3ea63fa0fc6702f7c7c55f3a1a9b48
rg/apache/harmony/tests/java/net/CookieStoreTest.java
04f6c3363275a69f7b9020dad710e76b20dfcc20 18-Nov-2013 Narayan Kamath <narayan@google.com> Remove bogus test case in TreeSetTest.

Adding a non-comparable key to the set will
throw an exception.

Change-Id: Ie3474f657c45891671b8fd1e10cea5a75c9179dc
rg/apache/harmony/tests/java/util/TreeSetTest.java
215ff90cb424ad01d4ab203785fdf1256c26c773 15-Nov-2013 Narayan Kamath <narayan@google.com> am cfeab7b3: am 47f7ed46: Merge "Move tests from tests/api to harmony-tests. (Take 2)"

* commit 'cfeab7b3523347cdfa1ce1f7fffc922f2cc0ab65':
Move tests from tests/api to harmony-tests. (Take 2)
ab762bb740405d0fefcccf4a0899a234f995be13 15-Nov-2013 Narayan Kamath <narayan@google.com> Move tests from tests/api to harmony-tests. (Take 2)

This reverts commit d5e281743e55e1daa297fd8043b2d9b6e8e1bed2.

The makefile issue that caused the original build break
has been resolved.
rg/apache/harmony/luni/tests/java/io/BufferedReaderTest.java
rg/apache/harmony/luni/tests/java/util/ScannerParseLargeFileBenchmarkTest.java
rg/apache/harmony/luni/tests/java/util/ScannerTest.java
rg/apache/harmony/luni/tests/java/util/UUIDTest.java
rg/apache/harmony/tests/internal/net/www/protocol/file/FileURLConnectionTest.java
rg/apache/harmony/tests/java/io/BufferedInputStreamTest.java
rg/apache/harmony/tests/java/io/BufferedOutputStreamTest.java
rg/apache/harmony/tests/java/io/BufferedReaderTest.java
rg/apache/harmony/tests/java/io/BufferedWriterTest.java
rg/apache/harmony/tests/java/io/ByteArrayInputStreamTest.java
rg/apache/harmony/tests/java/io/ByteArrayOutputStreamTest.java
rg/apache/harmony/tests/java/io/CharArrayReaderTest.java
rg/apache/harmony/tests/java/io/CharArrayWriterTest.java
rg/apache/harmony/tests/java/io/CharConversionExceptionTest.java
rg/apache/harmony/tests/java/io/ComputeSerialVersionUIDTest.java
rg/apache/harmony/tests/java/io/ConsoleTest.java
rg/apache/harmony/tests/java/io/DataInputStreamTest.java
rg/apache/harmony/tests/java/io/DataOutputStreamTest.java
rg/apache/harmony/tests/java/io/EOFExceptionTest.java
rg/apache/harmony/tests/java/io/FileDescriptorTest.java
rg/apache/harmony/tests/java/io/FileInputStreamTest.java
rg/apache/harmony/tests/java/io/FileNotFoundExceptionTest.java
rg/apache/harmony/tests/java/io/FileOutputStreamTest.java
rg/apache/harmony/tests/java/io/FileReaderTest.java
rg/apache/harmony/tests/java/io/FileTest.java
rg/apache/harmony/tests/java/io/FileWriterTest.java
rg/apache/harmony/tests/java/io/FilterInputStreamTest.java
rg/apache/harmony/tests/java/io/FilterOutputStreamTest.java
rg/apache/harmony/tests/java/io/IOErrorTest.java
rg/apache/harmony/tests/java/io/IOExceptionTest.java
rg/apache/harmony/tests/java/io/InputStreamReaderTest.java
rg/apache/harmony/tests/java/io/InputStreamTest.java
rg/apache/harmony/tests/java/io/InterruptedIOExceptionTest.java
rg/apache/harmony/tests/java/io/InvalidClassExceptionTest.java
rg/apache/harmony/tests/java/io/LineNumberInputStreamTest.java
rg/apache/harmony/tests/java/io/LineNumberReaderTest.java
rg/apache/harmony/tests/java/io/NotActiveExceptionTest.java
rg/apache/harmony/tests/java/io/NotSerializableExceptionTest.java
rg/apache/harmony/tests/java/io/ObjectInputStream2Test.java
rg/apache/harmony/tests/java/io/ObjectOutputStream2Test.java
rg/apache/harmony/tests/java/io/ObjectOutputStreamTest.java
rg/apache/harmony/tests/java/io/ObjectStreamClassTest.java
rg/apache/harmony/tests/java/io/ObjectStreamConstantsTest.java
rg/apache/harmony/tests/java/io/ObjectStreamFieldTest.java
rg/apache/harmony/tests/java/io/OpenRandomFileTest.java
rg/apache/harmony/tests/java/io/OutputStreamTesterTest.java
rg/apache/harmony/tests/java/io/OutputStreamWriterTest.java
rg/apache/harmony/tests/java/io/PipedInputStreamTest.java
rg/apache/harmony/tests/java/io/PipedOutputStreamTest.java
rg/apache/harmony/tests/java/io/PipedReaderTest.java
rg/apache/harmony/tests/java/io/PipedWriterTest.java
rg/apache/harmony/tests/java/io/PrintStreamTest.java
rg/apache/harmony/tests/java/io/PrintWriterTest.java
rg/apache/harmony/tests/java/io/PushbackInputStreamTest.java
rg/apache/harmony/tests/java/io/PushbackReaderTest.java
rg/apache/harmony/tests/java/io/RandomAccessFileTest.java
rg/apache/harmony/tests/java/io/ReaderTest.java
rg/apache/harmony/tests/java/io/SequenceInputStreamTest.java
rg/apache/harmony/tests/java/io/SerializationStressTest.java
rg/apache/harmony/tests/java/io/SerializationStressTest1.java
rg/apache/harmony/tests/java/io/SerializationStressTest2.java
rg/apache/harmony/tests/java/io/SerializationStressTest3.java
rg/apache/harmony/tests/java/io/SerializationStressTest4.java
rg/apache/harmony/tests/java/io/SerializationTestClass.java
rg/apache/harmony/tests/java/io/StreamCorruptedExceptionTest.java
rg/apache/harmony/tests/java/io/StreamTokenizerTest.java
rg/apache/harmony/tests/java/io/StringBufferInputStreamTest.java
rg/apache/harmony/tests/java/io/StringReaderTest.java
rg/apache/harmony/tests/java/io/StringWriterTest.java
rg/apache/harmony/tests/java/io/SyncFailedExceptionTest.java
rg/apache/harmony/tests/java/io/UTFDataFormatExceptionTest.java
rg/apache/harmony/tests/java/io/UnsupportedEncodingExceptionTest.java
rg/apache/harmony/tests/java/io/WriteAbortedExceptionTest.java
rg/apache/harmony/tests/java/io/WriterTest.java
rg/apache/harmony/tests/java/io/WriterTesterTest.java
rg/apache/harmony/tests/java/lang/AbstractMethodErrorTest.java
rg/apache/harmony/tests/java/lang/ArithmeticExceptionTest.java
rg/apache/harmony/tests/java/lang/ArrayIndexOutOfBoundsExceptionTest.java
rg/apache/harmony/tests/java/lang/ArrayStoreExceptionTest.java
rg/apache/harmony/tests/java/lang/AssertionErrorTest.java
rg/apache/harmony/tests/java/lang/BooleanTest.java
rg/apache/harmony/tests/java/lang/ByteTest.java
rg/apache/harmony/tests/java/lang/CharacterImplTest.java
rg/apache/harmony/tests/java/lang/CharacterTest.java
rg/apache/harmony/tests/java/lang/Character_SubsetTest.java
rg/apache/harmony/tests/java/lang/Character_UnicodeBlockTest.java
rg/apache/harmony/tests/java/lang/ClassCastExceptionTest.java
rg/apache/harmony/tests/java/lang/ClassCircularityErrorTest.java
rg/apache/harmony/tests/java/lang/ClassFormatErrorTest.java
rg/apache/harmony/tests/java/lang/ClassLoaderTest.java
rg/apache/harmony/tests/java/lang/ClassNotFoundExceptionTest.java
rg/apache/harmony/tests/java/lang/ClassTest.java
rg/apache/harmony/tests/java/lang/CloneNotSupportedExceptionTest.java
rg/apache/harmony/tests/java/lang/CompilerTest.java
rg/apache/harmony/tests/java/lang/DoubleTest.java
rg/apache/harmony/tests/java/lang/EnumConstantNotPresentExceptionTest.java
rg/apache/harmony/tests/java/lang/EnumTest.java
rg/apache/harmony/tests/java/lang/ErrorTest.java
rg/apache/harmony/tests/java/lang/ExceptionInInitializerErrorTest.java
rg/apache/harmony/tests/java/lang/ExceptionTest.java
rg/apache/harmony/tests/java/lang/FloatTest.java
rg/apache/harmony/tests/java/lang/IllegalAccessErrorTest.java
rg/apache/harmony/tests/java/lang/IllegalAccessExceptionTest.java
rg/apache/harmony/tests/java/lang/IllegalArgumentExceptionTest.java
rg/apache/harmony/tests/java/lang/IllegalMonitorStateExceptionTest.java
rg/apache/harmony/tests/java/lang/IllegalStateExceptionTest.java
rg/apache/harmony/tests/java/lang/IllegalThreadStateExceptionTest.java
rg/apache/harmony/tests/java/lang/IncompatibleClassChangeErrorTest.java
rg/apache/harmony/tests/java/lang/IndexOutOfBoundsExceptionTest.java
rg/apache/harmony/tests/java/lang/InheritableThreadLocalTest.java
rg/apache/harmony/tests/java/lang/InstantiationErrorTest.java
rg/apache/harmony/tests/java/lang/InstantiationExceptionTest.java
rg/apache/harmony/tests/java/lang/IntegerTest.java
rg/apache/harmony/tests/java/lang/InternalErrorTest.java
rg/apache/harmony/tests/java/lang/InterruptedExceptionTest.java
rg/apache/harmony/tests/java/lang/LinkageErrorTest.java
rg/apache/harmony/tests/java/lang/LongTest.java
rg/apache/harmony/tests/java/lang/MathTest.java
rg/apache/harmony/tests/java/lang/MockEnum.java
rg/apache/harmony/tests/java/lang/MockEnum2.java
rg/apache/harmony/tests/java/lang/NegativeArraySizeExceptionTest.java
rg/apache/harmony/tests/java/lang/NoClassDefFoundErrorTest.java
rg/apache/harmony/tests/java/lang/NoSuchFieldErrorTest.java
rg/apache/harmony/tests/java/lang/NoSuchFieldExceptionTest.java
rg/apache/harmony/tests/java/lang/NoSuchMethodErrorTest.java
rg/apache/harmony/tests/java/lang/NoSuchMethodExceptionTest.java
rg/apache/harmony/tests/java/lang/NullPointerExceptionTest.java
rg/apache/harmony/tests/java/lang/NumberFormatExceptionTest.java
rg/apache/harmony/tests/java/lang/NumberTest.java
rg/apache/harmony/tests/java/lang/ObjectTest.java
rg/apache/harmony/tests/java/lang/OutOfMemoryErrorTest.java
rg/apache/harmony/tests/java/lang/Process2Test.java
rg/apache/harmony/tests/java/lang/ProcessBuilderTest.java
rg/apache/harmony/tests/java/lang/ProcessManagerTest.java
rg/apache/harmony/tests/java/lang/ProcessTest.java
rg/apache/harmony/tests/java/lang/RuntimeExceptionTest.java
rg/apache/harmony/tests/java/lang/RuntimeTest.java
rg/apache/harmony/tests/java/lang/SecurityExceptionTest.java
rg/apache/harmony/tests/java/lang/ShortTest.java
rg/apache/harmony/tests/java/lang/StackOverflowErrorTest.java
rg/apache/harmony/tests/java/lang/StrictMathTest.java
rg/apache/harmony/tests/java/lang/String2Test.java
rg/apache/harmony/tests/java/lang/StringBuffer2Test.java
rg/apache/harmony/tests/java/lang/StringBufferTest.java
rg/apache/harmony/tests/java/lang/StringBuilderTest.java
rg/apache/harmony/tests/java/lang/StringIndexOutOfBoundsExceptionTest.java
rg/apache/harmony/tests/java/lang/StringTest.java
rg/apache/harmony/tests/java/lang/SystemTest.java
rg/apache/harmony/tests/java/lang/ThreadDeathTest.java
rg/apache/harmony/tests/java/lang/ThreadGroupTest.java
rg/apache/harmony/tests/java/lang/ThreadLocalTest.java
rg/apache/harmony/tests/java/lang/ThreadTest.java
rg/apache/harmony/tests/java/lang/ThrowableTest.java
rg/apache/harmony/tests/java/lang/TypeNotPresentExceptionTest.java
rg/apache/harmony/tests/java/lang/UnknownErrorTest.java
rg/apache/harmony/tests/java/lang/UnsatisfiedLinkErrorTest.java
rg/apache/harmony/tests/java/lang/UnsupportedClassVersionErrorTest.java
rg/apache/harmony/tests/java/lang/UnsupportedOperationExceptionTest.java
rg/apache/harmony/tests/java/lang/VerifyErrorTest.java
rg/apache/harmony/tests/java/lang/VirtualMachineErrorTest.java
rg/apache/harmony/tests/java/lang/ref/PhantomReferenceTest.java
rg/apache/harmony/tests/java/lang/ref/ReferenceQueueTest.java
rg/apache/harmony/tests/java/lang/ref/ReferenceTest.java
rg/apache/harmony/tests/java/lang/ref/SoftReferenceTest.java
rg/apache/harmony/tests/java/lang/ref/WeakReferenceTest.java
rg/apache/harmony/tests/java/lang/reflect/AccessibleObjectTest.java
rg/apache/harmony/tests/java/lang/reflect/ArrayTest.java
rg/apache/harmony/tests/java/lang/reflect/BoundedGenericMethodsTests.java
rg/apache/harmony/tests/java/lang/reflect/ConstructorTest.java
rg/apache/harmony/tests/java/lang/reflect/FieldTest.java
rg/apache/harmony/tests/java/lang/reflect/GenericArrayTypeTest.java
rg/apache/harmony/tests/java/lang/reflect/GenericMethodsTests.java
rg/apache/harmony/tests/java/lang/reflect/GenericReflectionTestsBase.java
rg/apache/harmony/tests/java/lang/reflect/GenericSignatureFormatErrorTest.java
rg/apache/harmony/tests/java/lang/reflect/InvocationTargetExceptionTest.java
rg/apache/harmony/tests/java/lang/reflect/MalformedParameterizedTypeExceptionTest.java
rg/apache/harmony/tests/java/lang/reflect/MalformedParameterizedTypeExceptionTests.java
rg/apache/harmony/tests/java/lang/reflect/MethodTest.java
rg/apache/harmony/tests/java/lang/reflect/ModifierTest.java
rg/apache/harmony/tests/java/lang/reflect/ParameterizedTypeTest.java
rg/apache/harmony/tests/java/lang/reflect/ProxyTest.java
rg/apache/harmony/tests/java/lang/reflect/TypeVariableTest.java
rg/apache/harmony/tests/java/lang/reflect/UndeclaredThrowableExceptionTest.java
rg/apache/harmony/tests/java/lang/reflect/UndeclaredThrowableExceptionTests.java
rg/apache/harmony/tests/java/lang/reflect/WildcardTypeTest.java
rg/apache/harmony/tests/java/math/MathContextTest.java
rg/apache/harmony/tests/java/math/OldBigIntegerTest.java
rg/apache/harmony/tests/java/math/RoundingModeTest.java
rg/apache/harmony/tests/java/net/AuthenticatorTest.java
rg/apache/harmony/tests/java/net/BindExceptionTest.java
rg/apache/harmony/tests/java/net/ConnectExceptionTest.java
rg/apache/harmony/tests/java/net/CookieHandlerTest.java
rg/apache/harmony/tests/java/net/CookieManagerTest.java
rg/apache/harmony/tests/java/net/CookiePolicyTest.java
rg/apache/harmony/tests/java/net/CookieStoreTest.java
rg/apache/harmony/tests/java/net/DatagramPacketTest.java
rg/apache/harmony/tests/java/net/DatagramSocketImplTest.java
rg/apache/harmony/tests/java/net/DatagramSocketTest.java
rg/apache/harmony/tests/java/net/HttpCookieTest.java
rg/apache/harmony/tests/java/net/IDNTest.java
rg/apache/harmony/tests/java/net/Inet4AddressTest.java
rg/apache/harmony/tests/java/net/Inet6AddressTest.java
rg/apache/harmony/tests/java/net/InetAddressTest.java
rg/apache/harmony/tests/java/net/InetAddressThreadTest.java
rg/apache/harmony/tests/java/net/InetSocketAddressTest.java
rg/apache/harmony/tests/java/net/InterfaceAddressTest.java
rg/apache/harmony/tests/java/net/JarURLConnectionTest.java
rg/apache/harmony/tests/java/net/MalformedURLExceptionTest.java
rg/apache/harmony/tests/java/net/MulticastSocketTest.java
rg/apache/harmony/tests/java/net/NetworkInterfaceTest.java
rg/apache/harmony/tests/java/net/NoRouteToHostExceptionTest.java
rg/apache/harmony/tests/java/net/PasswordAuthenticationTest.java
rg/apache/harmony/tests/java/net/ProtocolExceptionTest.java
rg/apache/harmony/tests/java/net/ProxySelectorTest.java
rg/apache/harmony/tests/java/net/ProxyTest.java
rg/apache/harmony/tests/java/net/ResponseCacheTest.java
rg/apache/harmony/tests/java/net/SecureCacheResponseTest.java
rg/apache/harmony/tests/java/net/ServerSocketTest.java
rg/apache/harmony/tests/java/net/SocketExceptionTest.java
rg/apache/harmony/tests/java/net/SocketImplTest.java
rg/apache/harmony/tests/java/net/SocketTest.java
rg/apache/harmony/tests/java/net/SocketTimeoutExceptionTest.java
rg/apache/harmony/tests/java/net/TestServerSocketInit.java
rg/apache/harmony/tests/java/net/URISyntaxExceptionTest.java
rg/apache/harmony/tests/java/net/URITest.java
rg/apache/harmony/tests/java/net/URLDecoderTest.java
rg/apache/harmony/tests/java/net/URLTest.java
rg/apache/harmony/tests/java/net/UnknownHostExceptionTest.java
rg/apache/harmony/tests/java/net/UnknownServiceExceptionTest.java
rg/apache/harmony/tests/java/util/AbstractCollectionTest.java
rg/apache/harmony/tests/java/util/AbstractListTest.java
rg/apache/harmony/tests/java/util/AbstractMapTest.java
rg/apache/harmony/tests/java/util/AbstractQueueTest.java
rg/apache/harmony/tests/java/util/AbstractSequentialListTest.java
rg/apache/harmony/tests/java/util/ArrayDequeTest.java
rg/apache/harmony/tests/java/util/ArrayListTest.java
rg/apache/harmony/tests/java/util/Arrays2Test.java
rg/apache/harmony/tests/java/util/ArraysTest.java
rg/apache/harmony/tests/java/util/BitSetTest.java
rg/apache/harmony/tests/java/util/CalendarTest.java
rg/apache/harmony/tests/java/util/Collections2Test.java
rg/apache/harmony/tests/java/util/CollectionsTest.java
rg/apache/harmony/tests/java/util/ConcurrentModTest.java
rg/apache/harmony/tests/java/util/ConcurrentModificationExceptionTest.java
rg/apache/harmony/tests/java/util/ControlTest.java
rg/apache/harmony/tests/java/util/CurrencyTest.java
rg/apache/harmony/tests/java/util/DateTest.java
rg/apache/harmony/tests/java/util/DuplicateFormatFlagsExceptionTest.java
rg/apache/harmony/tests/java/util/EmptyStackExceptionTest.java
rg/apache/harmony/tests/java/util/EnumMapTest.java
rg/apache/harmony/tests/java/util/EnumSetTest.java
rg/apache/harmony/tests/java/util/EventObjectTest.java
rg/apache/harmony/tests/java/util/FormatFlagsConversionMismatchExceptionTest.java
rg/apache/harmony/tests/java/util/FormattableFlagsTest.java
rg/apache/harmony/tests/java/util/FormatterClosedExceptionTest.java
rg/apache/harmony/tests/java/util/FormatterTest.java
rg/apache/harmony/tests/java/util/GregorianCalendarTest.java
rg/apache/harmony/tests/java/util/HashMapTest.java
rg/apache/harmony/tests/java/util/HashSetTest.java
rg/apache/harmony/tests/java/util/HashtableTest.java
rg/apache/harmony/tests/java/util/IdentityHashMap2Test.java
rg/apache/harmony/tests/java/util/IdentityHashMapTest.java
rg/apache/harmony/tests/java/util/IllegalFormatCodePointExceptionTest.java
rg/apache/harmony/tests/java/util/IllegalFormatConversionExceptionTest.java
rg/apache/harmony/tests/java/util/IllegalFormatFlagsExceptionTest.java
rg/apache/harmony/tests/java/util/IllegalFormatPrecisionExceptionTest.java
rg/apache/harmony/tests/java/util/IllegalFormatWidthExceptionTest.java
rg/apache/harmony/tests/java/util/InputMismatchExceptionTest.java
rg/apache/harmony/tests/java/util/InvalidPropertiesFormatExceptionTest.java
rg/apache/harmony/tests/java/util/LinkedHashMapTest.java
rg/apache/harmony/tests/java/util/LinkedHashSetTest.java
rg/apache/harmony/tests/java/util/LinkedListTest.java
rg/apache/harmony/tests/java/util/ListResourceBundleTest.java
rg/apache/harmony/tests/java/util/LocaleTest.java
rg/apache/harmony/tests/java/util/MissingFormatArgumentExceptionTest.java
rg/apache/harmony/tests/java/util/MissingFormatWidthExceptionTest.java
rg/apache/harmony/tests/java/util/MissingResourceExceptionTest.java
rg/apache/harmony/tests/java/util/NoSuchElementExceptionTest.java
rg/apache/harmony/tests/java/util/ObservableTest.java
rg/apache/harmony/tests/java/util/PriorityQueueTest.java
rg/apache/harmony/tests/java/util/PropertiesTest.java
rg/apache/harmony/tests/java/util/PropertyResourceBundleTest.java
rg/apache/harmony/tests/java/util/RandomTest.java
rg/apache/harmony/tests/java/util/RefSortedMap.java
rg/apache/harmony/tests/java/util/ResourceBundleTest.java
rg/apache/harmony/tests/java/util/SampleBundleClass.java
rg/apache/harmony/tests/java/util/ScannerParseLargeFileBenchmarkTest.java
rg/apache/harmony/tests/java/util/ScannerTest.java
rg/apache/harmony/tests/java/util/ServiceConfigurationErrorTest.java
rg/apache/harmony/tests/java/util/SimpleEntryTest.java
rg/apache/harmony/tests/java/util/SimpleImmutableEntryTest.java
rg/apache/harmony/tests/java/util/SimpleTimeZoneTest.java
rg/apache/harmony/tests/java/util/SortedMapTestBase.java
rg/apache/harmony/tests/java/util/StackTest.java
rg/apache/harmony/tests/java/util/StringTokenizerTest.java
rg/apache/harmony/tests/java/util/TimeZoneTest.java
rg/apache/harmony/tests/java/util/TimerTaskTest.java
rg/apache/harmony/tests/java/util/TimerTest.java
rg/apache/harmony/tests/java/util/TooManyListenersExceptionTest.java
rg/apache/harmony/tests/java/util/TreeMapExtendTest.java
rg/apache/harmony/tests/java/util/TreeMapRndTest.java
rg/apache/harmony/tests/java/util/TreeMapTest.java
rg/apache/harmony/tests/java/util/TreeSetTest.java
rg/apache/harmony/tests/java/util/UUIDTest.java
rg/apache/harmony/tests/java/util/UnknownFormatConversionExceptionTest.java
rg/apache/harmony/tests/java/util/UnknownFormatFlagsExceptionTest.java
rg/apache/harmony/tests/java/util/VectorTest.java
rg/apache/harmony/tests/java/util/WeakHashMapTest.java
rg/apache/harmony/tests/java/util/support/A.java
rg/apache/harmony/tests/java/util/support/B.java
rg/apache/harmony/tests/java/util/support/I.java
rg/apache/harmony/tests/java/util/support/P.java
rg/apache/harmony/tests/javax/net/ServerSocketFactoryTest.java
rg/apache/harmony/tests/javax/net/SocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/CertPathTrustManagerParametersTest.java
rg/apache/harmony/tests/javax/net/ssl/CertificatesToPlayWith.java
rg/apache/harmony/tests/javax/net/ssl/HandshakeCompletedEventTest.java
rg/apache/harmony/tests/javax/net/ssl/HostnameVerifierTest.java
rg/apache/harmony/tests/javax/net/ssl/HttpsURLConnectionTest.java
rg/apache/harmony/tests/javax/net/ssl/KeyManagerFactory1Test.java
rg/apache/harmony/tests/javax/net/ssl/KeyManagerFactory2Test.java
rg/apache/harmony/tests/javax/net/ssl/KeyManagerFactorySpiTest.java
rg/apache/harmony/tests/javax/net/ssl/KeyStoreBuilderParametersTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLContext1Test.java
rg/apache/harmony/tests/javax/net/ssl/SSLContext2Test.java
rg/apache/harmony/tests/javax/net/ssl/SSLContextSpiTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineResultHandshakeStatusTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineResultStatusTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineResultTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLHandshakeExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLKeyExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLPeerUnverifiedExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLProtocolExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLServerSocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLServerSocketTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionBindingEventTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionBindingListenerTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionContextTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSocketTest.java
rg/apache/harmony/tests/javax/net/ssl/TrustManagerFactory1Test.java
rg/apache/harmony/tests/javax/net/ssl/TrustManagerFactory2Test.java
rg/apache/harmony/tests/javax/net/ssl/TrustManagerFactorySpiTest.java
rg/apache/harmony/tests/javax/net/ssl/X509ExtendedKeyManagerTest.java
rg/apache/harmony/tests/javax/net/ssl/X509KeyManagerTest.java
rg/apache/harmony/tests/javax/net/ssl/X509TrustManagerTest.java
rg/apache/harmony/tests/javax/security/auth/CallbackHandlerTest.java
rg/apache/harmony/tests/javax/security/auth/DestroyFailedExceptionTest.java
rg/apache/harmony/tests/javax/security/auth/DestroyableTest.java
rg/apache/harmony/tests/javax/security/auth/LoginExceptionTest.java
rg/apache/harmony/tests/javax/security/auth/PasswordCallbackTest.java
rg/apache/harmony/tests/javax/security/auth/SubjectTest.java
rg/apache/harmony/tests/javax/security/auth/UnsupportedCallbackExceptionTest.java
rg/apache/harmony/tests/javax/security/auth/X500PrincipalTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateEncodingExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateExpiredExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateNotYetValidExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateParsingExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateTest.java
rg/apache/harmony/tests/javax/security/cert/X509CertificateTest.java
rg/apache/harmony/tests/javax/xml/parsers/DocumentBuilderFactoryTest.java
rg/apache/harmony/tests/javax/xml/parsers/DocumentBuilderTest.java
rg/apache/harmony/tests/javax/xml/parsers/FactoryConfigurationErrorTest.java
rg/apache/harmony/tests/javax/xml/parsers/ParserConfigurationExceptionTest.java
rg/apache/harmony/tests/javax/xml/parsers/SAXParserFactoryTest.java
rg/apache/harmony/tests/javax/xml/parsers/SAXParserTest.java
rg/apache/harmony/tests/javax/xml/parsers/SAXParserTestSupport.java
rg/apache/harmony/tests/org/apache/harmony/kernel/dalvik/ThreadsTest.java
rg/apache/harmony/tests/org/xml/sax/HandlerBaseTest.java
rg/apache/harmony/tests/org/xml/sax/InputSourceTest.java
rg/apache/harmony/tests/org/xml/sax/SAXExceptionTest.java
rg/apache/harmony/tests/org/xml/sax/SAXNotRecognizedExceptionTest.java
rg/apache/harmony/tests/org/xml/sax/SAXNotSupportedExceptionTest.java
rg/apache/harmony/tests/org/xml/sax/SAXParseExceptionTest.java
rg/apache/harmony/tests/org/xml/sax/ext/Attributes2ImplTest.java
rg/apache/harmony/tests/org/xml/sax/ext/DefaultHandler2Test.java
rg/apache/harmony/tests/org/xml/sax/ext/Locator2ImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/AttributeListImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/AttributesImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/DefaultHandlerTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/LocatorImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/NamespaceSupportTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/ParserAdapterTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/ParserFactoryTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/XMLFilterImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/XMLReaderAdapterTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/XMLReaderFactoryTest.java
rg/apache/harmony/tests/org/xml/sax/support/BrokenInputStream.java
rg/apache/harmony/tests/org/xml/sax/support/DoNothingParser.java
rg/apache/harmony/tests/org/xml/sax/support/DoNothingXMLReader.java
rg/apache/harmony/tests/org/xml/sax/support/MethodLogger.java
rg/apache/harmony/tests/org/xml/sax/support/MockFilter.java
rg/apache/harmony/tests/org/xml/sax/support/MockHandler.java
rg/apache/harmony/tests/org/xml/sax/support/MockParser.java
rg/apache/harmony/tests/org/xml/sax/support/MockReader.java
rg/apache/harmony/tests/org/xml/sax/support/MockResolver.java
rg/apache/harmony/tests/org/xml/sax/support/NoAccessParser.java
rg/apache/harmony/tests/org/xml/sax/support/NoAccessXMLReader.java
rg/apache/harmony/tests/org/xml/sax/support/NoInstanceParser.java
rg/apache/harmony/tests/org/xml/sax/support/NoInstanceXMLReader.java
rg/apache/harmony/tests/org/xml/sax/support/NoSubclassParser.java
rg/apache/harmony/tests/org/xml/sax/support/NoSubclassXMLReader.java
rg/apache/harmony/tests/pkg1/TestClass.java
rg/apache/harmony/tests/pkg2/TestClass.java
rg/apache/harmony/tests/support/A.java
rg/apache/harmony/tests/support/B.java
rg/apache/harmony/tests/support/I.java
rg/apache/harmony/tests/support/P.java
d5e281743e55e1daa297fd8043b2d9b6e8e1bed2 15-Nov-2013 Narayan Kamath <narayan@google.com> Revert "Move tests from tests/api to harmony-tests."

This reverts commit 81bf28ad31131815d0a36a43a0eca3c29aefdfcd.

Breaks build

Change-Id: I3f1562921ffe8fdbec36971dd65db398c27c92db
rg/apache/harmony/luni/tests/java/io/BufferedReaderTest.java
rg/apache/harmony/luni/tests/java/util/ScannerParseLargeFileBenchmarkTest.java
rg/apache/harmony/luni/tests/java/util/ScannerTest.java
rg/apache/harmony/luni/tests/java/util/UUIDTest.java
rg/apache/harmony/tests/internal/net/www/protocol/file/FileURLConnectionTest.java
rg/apache/harmony/tests/java/io/BufferedInputStreamTest.java
rg/apache/harmony/tests/java/io/BufferedOutputStreamTest.java
rg/apache/harmony/tests/java/io/BufferedReaderTest.java
rg/apache/harmony/tests/java/io/BufferedWriterTest.java
rg/apache/harmony/tests/java/io/ByteArrayInputStreamTest.java
rg/apache/harmony/tests/java/io/ByteArrayOutputStreamTest.java
rg/apache/harmony/tests/java/io/CharArrayReaderTest.java
rg/apache/harmony/tests/java/io/CharArrayWriterTest.java
rg/apache/harmony/tests/java/io/CharConversionExceptionTest.java
rg/apache/harmony/tests/java/io/ComputeSerialVersionUIDTest.java
rg/apache/harmony/tests/java/io/ConsoleTest.java
rg/apache/harmony/tests/java/io/DataInputStreamTest.java
rg/apache/harmony/tests/java/io/DataOutputStreamTest.java
rg/apache/harmony/tests/java/io/EOFExceptionTest.java
rg/apache/harmony/tests/java/io/FileDescriptorTest.java
rg/apache/harmony/tests/java/io/FileInputStreamTest.java
rg/apache/harmony/tests/java/io/FileNotFoundExceptionTest.java
rg/apache/harmony/tests/java/io/FileOutputStreamTest.java
rg/apache/harmony/tests/java/io/FileReaderTest.java
rg/apache/harmony/tests/java/io/FileTest.java
rg/apache/harmony/tests/java/io/FileWriterTest.java
rg/apache/harmony/tests/java/io/FilterInputStreamTest.java
rg/apache/harmony/tests/java/io/FilterOutputStreamTest.java
rg/apache/harmony/tests/java/io/IOErrorTest.java
rg/apache/harmony/tests/java/io/IOExceptionTest.java
rg/apache/harmony/tests/java/io/InputStreamReaderTest.java
rg/apache/harmony/tests/java/io/InputStreamTest.java
rg/apache/harmony/tests/java/io/InterruptedIOExceptionTest.java
rg/apache/harmony/tests/java/io/InvalidClassExceptionTest.java
rg/apache/harmony/tests/java/io/LineNumberInputStreamTest.java
rg/apache/harmony/tests/java/io/LineNumberReaderTest.java
rg/apache/harmony/tests/java/io/NotActiveExceptionTest.java
rg/apache/harmony/tests/java/io/NotSerializableExceptionTest.java
rg/apache/harmony/tests/java/io/ObjectInputStream2Test.java
rg/apache/harmony/tests/java/io/ObjectOutputStream2Test.java
rg/apache/harmony/tests/java/io/ObjectOutputStreamTest.java
rg/apache/harmony/tests/java/io/ObjectStreamClassTest.java
rg/apache/harmony/tests/java/io/ObjectStreamConstantsTest.java
rg/apache/harmony/tests/java/io/ObjectStreamFieldTest.java
rg/apache/harmony/tests/java/io/OpenRandomFileTest.java
rg/apache/harmony/tests/java/io/OutputStreamTesterTest.java
rg/apache/harmony/tests/java/io/OutputStreamWriterTest.java
rg/apache/harmony/tests/java/io/PipedInputStreamTest.java
rg/apache/harmony/tests/java/io/PipedOutputStreamTest.java
rg/apache/harmony/tests/java/io/PipedReaderTest.java
rg/apache/harmony/tests/java/io/PipedWriterTest.java
rg/apache/harmony/tests/java/io/PrintStreamTest.java
rg/apache/harmony/tests/java/io/PrintWriterTest.java
rg/apache/harmony/tests/java/io/PushbackInputStreamTest.java
rg/apache/harmony/tests/java/io/PushbackReaderTest.java
rg/apache/harmony/tests/java/io/RandomAccessFileTest.java
rg/apache/harmony/tests/java/io/ReaderTest.java
rg/apache/harmony/tests/java/io/SequenceInputStreamTest.java
rg/apache/harmony/tests/java/io/SerializationStressTest.java
rg/apache/harmony/tests/java/io/SerializationStressTest1.java
rg/apache/harmony/tests/java/io/SerializationStressTest2.java
rg/apache/harmony/tests/java/io/SerializationStressTest3.java
rg/apache/harmony/tests/java/io/SerializationStressTest4.java
rg/apache/harmony/tests/java/io/SerializationTestClass.java
rg/apache/harmony/tests/java/io/StreamCorruptedExceptionTest.java
rg/apache/harmony/tests/java/io/StreamTokenizerTest.java
rg/apache/harmony/tests/java/io/StringBufferInputStreamTest.java
rg/apache/harmony/tests/java/io/StringReaderTest.java
rg/apache/harmony/tests/java/io/StringWriterTest.java
rg/apache/harmony/tests/java/io/SyncFailedExceptionTest.java
rg/apache/harmony/tests/java/io/UTFDataFormatExceptionTest.java
rg/apache/harmony/tests/java/io/UnsupportedEncodingExceptionTest.java
rg/apache/harmony/tests/java/io/WriteAbortedExceptionTest.java
rg/apache/harmony/tests/java/io/WriterTest.java
rg/apache/harmony/tests/java/io/WriterTesterTest.java
rg/apache/harmony/tests/java/lang/AbstractMethodErrorTest.java
rg/apache/harmony/tests/java/lang/ArithmeticExceptionTest.java
rg/apache/harmony/tests/java/lang/ArrayIndexOutOfBoundsExceptionTest.java
rg/apache/harmony/tests/java/lang/ArrayStoreExceptionTest.java
rg/apache/harmony/tests/java/lang/AssertionErrorTest.java
rg/apache/harmony/tests/java/lang/BooleanTest.java
rg/apache/harmony/tests/java/lang/ByteTest.java
rg/apache/harmony/tests/java/lang/CharacterImplTest.java
rg/apache/harmony/tests/java/lang/CharacterTest.java
rg/apache/harmony/tests/java/lang/Character_SubsetTest.java
rg/apache/harmony/tests/java/lang/Character_UnicodeBlockTest.java
rg/apache/harmony/tests/java/lang/ClassCastExceptionTest.java
rg/apache/harmony/tests/java/lang/ClassCircularityErrorTest.java
rg/apache/harmony/tests/java/lang/ClassFormatErrorTest.java
rg/apache/harmony/tests/java/lang/ClassLoaderTest.java
rg/apache/harmony/tests/java/lang/ClassNotFoundExceptionTest.java
rg/apache/harmony/tests/java/lang/ClassTest.java
rg/apache/harmony/tests/java/lang/CloneNotSupportedExceptionTest.java
rg/apache/harmony/tests/java/lang/CompilerTest.java
rg/apache/harmony/tests/java/lang/DoubleTest.java
rg/apache/harmony/tests/java/lang/EnumConstantNotPresentExceptionTest.java
rg/apache/harmony/tests/java/lang/EnumTest.java
rg/apache/harmony/tests/java/lang/ErrorTest.java
rg/apache/harmony/tests/java/lang/ExceptionInInitializerErrorTest.java
rg/apache/harmony/tests/java/lang/ExceptionTest.java
rg/apache/harmony/tests/java/lang/FloatTest.java
rg/apache/harmony/tests/java/lang/IllegalAccessErrorTest.java
rg/apache/harmony/tests/java/lang/IllegalAccessExceptionTest.java
rg/apache/harmony/tests/java/lang/IllegalArgumentExceptionTest.java
rg/apache/harmony/tests/java/lang/IllegalMonitorStateExceptionTest.java
rg/apache/harmony/tests/java/lang/IllegalStateExceptionTest.java
rg/apache/harmony/tests/java/lang/IllegalThreadStateExceptionTest.java
rg/apache/harmony/tests/java/lang/IncompatibleClassChangeErrorTest.java
rg/apache/harmony/tests/java/lang/IndexOutOfBoundsExceptionTest.java
rg/apache/harmony/tests/java/lang/InheritableThreadLocalTest.java
rg/apache/harmony/tests/java/lang/InstantiationErrorTest.java
rg/apache/harmony/tests/java/lang/InstantiationExceptionTest.java
rg/apache/harmony/tests/java/lang/IntegerTest.java
rg/apache/harmony/tests/java/lang/InternalErrorTest.java
rg/apache/harmony/tests/java/lang/InterruptedExceptionTest.java
rg/apache/harmony/tests/java/lang/LinkageErrorTest.java
rg/apache/harmony/tests/java/lang/LongTest.java
rg/apache/harmony/tests/java/lang/MathTest.java
rg/apache/harmony/tests/java/lang/MockEnum.java
rg/apache/harmony/tests/java/lang/MockEnum2.java
rg/apache/harmony/tests/java/lang/NegativeArraySizeExceptionTest.java
rg/apache/harmony/tests/java/lang/NoClassDefFoundErrorTest.java
rg/apache/harmony/tests/java/lang/NoSuchFieldErrorTest.java
rg/apache/harmony/tests/java/lang/NoSuchFieldExceptionTest.java
rg/apache/harmony/tests/java/lang/NoSuchMethodErrorTest.java
rg/apache/harmony/tests/java/lang/NoSuchMethodExceptionTest.java
rg/apache/harmony/tests/java/lang/NullPointerExceptionTest.java
rg/apache/harmony/tests/java/lang/NumberFormatExceptionTest.java
rg/apache/harmony/tests/java/lang/NumberTest.java
rg/apache/harmony/tests/java/lang/ObjectTest.java
rg/apache/harmony/tests/java/lang/OutOfMemoryErrorTest.java
rg/apache/harmony/tests/java/lang/Process2Test.java
rg/apache/harmony/tests/java/lang/ProcessBuilderTest.java
rg/apache/harmony/tests/java/lang/ProcessManagerTest.java
rg/apache/harmony/tests/java/lang/ProcessTest.java
rg/apache/harmony/tests/java/lang/RuntimeExceptionTest.java
rg/apache/harmony/tests/java/lang/RuntimeTest.java
rg/apache/harmony/tests/java/lang/SecurityExceptionTest.java
rg/apache/harmony/tests/java/lang/ShortTest.java
rg/apache/harmony/tests/java/lang/StackOverflowErrorTest.java
rg/apache/harmony/tests/java/lang/StrictMathTest.java
rg/apache/harmony/tests/java/lang/String2Test.java
rg/apache/harmony/tests/java/lang/StringBuffer2Test.java
rg/apache/harmony/tests/java/lang/StringBufferTest.java
rg/apache/harmony/tests/java/lang/StringBuilderTest.java
rg/apache/harmony/tests/java/lang/StringIndexOutOfBoundsExceptionTest.java
rg/apache/harmony/tests/java/lang/StringTest.java
rg/apache/harmony/tests/java/lang/SystemTest.java
rg/apache/harmony/tests/java/lang/ThreadDeathTest.java
rg/apache/harmony/tests/java/lang/ThreadGroupTest.java
rg/apache/harmony/tests/java/lang/ThreadLocalTest.java
rg/apache/harmony/tests/java/lang/ThreadTest.java
rg/apache/harmony/tests/java/lang/ThrowableTest.java
rg/apache/harmony/tests/java/lang/TypeNotPresentExceptionTest.java
rg/apache/harmony/tests/java/lang/UnknownErrorTest.java
rg/apache/harmony/tests/java/lang/UnsatisfiedLinkErrorTest.java
rg/apache/harmony/tests/java/lang/UnsupportedClassVersionErrorTest.java
rg/apache/harmony/tests/java/lang/UnsupportedOperationExceptionTest.java
rg/apache/harmony/tests/java/lang/VerifyErrorTest.java
rg/apache/harmony/tests/java/lang/VirtualMachineErrorTest.java
rg/apache/harmony/tests/java/lang/ref/PhantomReferenceTest.java
rg/apache/harmony/tests/java/lang/ref/ReferenceQueueTest.java
rg/apache/harmony/tests/java/lang/ref/ReferenceTest.java
rg/apache/harmony/tests/java/lang/ref/SoftReferenceTest.java
rg/apache/harmony/tests/java/lang/ref/WeakReferenceTest.java
rg/apache/harmony/tests/java/lang/reflect/AccessibleObjectTest.java
rg/apache/harmony/tests/java/lang/reflect/ArrayTest.java
rg/apache/harmony/tests/java/lang/reflect/BoundedGenericMethodsTests.java
rg/apache/harmony/tests/java/lang/reflect/ConstructorTest.java
rg/apache/harmony/tests/java/lang/reflect/FieldTest.java
rg/apache/harmony/tests/java/lang/reflect/GenericArrayTypeTest.java
rg/apache/harmony/tests/java/lang/reflect/GenericMethodsTests.java
rg/apache/harmony/tests/java/lang/reflect/GenericReflectionTestsBase.java
rg/apache/harmony/tests/java/lang/reflect/GenericSignatureFormatErrorTest.java
rg/apache/harmony/tests/java/lang/reflect/InvocationTargetExceptionTest.java
rg/apache/harmony/tests/java/lang/reflect/MalformedParameterizedTypeExceptionTest.java
rg/apache/harmony/tests/java/lang/reflect/MalformedParameterizedTypeExceptionTests.java
rg/apache/harmony/tests/java/lang/reflect/MethodTest.java
rg/apache/harmony/tests/java/lang/reflect/ModifierTest.java
rg/apache/harmony/tests/java/lang/reflect/ParameterizedTypeTest.java
rg/apache/harmony/tests/java/lang/reflect/ProxyTest.java
rg/apache/harmony/tests/java/lang/reflect/TypeVariableTest.java
rg/apache/harmony/tests/java/lang/reflect/UndeclaredThrowableExceptionTest.java
rg/apache/harmony/tests/java/lang/reflect/UndeclaredThrowableExceptionTests.java
rg/apache/harmony/tests/java/lang/reflect/WildcardTypeTest.java
rg/apache/harmony/tests/java/math/MathContextTest.java
rg/apache/harmony/tests/java/math/OldBigIntegerTest.java
rg/apache/harmony/tests/java/math/RoundingModeTest.java
rg/apache/harmony/tests/java/net/AuthenticatorTest.java
rg/apache/harmony/tests/java/net/BindExceptionTest.java
rg/apache/harmony/tests/java/net/ConnectExceptionTest.java
rg/apache/harmony/tests/java/net/CookieHandlerTest.java
rg/apache/harmony/tests/java/net/CookieManagerTest.java
rg/apache/harmony/tests/java/net/CookiePolicyTest.java
rg/apache/harmony/tests/java/net/CookieStoreTest.java
rg/apache/harmony/tests/java/net/DatagramPacketTest.java
rg/apache/harmony/tests/java/net/DatagramSocketImplTest.java
rg/apache/harmony/tests/java/net/DatagramSocketTest.java
rg/apache/harmony/tests/java/net/HttpCookieTest.java
rg/apache/harmony/tests/java/net/IDNTest.java
rg/apache/harmony/tests/java/net/Inet4AddressTest.java
rg/apache/harmony/tests/java/net/Inet6AddressTest.java
rg/apache/harmony/tests/java/net/InetAddressTest.java
rg/apache/harmony/tests/java/net/InetAddressThreadTest.java
rg/apache/harmony/tests/java/net/InetSocketAddressTest.java
rg/apache/harmony/tests/java/net/InterfaceAddressTest.java
rg/apache/harmony/tests/java/net/JarURLConnectionTest.java
rg/apache/harmony/tests/java/net/MalformedURLExceptionTest.java
rg/apache/harmony/tests/java/net/MulticastSocketTest.java
rg/apache/harmony/tests/java/net/NetworkInterfaceTest.java
rg/apache/harmony/tests/java/net/NoRouteToHostExceptionTest.java
rg/apache/harmony/tests/java/net/PasswordAuthenticationTest.java
rg/apache/harmony/tests/java/net/ProtocolExceptionTest.java
rg/apache/harmony/tests/java/net/ProxySelectorTest.java
rg/apache/harmony/tests/java/net/ProxyTest.java
rg/apache/harmony/tests/java/net/ResponseCacheTest.java
rg/apache/harmony/tests/java/net/SecureCacheResponseTest.java
rg/apache/harmony/tests/java/net/ServerSocketTest.java
rg/apache/harmony/tests/java/net/SocketExceptionTest.java
rg/apache/harmony/tests/java/net/SocketImplTest.java
rg/apache/harmony/tests/java/net/SocketTest.java
rg/apache/harmony/tests/java/net/SocketTimeoutExceptionTest.java
rg/apache/harmony/tests/java/net/TestServerSocketInit.java
rg/apache/harmony/tests/java/net/URISyntaxExceptionTest.java
rg/apache/harmony/tests/java/net/URITest.java
rg/apache/harmony/tests/java/net/URLDecoderTest.java
rg/apache/harmony/tests/java/net/URLTest.java
rg/apache/harmony/tests/java/net/UnknownHostExceptionTest.java
rg/apache/harmony/tests/java/net/UnknownServiceExceptionTest.java
rg/apache/harmony/tests/java/util/AbstractCollectionTest.java
rg/apache/harmony/tests/java/util/AbstractListTest.java
rg/apache/harmony/tests/java/util/AbstractMapTest.java
rg/apache/harmony/tests/java/util/AbstractQueueTest.java
rg/apache/harmony/tests/java/util/AbstractSequentialListTest.java
rg/apache/harmony/tests/java/util/ArrayDequeTest.java
rg/apache/harmony/tests/java/util/ArrayListTest.java
rg/apache/harmony/tests/java/util/Arrays2Test.java
rg/apache/harmony/tests/java/util/ArraysTest.java
rg/apache/harmony/tests/java/util/BitSetTest.java
rg/apache/harmony/tests/java/util/CalendarTest.java
rg/apache/harmony/tests/java/util/Collections2Test.java
rg/apache/harmony/tests/java/util/CollectionsTest.java
rg/apache/harmony/tests/java/util/ConcurrentModTest.java
rg/apache/harmony/tests/java/util/ConcurrentModificationExceptionTest.java
rg/apache/harmony/tests/java/util/ControlTest.java
rg/apache/harmony/tests/java/util/CurrencyTest.java
rg/apache/harmony/tests/java/util/DateTest.java
rg/apache/harmony/tests/java/util/DuplicateFormatFlagsExceptionTest.java
rg/apache/harmony/tests/java/util/EmptyStackExceptionTest.java
rg/apache/harmony/tests/java/util/EnumMapTest.java
rg/apache/harmony/tests/java/util/EnumSetTest.java
rg/apache/harmony/tests/java/util/EventObjectTest.java
rg/apache/harmony/tests/java/util/FormatFlagsConversionMismatchExceptionTest.java
rg/apache/harmony/tests/java/util/FormattableFlagsTest.java
rg/apache/harmony/tests/java/util/FormatterClosedExceptionTest.java
rg/apache/harmony/tests/java/util/FormatterTest.java
rg/apache/harmony/tests/java/util/GregorianCalendarTest.java
rg/apache/harmony/tests/java/util/HashMapTest.java
rg/apache/harmony/tests/java/util/HashSetTest.java
rg/apache/harmony/tests/java/util/HashtableTest.java
rg/apache/harmony/tests/java/util/IdentityHashMap2Test.java
rg/apache/harmony/tests/java/util/IdentityHashMapTest.java
rg/apache/harmony/tests/java/util/IllegalFormatCodePointExceptionTest.java
rg/apache/harmony/tests/java/util/IllegalFormatConversionExceptionTest.java
rg/apache/harmony/tests/java/util/IllegalFormatFlagsExceptionTest.java
rg/apache/harmony/tests/java/util/IllegalFormatPrecisionExceptionTest.java
rg/apache/harmony/tests/java/util/IllegalFormatWidthExceptionTest.java
rg/apache/harmony/tests/java/util/InputMismatchExceptionTest.java
rg/apache/harmony/tests/java/util/InvalidPropertiesFormatExceptionTest.java
rg/apache/harmony/tests/java/util/LinkedHashMapTest.java
rg/apache/harmony/tests/java/util/LinkedHashSetTest.java
rg/apache/harmony/tests/java/util/LinkedListTest.java
rg/apache/harmony/tests/java/util/ListResourceBundleTest.java
rg/apache/harmony/tests/java/util/LocaleTest.java
rg/apache/harmony/tests/java/util/MissingFormatArgumentExceptionTest.java
rg/apache/harmony/tests/java/util/MissingFormatWidthExceptionTest.java
rg/apache/harmony/tests/java/util/MissingResourceExceptionTest.java
rg/apache/harmony/tests/java/util/NoSuchElementExceptionTest.java
rg/apache/harmony/tests/java/util/ObservableTest.java
rg/apache/harmony/tests/java/util/PriorityQueueTest.java
rg/apache/harmony/tests/java/util/PropertiesTest.java
rg/apache/harmony/tests/java/util/PropertyResourceBundleTest.java
rg/apache/harmony/tests/java/util/RandomTest.java
rg/apache/harmony/tests/java/util/RefSortedMap.java
rg/apache/harmony/tests/java/util/ResourceBundleTest.java
rg/apache/harmony/tests/java/util/SampleBundleClass.java
rg/apache/harmony/tests/java/util/ScannerParseLargeFileBenchmarkTest.java
rg/apache/harmony/tests/java/util/ScannerTest.java
rg/apache/harmony/tests/java/util/ServiceConfigurationErrorTest.java
rg/apache/harmony/tests/java/util/SimpleEntryTest.java
rg/apache/harmony/tests/java/util/SimpleImmutableEntryTest.java
rg/apache/harmony/tests/java/util/SimpleTimeZoneTest.java
rg/apache/harmony/tests/java/util/SortedMapTestBase.java
rg/apache/harmony/tests/java/util/StackTest.java
rg/apache/harmony/tests/java/util/StringTokenizerTest.java
rg/apache/harmony/tests/java/util/TimeZoneTest.java
rg/apache/harmony/tests/java/util/TimerTaskTest.java
rg/apache/harmony/tests/java/util/TimerTest.java
rg/apache/harmony/tests/java/util/TooManyListenersExceptionTest.java
rg/apache/harmony/tests/java/util/TreeMapExtendTest.java
rg/apache/harmony/tests/java/util/TreeMapRndTest.java
rg/apache/harmony/tests/java/util/TreeMapTest.java
rg/apache/harmony/tests/java/util/TreeSetTest.java
rg/apache/harmony/tests/java/util/UUIDTest.java
rg/apache/harmony/tests/java/util/UnknownFormatConversionExceptionTest.java
rg/apache/harmony/tests/java/util/UnknownFormatFlagsExceptionTest.java
rg/apache/harmony/tests/java/util/VectorTest.java
rg/apache/harmony/tests/java/util/WeakHashMapTest.java
rg/apache/harmony/tests/java/util/support/A.java
rg/apache/harmony/tests/java/util/support/B.java
rg/apache/harmony/tests/java/util/support/I.java
rg/apache/harmony/tests/java/util/support/P.java
rg/apache/harmony/tests/javax/net/ServerSocketFactoryTest.java
rg/apache/harmony/tests/javax/net/SocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/CertPathTrustManagerParametersTest.java
rg/apache/harmony/tests/javax/net/ssl/CertificatesToPlayWith.java
rg/apache/harmony/tests/javax/net/ssl/HandshakeCompletedEventTest.java
rg/apache/harmony/tests/javax/net/ssl/HostnameVerifierTest.java
rg/apache/harmony/tests/javax/net/ssl/HttpsURLConnectionTest.java
rg/apache/harmony/tests/javax/net/ssl/KeyManagerFactory1Test.java
rg/apache/harmony/tests/javax/net/ssl/KeyManagerFactory2Test.java
rg/apache/harmony/tests/javax/net/ssl/KeyManagerFactorySpiTest.java
rg/apache/harmony/tests/javax/net/ssl/KeyStoreBuilderParametersTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLContext1Test.java
rg/apache/harmony/tests/javax/net/ssl/SSLContext2Test.java
rg/apache/harmony/tests/javax/net/ssl/SSLContextSpiTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineResultHandshakeStatusTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineResultStatusTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineResultTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLHandshakeExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLKeyExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLPeerUnverifiedExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLProtocolExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLServerSocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLServerSocketTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionBindingEventTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionBindingListenerTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionContextTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSocketTest.java
rg/apache/harmony/tests/javax/net/ssl/TrustManagerFactory1Test.java
rg/apache/harmony/tests/javax/net/ssl/TrustManagerFactory2Test.java
rg/apache/harmony/tests/javax/net/ssl/TrustManagerFactorySpiTest.java
rg/apache/harmony/tests/javax/net/ssl/X509ExtendedKeyManagerTest.java
rg/apache/harmony/tests/javax/net/ssl/X509KeyManagerTest.java
rg/apache/harmony/tests/javax/net/ssl/X509TrustManagerTest.java
rg/apache/harmony/tests/javax/security/auth/CallbackHandlerTest.java
rg/apache/harmony/tests/javax/security/auth/DestroyFailedExceptionTest.java
rg/apache/harmony/tests/javax/security/auth/DestroyableTest.java
rg/apache/harmony/tests/javax/security/auth/LoginExceptionTest.java
rg/apache/harmony/tests/javax/security/auth/PasswordCallbackTest.java
rg/apache/harmony/tests/javax/security/auth/SubjectTest.java
rg/apache/harmony/tests/javax/security/auth/UnsupportedCallbackExceptionTest.java
rg/apache/harmony/tests/javax/security/auth/X500PrincipalTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateEncodingExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateExpiredExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateNotYetValidExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateParsingExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateTest.java
rg/apache/harmony/tests/javax/security/cert/X509CertificateTest.java
rg/apache/harmony/tests/javax/xml/parsers/DocumentBuilderFactoryTest.java
rg/apache/harmony/tests/javax/xml/parsers/DocumentBuilderTest.java
rg/apache/harmony/tests/javax/xml/parsers/FactoryConfigurationErrorTest.java
rg/apache/harmony/tests/javax/xml/parsers/ParserConfigurationExceptionTest.java
rg/apache/harmony/tests/javax/xml/parsers/SAXParserFactoryTest.java
rg/apache/harmony/tests/javax/xml/parsers/SAXParserTest.java
rg/apache/harmony/tests/javax/xml/parsers/SAXParserTestSupport.java
rg/apache/harmony/tests/org/apache/harmony/kernel/dalvik/ThreadsTest.java
rg/apache/harmony/tests/org/xml/sax/HandlerBaseTest.java
rg/apache/harmony/tests/org/xml/sax/InputSourceTest.java
rg/apache/harmony/tests/org/xml/sax/SAXExceptionTest.java
rg/apache/harmony/tests/org/xml/sax/SAXNotRecognizedExceptionTest.java
rg/apache/harmony/tests/org/xml/sax/SAXNotSupportedExceptionTest.java
rg/apache/harmony/tests/org/xml/sax/SAXParseExceptionTest.java
rg/apache/harmony/tests/org/xml/sax/ext/Attributes2ImplTest.java
rg/apache/harmony/tests/org/xml/sax/ext/DefaultHandler2Test.java
rg/apache/harmony/tests/org/xml/sax/ext/Locator2ImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/AttributeListImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/AttributesImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/DefaultHandlerTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/LocatorImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/NamespaceSupportTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/ParserAdapterTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/ParserFactoryTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/XMLFilterImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/XMLReaderAdapterTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/XMLReaderFactoryTest.java
rg/apache/harmony/tests/org/xml/sax/support/BrokenInputStream.java
rg/apache/harmony/tests/org/xml/sax/support/DoNothingParser.java
rg/apache/harmony/tests/org/xml/sax/support/DoNothingXMLReader.java
rg/apache/harmony/tests/org/xml/sax/support/MethodLogger.java
rg/apache/harmony/tests/org/xml/sax/support/MockFilter.java
rg/apache/harmony/tests/org/xml/sax/support/MockHandler.java
rg/apache/harmony/tests/org/xml/sax/support/MockParser.java
rg/apache/harmony/tests/org/xml/sax/support/MockReader.java
rg/apache/harmony/tests/org/xml/sax/support/MockResolver.java
rg/apache/harmony/tests/org/xml/sax/support/NoAccessParser.java
rg/apache/harmony/tests/org/xml/sax/support/NoAccessXMLReader.java
rg/apache/harmony/tests/org/xml/sax/support/NoInstanceParser.java
rg/apache/harmony/tests/org/xml/sax/support/NoInstanceXMLReader.java
rg/apache/harmony/tests/org/xml/sax/support/NoSubclassParser.java
rg/apache/harmony/tests/org/xml/sax/support/NoSubclassXMLReader.java
rg/apache/harmony/tests/pkg1/TestClass.java
rg/apache/harmony/tests/pkg2/TestClass.java
rg/apache/harmony/tests/support/A.java
rg/apache/harmony/tests/support/B.java
rg/apache/harmony/tests/support/I.java
rg/apache/harmony/tests/support/P.java
81bf28ad31131815d0a36a43a0eca3c29aefdfcd 15-Nov-2013 Narayan Kamath <narayan@google.com> Move tests from tests/api to harmony-tests.

The vast majority of cleaned up harmony tests
are now in harmony-tests/src/test/org/apache/harmony/tests/

Change-Id: I56c2e484ff434b5618cf6751d602ae9f0db96b30
rg/apache/harmony/luni/tests/java/io/BufferedReaderTest.java
rg/apache/harmony/luni/tests/java/util/ScannerParseLargeFileBenchmarkTest.java
rg/apache/harmony/luni/tests/java/util/ScannerTest.java
rg/apache/harmony/luni/tests/java/util/UUIDTest.java
rg/apache/harmony/tests/internal/net/www/protocol/file/FileURLConnectionTest.java
rg/apache/harmony/tests/java/io/BufferedInputStreamTest.java
rg/apache/harmony/tests/java/io/BufferedOutputStreamTest.java
rg/apache/harmony/tests/java/io/BufferedReaderTest.java
rg/apache/harmony/tests/java/io/BufferedWriterTest.java
rg/apache/harmony/tests/java/io/ByteArrayInputStreamTest.java
rg/apache/harmony/tests/java/io/ByteArrayOutputStreamTest.java
rg/apache/harmony/tests/java/io/CharArrayReaderTest.java
rg/apache/harmony/tests/java/io/CharArrayWriterTest.java
rg/apache/harmony/tests/java/io/CharConversionExceptionTest.java
rg/apache/harmony/tests/java/io/ComputeSerialVersionUIDTest.java
rg/apache/harmony/tests/java/io/ConsoleTest.java
rg/apache/harmony/tests/java/io/DataInputStreamTest.java
rg/apache/harmony/tests/java/io/DataOutputStreamTest.java
rg/apache/harmony/tests/java/io/EOFExceptionTest.java
rg/apache/harmony/tests/java/io/FileDescriptorTest.java
rg/apache/harmony/tests/java/io/FileInputStreamTest.java
rg/apache/harmony/tests/java/io/FileNotFoundExceptionTest.java
rg/apache/harmony/tests/java/io/FileOutputStreamTest.java
rg/apache/harmony/tests/java/io/FileReaderTest.java
rg/apache/harmony/tests/java/io/FileTest.java
rg/apache/harmony/tests/java/io/FileWriterTest.java
rg/apache/harmony/tests/java/io/FilterInputStreamTest.java
rg/apache/harmony/tests/java/io/FilterOutputStreamTest.java
rg/apache/harmony/tests/java/io/IOErrorTest.java
rg/apache/harmony/tests/java/io/IOExceptionTest.java
rg/apache/harmony/tests/java/io/InputStreamReaderTest.java
rg/apache/harmony/tests/java/io/InputStreamTest.java
rg/apache/harmony/tests/java/io/InterruptedIOExceptionTest.java
rg/apache/harmony/tests/java/io/InvalidClassExceptionTest.java
rg/apache/harmony/tests/java/io/LineNumberInputStreamTest.java
rg/apache/harmony/tests/java/io/LineNumberReaderTest.java
rg/apache/harmony/tests/java/io/NotActiveExceptionTest.java
rg/apache/harmony/tests/java/io/NotSerializableExceptionTest.java
rg/apache/harmony/tests/java/io/ObjectInputStream2Test.java
rg/apache/harmony/tests/java/io/ObjectOutputStream2Test.java
rg/apache/harmony/tests/java/io/ObjectOutputStreamTest.java
rg/apache/harmony/tests/java/io/ObjectStreamClassTest.java
rg/apache/harmony/tests/java/io/ObjectStreamConstantsTest.java
rg/apache/harmony/tests/java/io/ObjectStreamFieldTest.java
rg/apache/harmony/tests/java/io/OpenRandomFileTest.java
rg/apache/harmony/tests/java/io/OutputStreamTesterTest.java
rg/apache/harmony/tests/java/io/OutputStreamWriterTest.java
rg/apache/harmony/tests/java/io/PipedInputStreamTest.java
rg/apache/harmony/tests/java/io/PipedOutputStreamTest.java
rg/apache/harmony/tests/java/io/PipedReaderTest.java
rg/apache/harmony/tests/java/io/PipedWriterTest.java
rg/apache/harmony/tests/java/io/PrintStreamTest.java
rg/apache/harmony/tests/java/io/PrintWriterTest.java
rg/apache/harmony/tests/java/io/PushbackInputStreamTest.java
rg/apache/harmony/tests/java/io/PushbackReaderTest.java
rg/apache/harmony/tests/java/io/RandomAccessFileTest.java
rg/apache/harmony/tests/java/io/ReaderTest.java
rg/apache/harmony/tests/java/io/SequenceInputStreamTest.java
rg/apache/harmony/tests/java/io/SerializationStressTest.java
rg/apache/harmony/tests/java/io/SerializationStressTest1.java
rg/apache/harmony/tests/java/io/SerializationStressTest2.java
rg/apache/harmony/tests/java/io/SerializationStressTest3.java
rg/apache/harmony/tests/java/io/SerializationStressTest4.java
rg/apache/harmony/tests/java/io/SerializationTestClass.java
rg/apache/harmony/tests/java/io/StreamCorruptedExceptionTest.java
rg/apache/harmony/tests/java/io/StreamTokenizerTest.java
rg/apache/harmony/tests/java/io/StringBufferInputStreamTest.java
rg/apache/harmony/tests/java/io/StringReaderTest.java
rg/apache/harmony/tests/java/io/StringWriterTest.java
rg/apache/harmony/tests/java/io/SyncFailedExceptionTest.java
rg/apache/harmony/tests/java/io/UTFDataFormatExceptionTest.java
rg/apache/harmony/tests/java/io/UnsupportedEncodingExceptionTest.java
rg/apache/harmony/tests/java/io/WriteAbortedExceptionTest.java
rg/apache/harmony/tests/java/io/WriterTest.java
rg/apache/harmony/tests/java/io/WriterTesterTest.java
rg/apache/harmony/tests/java/lang/AbstractMethodErrorTest.java
rg/apache/harmony/tests/java/lang/ArithmeticExceptionTest.java
rg/apache/harmony/tests/java/lang/ArrayIndexOutOfBoundsExceptionTest.java
rg/apache/harmony/tests/java/lang/ArrayStoreExceptionTest.java
rg/apache/harmony/tests/java/lang/AssertionErrorTest.java
rg/apache/harmony/tests/java/lang/BooleanTest.java
rg/apache/harmony/tests/java/lang/ByteTest.java
rg/apache/harmony/tests/java/lang/CharacterImplTest.java
rg/apache/harmony/tests/java/lang/CharacterTest.java
rg/apache/harmony/tests/java/lang/Character_SubsetTest.java
rg/apache/harmony/tests/java/lang/Character_UnicodeBlockTest.java
rg/apache/harmony/tests/java/lang/ClassCastExceptionTest.java
rg/apache/harmony/tests/java/lang/ClassCircularityErrorTest.java
rg/apache/harmony/tests/java/lang/ClassFormatErrorTest.java
rg/apache/harmony/tests/java/lang/ClassLoaderTest.java
rg/apache/harmony/tests/java/lang/ClassNotFoundExceptionTest.java
rg/apache/harmony/tests/java/lang/ClassTest.java
rg/apache/harmony/tests/java/lang/CloneNotSupportedExceptionTest.java
rg/apache/harmony/tests/java/lang/CompilerTest.java
rg/apache/harmony/tests/java/lang/DoubleTest.java
rg/apache/harmony/tests/java/lang/EnumConstantNotPresentExceptionTest.java
rg/apache/harmony/tests/java/lang/EnumTest.java
rg/apache/harmony/tests/java/lang/ErrorTest.java
rg/apache/harmony/tests/java/lang/ExceptionInInitializerErrorTest.java
rg/apache/harmony/tests/java/lang/ExceptionTest.java
rg/apache/harmony/tests/java/lang/FloatTest.java
rg/apache/harmony/tests/java/lang/IllegalAccessErrorTest.java
rg/apache/harmony/tests/java/lang/IllegalAccessExceptionTest.java
rg/apache/harmony/tests/java/lang/IllegalArgumentExceptionTest.java
rg/apache/harmony/tests/java/lang/IllegalMonitorStateExceptionTest.java
rg/apache/harmony/tests/java/lang/IllegalStateExceptionTest.java
rg/apache/harmony/tests/java/lang/IllegalThreadStateExceptionTest.java
rg/apache/harmony/tests/java/lang/IncompatibleClassChangeErrorTest.java
rg/apache/harmony/tests/java/lang/IndexOutOfBoundsExceptionTest.java
rg/apache/harmony/tests/java/lang/InheritableThreadLocalTest.java
rg/apache/harmony/tests/java/lang/InstantiationErrorTest.java
rg/apache/harmony/tests/java/lang/InstantiationExceptionTest.java
rg/apache/harmony/tests/java/lang/IntegerTest.java
rg/apache/harmony/tests/java/lang/InternalErrorTest.java
rg/apache/harmony/tests/java/lang/InterruptedExceptionTest.java
rg/apache/harmony/tests/java/lang/LinkageErrorTest.java
rg/apache/harmony/tests/java/lang/LongTest.java
rg/apache/harmony/tests/java/lang/MathTest.java
rg/apache/harmony/tests/java/lang/MockEnum.java
rg/apache/harmony/tests/java/lang/MockEnum2.java
rg/apache/harmony/tests/java/lang/NegativeArraySizeExceptionTest.java
rg/apache/harmony/tests/java/lang/NoClassDefFoundErrorTest.java
rg/apache/harmony/tests/java/lang/NoSuchFieldErrorTest.java
rg/apache/harmony/tests/java/lang/NoSuchFieldExceptionTest.java
rg/apache/harmony/tests/java/lang/NoSuchMethodErrorTest.java
rg/apache/harmony/tests/java/lang/NoSuchMethodExceptionTest.java
rg/apache/harmony/tests/java/lang/NullPointerExceptionTest.java
rg/apache/harmony/tests/java/lang/NumberFormatExceptionTest.java
rg/apache/harmony/tests/java/lang/NumberTest.java
rg/apache/harmony/tests/java/lang/ObjectTest.java
rg/apache/harmony/tests/java/lang/OutOfMemoryErrorTest.java
rg/apache/harmony/tests/java/lang/Process2Test.java
rg/apache/harmony/tests/java/lang/ProcessBuilderTest.java
rg/apache/harmony/tests/java/lang/ProcessManagerTest.java
rg/apache/harmony/tests/java/lang/ProcessTest.java
rg/apache/harmony/tests/java/lang/RuntimeExceptionTest.java
rg/apache/harmony/tests/java/lang/RuntimeTest.java
rg/apache/harmony/tests/java/lang/SecurityExceptionTest.java
rg/apache/harmony/tests/java/lang/ShortTest.java
rg/apache/harmony/tests/java/lang/StackOverflowErrorTest.java
rg/apache/harmony/tests/java/lang/StrictMathTest.java
rg/apache/harmony/tests/java/lang/String2Test.java
rg/apache/harmony/tests/java/lang/StringBuffer2Test.java
rg/apache/harmony/tests/java/lang/StringBufferTest.java
rg/apache/harmony/tests/java/lang/StringBuilderTest.java
rg/apache/harmony/tests/java/lang/StringIndexOutOfBoundsExceptionTest.java
rg/apache/harmony/tests/java/lang/StringTest.java
rg/apache/harmony/tests/java/lang/SystemTest.java
rg/apache/harmony/tests/java/lang/ThreadDeathTest.java
rg/apache/harmony/tests/java/lang/ThreadGroupTest.java
rg/apache/harmony/tests/java/lang/ThreadLocalTest.java
rg/apache/harmony/tests/java/lang/ThreadTest.java
rg/apache/harmony/tests/java/lang/ThrowableTest.java
rg/apache/harmony/tests/java/lang/TypeNotPresentExceptionTest.java
rg/apache/harmony/tests/java/lang/UnknownErrorTest.java
rg/apache/harmony/tests/java/lang/UnsatisfiedLinkErrorTest.java
rg/apache/harmony/tests/java/lang/UnsupportedClassVersionErrorTest.java
rg/apache/harmony/tests/java/lang/UnsupportedOperationExceptionTest.java
rg/apache/harmony/tests/java/lang/VerifyErrorTest.java
rg/apache/harmony/tests/java/lang/VirtualMachineErrorTest.java
rg/apache/harmony/tests/java/lang/ref/PhantomReferenceTest.java
rg/apache/harmony/tests/java/lang/ref/ReferenceQueueTest.java
rg/apache/harmony/tests/java/lang/ref/ReferenceTest.java
rg/apache/harmony/tests/java/lang/ref/SoftReferenceTest.java
rg/apache/harmony/tests/java/lang/ref/WeakReferenceTest.java
rg/apache/harmony/tests/java/lang/reflect/AccessibleObjectTest.java
rg/apache/harmony/tests/java/lang/reflect/ArrayTest.java
rg/apache/harmony/tests/java/lang/reflect/BoundedGenericMethodsTests.java
rg/apache/harmony/tests/java/lang/reflect/ConstructorTest.java
rg/apache/harmony/tests/java/lang/reflect/FieldTest.java
rg/apache/harmony/tests/java/lang/reflect/GenericArrayTypeTest.java
rg/apache/harmony/tests/java/lang/reflect/GenericMethodsTests.java
rg/apache/harmony/tests/java/lang/reflect/GenericReflectionTestsBase.java
rg/apache/harmony/tests/java/lang/reflect/GenericSignatureFormatErrorTest.java
rg/apache/harmony/tests/java/lang/reflect/InvocationTargetExceptionTest.java
rg/apache/harmony/tests/java/lang/reflect/MalformedParameterizedTypeExceptionTest.java
rg/apache/harmony/tests/java/lang/reflect/MalformedParameterizedTypeExceptionTests.java
rg/apache/harmony/tests/java/lang/reflect/MethodTest.java
rg/apache/harmony/tests/java/lang/reflect/ModifierTest.java
rg/apache/harmony/tests/java/lang/reflect/ParameterizedTypeTest.java
rg/apache/harmony/tests/java/lang/reflect/ProxyTest.java
rg/apache/harmony/tests/java/lang/reflect/TypeVariableTest.java
rg/apache/harmony/tests/java/lang/reflect/UndeclaredThrowableExceptionTest.java
rg/apache/harmony/tests/java/lang/reflect/UndeclaredThrowableExceptionTests.java
rg/apache/harmony/tests/java/lang/reflect/WildcardTypeTest.java
rg/apache/harmony/tests/java/math/MathContextTest.java
rg/apache/harmony/tests/java/math/OldBigIntegerTest.java
rg/apache/harmony/tests/java/math/RoundingModeTest.java
rg/apache/harmony/tests/java/net/AuthenticatorTest.java
rg/apache/harmony/tests/java/net/BindExceptionTest.java
rg/apache/harmony/tests/java/net/ConnectExceptionTest.java
rg/apache/harmony/tests/java/net/CookieHandlerTest.java
rg/apache/harmony/tests/java/net/CookieManagerTest.java
rg/apache/harmony/tests/java/net/CookiePolicyTest.java
rg/apache/harmony/tests/java/net/CookieStoreTest.java
rg/apache/harmony/tests/java/net/DatagramPacketTest.java
rg/apache/harmony/tests/java/net/DatagramSocketImplTest.java
rg/apache/harmony/tests/java/net/DatagramSocketTest.java
rg/apache/harmony/tests/java/net/HttpCookieTest.java
rg/apache/harmony/tests/java/net/IDNTest.java
rg/apache/harmony/tests/java/net/Inet4AddressTest.java
rg/apache/harmony/tests/java/net/Inet6AddressTest.java
rg/apache/harmony/tests/java/net/InetAddressTest.java
rg/apache/harmony/tests/java/net/InetAddressThreadTest.java
rg/apache/harmony/tests/java/net/InetSocketAddressTest.java
rg/apache/harmony/tests/java/net/InterfaceAddressTest.java
rg/apache/harmony/tests/java/net/JarURLConnectionTest.java
rg/apache/harmony/tests/java/net/MalformedURLExceptionTest.java
rg/apache/harmony/tests/java/net/MulticastSocketTest.java
rg/apache/harmony/tests/java/net/NetworkInterfaceTest.java
rg/apache/harmony/tests/java/net/NoRouteToHostExceptionTest.java
rg/apache/harmony/tests/java/net/PasswordAuthenticationTest.java
rg/apache/harmony/tests/java/net/ProtocolExceptionTest.java
rg/apache/harmony/tests/java/net/ProxySelectorTest.java
rg/apache/harmony/tests/java/net/ProxyTest.java
rg/apache/harmony/tests/java/net/ResponseCacheTest.java
rg/apache/harmony/tests/java/net/SecureCacheResponseTest.java
rg/apache/harmony/tests/java/net/ServerSocketTest.java
rg/apache/harmony/tests/java/net/SocketExceptionTest.java
rg/apache/harmony/tests/java/net/SocketImplTest.java
rg/apache/harmony/tests/java/net/SocketTest.java
rg/apache/harmony/tests/java/net/SocketTimeoutExceptionTest.java
rg/apache/harmony/tests/java/net/TestServerSocketInit.java
rg/apache/harmony/tests/java/net/URISyntaxExceptionTest.java
rg/apache/harmony/tests/java/net/URITest.java
rg/apache/harmony/tests/java/net/URLDecoderTest.java
rg/apache/harmony/tests/java/net/URLTest.java
rg/apache/harmony/tests/java/net/UnknownHostExceptionTest.java
rg/apache/harmony/tests/java/net/UnknownServiceExceptionTest.java
rg/apache/harmony/tests/java/util/AbstractCollectionTest.java
rg/apache/harmony/tests/java/util/AbstractListTest.java
rg/apache/harmony/tests/java/util/AbstractMapTest.java
rg/apache/harmony/tests/java/util/AbstractQueueTest.java
rg/apache/harmony/tests/java/util/AbstractSequentialListTest.java
rg/apache/harmony/tests/java/util/ArrayDequeTest.java
rg/apache/harmony/tests/java/util/ArrayListTest.java
rg/apache/harmony/tests/java/util/Arrays2Test.java
rg/apache/harmony/tests/java/util/ArraysTest.java
rg/apache/harmony/tests/java/util/BitSetTest.java
rg/apache/harmony/tests/java/util/CalendarTest.java
rg/apache/harmony/tests/java/util/Collections2Test.java
rg/apache/harmony/tests/java/util/CollectionsTest.java
rg/apache/harmony/tests/java/util/ConcurrentModTest.java
rg/apache/harmony/tests/java/util/ConcurrentModificationExceptionTest.java
rg/apache/harmony/tests/java/util/ControlTest.java
rg/apache/harmony/tests/java/util/CurrencyTest.java
rg/apache/harmony/tests/java/util/DateTest.java
rg/apache/harmony/tests/java/util/DuplicateFormatFlagsExceptionTest.java
rg/apache/harmony/tests/java/util/EmptyStackExceptionTest.java
rg/apache/harmony/tests/java/util/EnumMapTest.java
rg/apache/harmony/tests/java/util/EnumSetTest.java
rg/apache/harmony/tests/java/util/EventObjectTest.java
rg/apache/harmony/tests/java/util/FormatFlagsConversionMismatchExceptionTest.java
rg/apache/harmony/tests/java/util/FormattableFlagsTest.java
rg/apache/harmony/tests/java/util/FormatterClosedExceptionTest.java
rg/apache/harmony/tests/java/util/FormatterTest.java
rg/apache/harmony/tests/java/util/GregorianCalendarTest.java
rg/apache/harmony/tests/java/util/HashMapTest.java
rg/apache/harmony/tests/java/util/HashSetTest.java
rg/apache/harmony/tests/java/util/HashtableTest.java
rg/apache/harmony/tests/java/util/IdentityHashMap2Test.java
rg/apache/harmony/tests/java/util/IdentityHashMapTest.java
rg/apache/harmony/tests/java/util/IllegalFormatCodePointExceptionTest.java
rg/apache/harmony/tests/java/util/IllegalFormatConversionExceptionTest.java
rg/apache/harmony/tests/java/util/IllegalFormatFlagsExceptionTest.java
rg/apache/harmony/tests/java/util/IllegalFormatPrecisionExceptionTest.java
rg/apache/harmony/tests/java/util/IllegalFormatWidthExceptionTest.java
rg/apache/harmony/tests/java/util/InputMismatchExceptionTest.java
rg/apache/harmony/tests/java/util/InvalidPropertiesFormatExceptionTest.java
rg/apache/harmony/tests/java/util/LinkedHashMapTest.java
rg/apache/harmony/tests/java/util/LinkedHashSetTest.java
rg/apache/harmony/tests/java/util/LinkedListTest.java
rg/apache/harmony/tests/java/util/ListResourceBundleTest.java
rg/apache/harmony/tests/java/util/LocaleTest.java
rg/apache/harmony/tests/java/util/MissingFormatArgumentExceptionTest.java
rg/apache/harmony/tests/java/util/MissingFormatWidthExceptionTest.java
rg/apache/harmony/tests/java/util/MissingResourceExceptionTest.java
rg/apache/harmony/tests/java/util/NoSuchElementExceptionTest.java
rg/apache/harmony/tests/java/util/ObservableTest.java
rg/apache/harmony/tests/java/util/PriorityQueueTest.java
rg/apache/harmony/tests/java/util/PropertiesTest.java
rg/apache/harmony/tests/java/util/PropertyResourceBundleTest.java
rg/apache/harmony/tests/java/util/RandomTest.java
rg/apache/harmony/tests/java/util/RefSortedMap.java
rg/apache/harmony/tests/java/util/ResourceBundleTest.java
rg/apache/harmony/tests/java/util/SampleBundleClass.java
rg/apache/harmony/tests/java/util/ScannerParseLargeFileBenchmarkTest.java
rg/apache/harmony/tests/java/util/ScannerTest.java
rg/apache/harmony/tests/java/util/ServiceConfigurationErrorTest.java
rg/apache/harmony/tests/java/util/SimpleEntryTest.java
rg/apache/harmony/tests/java/util/SimpleImmutableEntryTest.java
rg/apache/harmony/tests/java/util/SimpleTimeZoneTest.java
rg/apache/harmony/tests/java/util/SortedMapTestBase.java
rg/apache/harmony/tests/java/util/StackTest.java
rg/apache/harmony/tests/java/util/StringTokenizerTest.java
rg/apache/harmony/tests/java/util/TimeZoneTest.java
rg/apache/harmony/tests/java/util/TimerTaskTest.java
rg/apache/harmony/tests/java/util/TimerTest.java
rg/apache/harmony/tests/java/util/TooManyListenersExceptionTest.java
rg/apache/harmony/tests/java/util/TreeMapExtendTest.java
rg/apache/harmony/tests/java/util/TreeMapRndTest.java
rg/apache/harmony/tests/java/util/TreeMapTest.java
rg/apache/harmony/tests/java/util/TreeSetTest.java
rg/apache/harmony/tests/java/util/UUIDTest.java
rg/apache/harmony/tests/java/util/UnknownFormatConversionExceptionTest.java
rg/apache/harmony/tests/java/util/UnknownFormatFlagsExceptionTest.java
rg/apache/harmony/tests/java/util/VectorTest.java
rg/apache/harmony/tests/java/util/WeakHashMapTest.java
rg/apache/harmony/tests/java/util/support/A.java
rg/apache/harmony/tests/java/util/support/B.java
rg/apache/harmony/tests/java/util/support/I.java
rg/apache/harmony/tests/java/util/support/P.java
rg/apache/harmony/tests/javax/net/ServerSocketFactoryTest.java
rg/apache/harmony/tests/javax/net/SocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/CertPathTrustManagerParametersTest.java
rg/apache/harmony/tests/javax/net/ssl/CertificatesToPlayWith.java
rg/apache/harmony/tests/javax/net/ssl/HandshakeCompletedEventTest.java
rg/apache/harmony/tests/javax/net/ssl/HostnameVerifierTest.java
rg/apache/harmony/tests/javax/net/ssl/HttpsURLConnectionTest.java
rg/apache/harmony/tests/javax/net/ssl/KeyManagerFactory1Test.java
rg/apache/harmony/tests/javax/net/ssl/KeyManagerFactory2Test.java
rg/apache/harmony/tests/javax/net/ssl/KeyManagerFactorySpiTest.java
rg/apache/harmony/tests/javax/net/ssl/KeyStoreBuilderParametersTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLContext1Test.java
rg/apache/harmony/tests/javax/net/ssl/SSLContext2Test.java
rg/apache/harmony/tests/javax/net/ssl/SSLContextSpiTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineResultHandshakeStatusTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineResultStatusTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineResultTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLEngineTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLHandshakeExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLKeyExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLPeerUnverifiedExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLProtocolExceptionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLServerSocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLServerSocketTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionBindingEventTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionBindingListenerTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionContextTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSessionTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSocketFactoryTest.java
rg/apache/harmony/tests/javax/net/ssl/SSLSocketTest.java
rg/apache/harmony/tests/javax/net/ssl/TrustManagerFactory1Test.java
rg/apache/harmony/tests/javax/net/ssl/TrustManagerFactory2Test.java
rg/apache/harmony/tests/javax/net/ssl/TrustManagerFactorySpiTest.java
rg/apache/harmony/tests/javax/net/ssl/X509ExtendedKeyManagerTest.java
rg/apache/harmony/tests/javax/net/ssl/X509KeyManagerTest.java
rg/apache/harmony/tests/javax/net/ssl/X509TrustManagerTest.java
rg/apache/harmony/tests/javax/security/auth/CallbackHandlerTest.java
rg/apache/harmony/tests/javax/security/auth/DestroyFailedExceptionTest.java
rg/apache/harmony/tests/javax/security/auth/DestroyableTest.java
rg/apache/harmony/tests/javax/security/auth/LoginExceptionTest.java
rg/apache/harmony/tests/javax/security/auth/PasswordCallbackTest.java
rg/apache/harmony/tests/javax/security/auth/SubjectTest.java
rg/apache/harmony/tests/javax/security/auth/UnsupportedCallbackExceptionTest.java
rg/apache/harmony/tests/javax/security/auth/X500PrincipalTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateEncodingExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateExpiredExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateNotYetValidExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateParsingExceptionTest.java
rg/apache/harmony/tests/javax/security/cert/CertificateTest.java
rg/apache/harmony/tests/javax/security/cert/X509CertificateTest.java
rg/apache/harmony/tests/javax/xml/parsers/DocumentBuilderFactoryTest.java
rg/apache/harmony/tests/javax/xml/parsers/DocumentBuilderTest.java
rg/apache/harmony/tests/javax/xml/parsers/FactoryConfigurationErrorTest.java
rg/apache/harmony/tests/javax/xml/parsers/ParserConfigurationExceptionTest.java
rg/apache/harmony/tests/javax/xml/parsers/SAXParserFactoryTest.java
rg/apache/harmony/tests/javax/xml/parsers/SAXParserTest.java
rg/apache/harmony/tests/javax/xml/parsers/SAXParserTestSupport.java
rg/apache/harmony/tests/org/apache/harmony/kernel/dalvik/ThreadsTest.java
rg/apache/harmony/tests/org/xml/sax/HandlerBaseTest.java
rg/apache/harmony/tests/org/xml/sax/InputSourceTest.java
rg/apache/harmony/tests/org/xml/sax/SAXExceptionTest.java
rg/apache/harmony/tests/org/xml/sax/SAXNotRecognizedExceptionTest.java
rg/apache/harmony/tests/org/xml/sax/SAXNotSupportedExceptionTest.java
rg/apache/harmony/tests/org/xml/sax/SAXParseExceptionTest.java
rg/apache/harmony/tests/org/xml/sax/ext/Attributes2ImplTest.java
rg/apache/harmony/tests/org/xml/sax/ext/DefaultHandler2Test.java
rg/apache/harmony/tests/org/xml/sax/ext/Locator2ImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/AttributeListImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/AttributesImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/DefaultHandlerTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/LocatorImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/NamespaceSupportTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/ParserAdapterTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/ParserFactoryTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/XMLFilterImplTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/XMLReaderAdapterTest.java
rg/apache/harmony/tests/org/xml/sax/helpers/XMLReaderFactoryTest.java
rg/apache/harmony/tests/org/xml/sax/support/BrokenInputStream.java
rg/apache/harmony/tests/org/xml/sax/support/DoNothingParser.java
rg/apache/harmony/tests/org/xml/sax/support/DoNothingXMLReader.java
rg/apache/harmony/tests/org/xml/sax/support/MethodLogger.java
rg/apache/harmony/tests/org/xml/sax/support/MockFilter.java
rg/apache/harmony/tests/org/xml/sax/support/MockHandler.java
rg/apache/harmony/tests/org/xml/sax/support/MockParser.java
rg/apache/harmony/tests/org/xml/sax/support/MockReader.java
rg/apache/harmony/tests/org/xml/sax/support/MockResolver.java
rg/apache/harmony/tests/org/xml/sax/support/NoAccessParser.java
rg/apache/harmony/tests/org/xml/sax/support/NoAccessXMLReader.java
rg/apache/harmony/tests/org/xml/sax/support/NoInstanceParser.java
rg/apache/harmony/tests/org/xml/sax/support/NoInstanceXMLReader.java
rg/apache/harmony/tests/org/xml/sax/support/NoSubclassParser.java
rg/apache/harmony/tests/org/xml/sax/support/NoSubclassXMLReader.java
rg/apache/harmony/tests/pkg1/TestClass.java
rg/apache/harmony/tests/pkg2/TestClass.java
rg/apache/harmony/tests/support/A.java
rg/apache/harmony/tests/support/B.java
rg/apache/harmony/tests/support/I.java
rg/apache/harmony/tests/support/P.java
e5fea3d504609d22337a5311d3ce0e72314bceee 15-Nov-2013 Narayan Kamath <narayan@google.com> Use a consistent package path for harmony tests.

Harmony was never consistent about where they put their
tests. There's no reason we have to be the same.

Also, there's no need to have separate subtrees for nio,
nio_char etc. etc.

This change makes all existing apache harmony tests
subpackages of "org.apache.harmony.tests" and put them under
libcore/harmony-tests.

We somehow managed to end up with two vastly different
copies of CharsetDecoderTest & CharsetEncoderTest. I've
renamed the copies CharsetDecoder2Test & CharsetEncoder2Test
to avoid having to go in and resolve the complicated
diffs or speculate about the reasons for their
divergence.

Change-Id: Ic34e69c2faab8893edd54e05eccd7091f4a09abd
rg/apache/harmony/nio/tests/java/nio/AbstractBufferTest.java
rg/apache/harmony/nio/tests/java/nio/BufferOverflowExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/BufferUnderflowExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/ByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ByteOrderTest.java
rg/apache/harmony/nio/tests/java/nio/CharBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DirectByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DirectCharBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DirectDoubleBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DirectFloatBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DirectIntBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DirectLongBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DirectShortBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DoubleBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DuplicateDirectByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DuplicateHeapByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DuplicateWrappedByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/FloatBufferTest.java
rg/apache/harmony/nio/tests/java/nio/HeapByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/HeapCharBufferTest.java
rg/apache/harmony/nio/tests/java/nio/HeapDoubleBufferTest.java
rg/apache/harmony/nio/tests/java/nio/HeapFloatBufferTest.java
rg/apache/harmony/nio/tests/java/nio/HeapIntBufferTest.java
rg/apache/harmony/nio/tests/java/nio/HeapLongBufferTest.java
rg/apache/harmony/nio/tests/java/nio/HeapShortBufferTest.java
rg/apache/harmony/nio/tests/java/nio/IntBufferTest.java
rg/apache/harmony/nio/tests/java/nio/InvalidMarkExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/LongBufferTest.java
rg/apache/harmony/nio/tests/java/nio/MappedByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyBufferExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyCharBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyDirectByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyDoubleBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyFloatBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyHeapByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyHeapCharBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyHeapDoubleBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyHeapFloatBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyHeapIntBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyHeapLongBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyHeapShortBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyIntBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyLongBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyShortBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyWrappedByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyWrappedCharBufferTest1.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyWrappedDoubleBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyWrappedFloatBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyWrappedIntBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyWrappedLongBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyWrappedShortBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ShortBufferTest.java
rg/apache/harmony/nio/tests/java/nio/SliceDirectByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/SliceHeapByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/SliceWrappedByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/WrappedByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/WrappedCharBufferTest1.java
rg/apache/harmony/nio/tests/java/nio/WrappedCharBufferTest2.java
rg/apache/harmony/nio/tests/java/nio/WrappedDoubleBufferTest.java
rg/apache/harmony/nio/tests/java/nio/WrappedFloatBufferTest.java
rg/apache/harmony/nio/tests/java/nio/WrappedIntBufferTest.java
rg/apache/harmony/nio/tests/java/nio/WrappedLongBufferTest.java
rg/apache/harmony/nio/tests/java/nio/WrappedShortBufferTest.java
rg/apache/harmony/nio/tests/java/nio/channels/AlreadyConnectedExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/AsynchronousCloseExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/CancelledKeyExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/ChannelsTest.java
rg/apache/harmony/nio/tests/java/nio/channels/ClosedByInterruptExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/ClosedChannelExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/ClosedSelectorExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/ConnectionPendingExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/DatagramChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/FileChannelLockingTest.java
rg/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/FileLockInterruptionExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/FileLockTest.java
rg/apache/harmony/nio/tests/java/nio/channels/IllegalBlockingModeExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/IllegalSelectorExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/MapModeTest.java
rg/apache/harmony/nio/tests/java/nio/channels/MockDatagramChannel.java
rg/apache/harmony/nio/tests/java/nio/channels/MockServerSocketChannel.java
rg/apache/harmony/nio/tests/java/nio/channels/MockSocketChannel.java
rg/apache/harmony/nio/tests/java/nio/channels/NoConnectionPendingExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/NonReadableChannelExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/NonWritableChannelExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/NotYetBoundExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/NotYetConnectedExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/OverlappingFileLockExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/PipeTest.java
rg/apache/harmony/nio/tests/java/nio/channels/SelectableChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/SelectionKeyTest.java
rg/apache/harmony/nio/tests/java/nio/channels/SelectorTest.java
rg/apache/harmony/nio/tests/java/nio/channels/ServerSocketChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/SinkChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/SocketChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/SourceChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/UnixSelectorTest.java
rg/apache/harmony/nio/tests/java/nio/channels/UnresolvedAddressExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/UnsupportedAddressTypeExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/spi/AbstractInterruptibleChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/spi/AbstractSelectableChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/spi/AbstractSelectionKeyTest.java
rg/apache/harmony/nio/tests/java/nio/channels/spi/AbstractSelectorTest.java
rg/apache/harmony/nio/tests/java/nio/channels/spi/MockAbstractSelector.java
rg/apache/harmony/nio_char/tests/java/nio/charset/ASCIICharsetEncoderTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/CharacterCodingExceptionTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/CharsetDecoderTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/CharsetEncoderTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/CoderMalfunctionErrorTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/IllegalCharsetNameExceptionTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/MalformedInputExceptionTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/UnmappableCharacterExceptionTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/UnsupportedCharsetExceptionTest.java
rg/apache/harmony/tests/java/math/BigDecimalTest.java
rg/apache/harmony/tests/java/math/BigIntegerTest.java
rg/apache/harmony/tests/java/nio/AbstractBufferTest.java
rg/apache/harmony/tests/java/nio/BufferOverflowExceptionTest.java
rg/apache/harmony/tests/java/nio/BufferUnderflowExceptionTest.java
rg/apache/harmony/tests/java/nio/ByteBufferTest.java
rg/apache/harmony/tests/java/nio/ByteOrderTest.java
rg/apache/harmony/tests/java/nio/CharBufferTest.java
rg/apache/harmony/tests/java/nio/DirectByteBufferTest.java
rg/apache/harmony/tests/java/nio/DirectCharBufferTest.java
rg/apache/harmony/tests/java/nio/DirectDoubleBufferTest.java
rg/apache/harmony/tests/java/nio/DirectFloatBufferTest.java
rg/apache/harmony/tests/java/nio/DirectIntBufferTest.java
rg/apache/harmony/tests/java/nio/DirectLongBufferTest.java
rg/apache/harmony/tests/java/nio/DirectShortBufferTest.java
rg/apache/harmony/tests/java/nio/DoubleBufferTest.java
rg/apache/harmony/tests/java/nio/DuplicateDirectByteBufferTest.java
rg/apache/harmony/tests/java/nio/DuplicateHeapByteBufferTest.java
rg/apache/harmony/tests/java/nio/DuplicateWrappedByteBufferTest.java
rg/apache/harmony/tests/java/nio/FloatBufferTest.java
rg/apache/harmony/tests/java/nio/HeapByteBufferTest.java
rg/apache/harmony/tests/java/nio/HeapCharBufferTest.java
rg/apache/harmony/tests/java/nio/HeapDoubleBufferTest.java
rg/apache/harmony/tests/java/nio/HeapFloatBufferTest.java
rg/apache/harmony/tests/java/nio/HeapIntBufferTest.java
rg/apache/harmony/tests/java/nio/HeapLongBufferTest.java
rg/apache/harmony/tests/java/nio/HeapShortBufferTest.java
rg/apache/harmony/tests/java/nio/IntBufferTest.java
rg/apache/harmony/tests/java/nio/InvalidMarkExceptionTest.java
rg/apache/harmony/tests/java/nio/LongBufferTest.java
rg/apache/harmony/tests/java/nio/MappedByteBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyBufferExceptionTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyCharBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyDirectByteBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyDoubleBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyFloatBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyHeapByteBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyHeapCharBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyHeapDoubleBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyHeapFloatBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyHeapIntBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyHeapLongBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyHeapShortBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyIntBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyLongBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyShortBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyWrappedByteBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyWrappedCharBufferTest1.java
rg/apache/harmony/tests/java/nio/ReadOnlyWrappedDoubleBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyWrappedFloatBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyWrappedIntBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyWrappedLongBufferTest.java
rg/apache/harmony/tests/java/nio/ReadOnlyWrappedShortBufferTest.java
rg/apache/harmony/tests/java/nio/ShortBufferTest.java
rg/apache/harmony/tests/java/nio/SliceDirectByteBufferTest.java
rg/apache/harmony/tests/java/nio/SliceHeapByteBufferTest.java
rg/apache/harmony/tests/java/nio/SliceWrappedByteBufferTest.java
rg/apache/harmony/tests/java/nio/WrappedByteBufferTest.java
rg/apache/harmony/tests/java/nio/WrappedCharBufferTest1.java
rg/apache/harmony/tests/java/nio/WrappedCharBufferTest2.java
rg/apache/harmony/tests/java/nio/WrappedDoubleBufferTest.java
rg/apache/harmony/tests/java/nio/WrappedFloatBufferTest.java
rg/apache/harmony/tests/java/nio/WrappedIntBufferTest.java
rg/apache/harmony/tests/java/nio/WrappedLongBufferTest.java
rg/apache/harmony/tests/java/nio/WrappedShortBufferTest.java
rg/apache/harmony/tests/java/nio/channels/AlreadyConnectedExceptionTest.java
rg/apache/harmony/tests/java/nio/channels/AsynchronousCloseExceptionTest.java
rg/apache/harmony/tests/java/nio/channels/CancelledKeyExceptionTest.java
rg/apache/harmony/tests/java/nio/channels/ChannelsTest.java
rg/apache/harmony/tests/java/nio/channels/ClosedByInterruptExceptionTest.java
rg/apache/harmony/tests/java/nio/channels/ClosedChannelExceptionTest.java
rg/apache/harmony/tests/java/nio/channels/ClosedSelectorExceptionTest.java
rg/apache/harmony/tests/java/nio/channels/ConnectionPendingExceptionTest.java
rg/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java
rg/apache/harmony/tests/java/nio/channels/FileChannelLockingTest.java
rg/apache/harmony/tests/java/nio/channels/FileChannelTest.java
rg/apache/harmony/tests/java/nio/channels/FileLockInterruptionExceptionTest.java
rg/apache/harmony/tests/java/nio/channels/FileLockTest.java
rg/apache/harmony/tests/java/nio/channels/IllegalBlockingModeExceptionTest.java
rg/apache/harmony/tests/java/nio/channels/IllegalSelectorExceptionTest.java
rg/apache/harmony/tests/java/nio/channels/MapModeTest.java
rg/apache/harmony/tests/java/nio/channels/MockDatagramChannel.java
rg/apache/harmony/tests/java/nio/channels/MockServerSocketChannel.java
rg/apache/harmony/tests/java/nio/channels/MockSocketChannel.java
rg/apache/harmony/tests/java/nio/channels/NoConnectionPendingExceptionTest.java
rg/apache/harmony/tests/java/nio/channels/NonReadableChannelExceptionTest.java
rg/apache/harmony/tests/java/nio/channels/NonWritableChannelExceptionTest.java
rg/apache/harmony/tests/java/nio/channels/NotYetBoundExceptionTest.java
rg/apache/harmony/tests/java/nio/channels/NotYetConnectedExceptionTest.java
rg/apache/harmony/tests/java/nio/channels/OverlappingFileLockExceptionTest.java
rg/apache/harmony/tests/java/nio/channels/PipeTest.java
rg/apache/harmony/tests/java/nio/channels/SelectableChannelTest.java
rg/apache/harmony/tests/java/nio/channels/SelectionKeyTest.java
rg/apache/harmony/tests/java/nio/channels/SelectorTest.java
rg/apache/harmony/tests/java/nio/channels/ServerSocketChannelTest.java
rg/apache/harmony/tests/java/nio/channels/SinkChannelTest.java
rg/apache/harmony/tests/java/nio/channels/SocketChannelTest.java
rg/apache/harmony/tests/java/nio/channels/SourceChannelTest.java
rg/apache/harmony/tests/java/nio/channels/UnixSelectorTest.java
rg/apache/harmony/tests/java/nio/channels/UnresolvedAddressExceptionTest.java
rg/apache/harmony/tests/java/nio/channels/UnsupportedAddressTypeExceptionTest.java
rg/apache/harmony/tests/java/nio/channels/spi/AbstractInterruptibleChannelTest.java
rg/apache/harmony/tests/java/nio/channels/spi/AbstractSelectableChannelTest.java
rg/apache/harmony/tests/java/nio/channels/spi/AbstractSelectionKeyTest.java
rg/apache/harmony/tests/java/nio/channels/spi/AbstractSelectorTest.java
rg/apache/harmony/tests/java/nio/channels/spi/MockAbstractSelector.java
rg/apache/harmony/tests/java/nio/charset/ASCCharsetDecoderTest.java
rg/apache/harmony/tests/java/nio/charset/ASCCharsetTest.java
rg/apache/harmony/tests/java/nio/charset/ASCIICharsetEncoderTest.java
rg/apache/harmony/tests/java/nio/charset/AbstractCharsetTestCase.java
rg/apache/harmony/tests/java/nio/charset/CharacterCodingExceptionTest.java
rg/apache/harmony/tests/java/nio/charset/CharsetDecoder2Test.java
rg/apache/harmony/tests/java/nio/charset/CharsetDecoderTest.java
rg/apache/harmony/tests/java/nio/charset/CharsetEncoder2Test.java
rg/apache/harmony/tests/java/nio/charset/CharsetEncoderTest.java
rg/apache/harmony/tests/java/nio/charset/CharsetTest.java
rg/apache/harmony/tests/java/nio/charset/CoderMalfunctionErrorTest.java
rg/apache/harmony/tests/java/nio/charset/CoderResultTest.java
rg/apache/harmony/tests/java/nio/charset/CodingErrorActionTest.java
rg/apache/harmony/tests/java/nio/charset/GBCharsetDecoderTest.java
rg/apache/harmony/tests/java/nio/charset/GBCharsetEncoderTest.java
rg/apache/harmony/tests/java/nio/charset/ISOCharsetDecoderTest.java
rg/apache/harmony/tests/java/nio/charset/ISOCharsetEncoderTest.java
rg/apache/harmony/tests/java/nio/charset/ISOCharsetTest.java
rg/apache/harmony/tests/java/nio/charset/IllegalCharsetNameExceptionTest.java
rg/apache/harmony/tests/java/nio/charset/MalformedInputExceptionTest.java
rg/apache/harmony/tests/java/nio/charset/UTF16BECharsetDecoderTest.java
rg/apache/harmony/tests/java/nio/charset/UTF16BECharsetEncoderTest.java
rg/apache/harmony/tests/java/nio/charset/UTF16BECharsetTest.java
rg/apache/harmony/tests/java/nio/charset/UTF16CharsetDecoderTest.java
rg/apache/harmony/tests/java/nio/charset/UTF16CharsetEncoderTest.java
rg/apache/harmony/tests/java/nio/charset/UTF16CharsetTest.java
rg/apache/harmony/tests/java/nio/charset/UTF16LECharsetDecoderTest.java
rg/apache/harmony/tests/java/nio/charset/UTF16LECharsetEncoderTest.java
rg/apache/harmony/tests/java/nio/charset/UTF16LECharsetTest.java
rg/apache/harmony/tests/java/nio/charset/UTF8CharsetTest.java
rg/apache/harmony/tests/java/nio/charset/UTFCharsetDecoderTest.java
rg/apache/harmony/tests/java/nio/charset/UTFCharsetEncoderTest.java
rg/apache/harmony/tests/java/nio/charset/UnmappableCharacterExceptionTest.java
rg/apache/harmony/tests/java/nio/charset/UnsupportedCharsetExceptionTest.java
rg/apache/harmony/tests/java/text/DecimalFormatSymbolsTest.java
rg/apache/harmony/tests/java/text/DecimalFormatTest.java
ests/api/java/math/BigDecimalTest.java
ests/api/java/math/BigIntegerTest.java
ests/api/java/nio/charset/ASCCharsetDecoderTest.java
ests/api/java/nio/charset/ASCCharsetTest.java
ests/api/java/nio/charset/AbstractCharsetTestCase.java
ests/api/java/nio/charset/CharsetDecoderTest.java
ests/api/java/nio/charset/CharsetEncoderTest.java
ests/api/java/nio/charset/CharsetTest.java
ests/api/java/nio/charset/CoderResultTest.java
ests/api/java/nio/charset/CodingErrorActionTest.java
ests/api/java/nio/charset/GBCharsetDecoderTest.java
ests/api/java/nio/charset/GBCharsetEncoderTest.java
ests/api/java/nio/charset/ISOCharsetDecoderTest.java
ests/api/java/nio/charset/ISOCharsetEncoderTest.java
ests/api/java/nio/charset/ISOCharsetTest.java
ests/api/java/nio/charset/UTF16BECharsetDecoderTest.java
ests/api/java/nio/charset/UTF16BECharsetEncoderTest.java
ests/api/java/nio/charset/UTF16BECharsetTest.java
ests/api/java/nio/charset/UTF16CharsetDecoderTest.java
ests/api/java/nio/charset/UTF16CharsetEncoderTest.java
ests/api/java/nio/charset/UTF16CharsetTest.java
ests/api/java/nio/charset/UTF16LECharsetDecoderTest.java
ests/api/java/nio/charset/UTF16LECharsetEncoderTest.java
ests/api/java/nio/charset/UTF16LECharsetTest.java
ests/api/java/nio/charset/UTF8CharsetTest.java
ests/api/java/nio/charset/UTFCharsetDecoderTest.java
ests/api/java/nio/charset/UTFCharsetEncoderTest.java
0f702e293cb57da788261a80abc84391543f6791 13-Sep-2013 Elliott Hughes <enh@google.com> Clean up CharsetDecoder and CharsetEncoder.

This patch also fixes a few bugs, and a few test bugs, and then the bugs
exposed by fixing those tests.

(cherry picked from commit 6ad37f500b023ef09fd177ad8cd8e2ba0b842cae)

Change-Id: Ia58d30e414cc59c27a1d259e8056523d6df2c6bc
rg/apache/harmony/nio_char/tests/java/nio/charset/ASCIICharsetEncoderTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/CharsetDecoderTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/CharsetEncoderTest.java
ests/api/java/nio/charset/CharsetDecoderTest.java
ests/api/java/nio/charset/CharsetEncoderTest.java
ests/api/java/nio/charset/CharsetTest.java
ed1dd1f5a80c470eb9157a3ccc7285d4b1f1a0a6 15-Oct-2013 Elliott Hughes <enh@google.com> Fix a varargs warning in MessageFormatTest.

bdc was right.

Change-Id: I89c470d5deb4abcd0f3ecaeeac29da377e70eafb
rg/apache/harmony/tests/java/text/MessageFormatTest.java
6ad37f500b023ef09fd177ad8cd8e2ba0b842cae 13-Sep-2013 Elliott Hughes <enh@google.com> Clean up CharsetDecoder and CharsetEncoder.

This patch also fixes a few bugs, and a few test bugs, and then the bugs
exposed by fixing those tests.

Change-Id: Id52f8d9d8c812847ed7af36e8f8721c933f819c1
rg/apache/harmony/nio_char/tests/java/nio/charset/ASCIICharsetEncoderTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/CharsetDecoderTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/CharsetEncoderTest.java
ests/api/java/nio/charset/CharsetDecoderTest.java
ests/api/java/nio/charset/CharsetEncoderTest.java
ests/api/java/nio/charset/CharsetTest.java
018b61546e6a69ff9c5105ec017c85df641766c4 10-Sep-2013 Elliott Hughes <enh@google.com> Fix a bug in DateFormat, clean up some SimpleDateFormat tests.

We failed a couple of tests because of an assumption about the default
time zone:

junit.framework.AssertionFailedError: Wrong format: " d" expected: 12 result: 11
at java.text.SimpleDateFormatTest.test(SimpleDateFormatTest.java:55)
at org.apache.harmony.tests.java.text.SimpleDateFormatTest.test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition(SimpleDateFormatTest.java:347)

junit.framework.AssertionFailedError: Wrong result: h input: 12 expected: Thu Jan 01 00:00:00 UTC 1970 result: Thu Jan 01 08:00:00 UTC 1970
at java.text.SimpleDateFormatTest.parse(SimpleDateFormatTest.java:86)
at org.apache.harmony.tests.java.text.SimpleDateFormatTest.test_parseLjava_lang_StringLjava_text_ParsePosition(SimpleDateFormatTest.java:546)

Cleaning up the tests and merging OldSimpleDateFormatTest into
SimpleDateFormatTest accidentally made one of our tests more
strict, at which point it failed because we weren't updating the
FieldPosition for 'z' or 'Z' when formatting or parsing. So this
patch fixes that by mapping the DateFormat.Field to the appropriate
int for Calendar.

Change-Id: If4b2f2c02d8ccd50d96d77df3b60e1c1d65ae666
rg/apache/harmony/tests/java/text/SimpleDateFormatTest.java
3c51cabb4225fd090e7d559c1c991cacbeffd5c5 09-Sep-2013 Elliott Hughes <enh@google.com> Clean up useless comments in MatcherTest.

Change-Id: I921a8e1edb1d2aa596325cf03c04196328b3930b
rg/apache/harmony/tests/java/util/regex/MatcherTest.java
4ee5bab39d817c293d5bcc1f9a93af97368946ee 05-Sep-2013 Elliott Hughes <enh@google.com> More java.text test cleanup/fixes.

I investigated http://bugs.icu-project.org/trac/ticket/10353 further
and decided it's WAI, so we can remove a TODO implying that icu4c was
incorrect. Also merge the remaining OldDecimalFormatTest tests, removing
duplication.

Change-Id: I1941dd1bef3b5eae258960ca8a5fcd2e7de0c926
rg/apache/harmony/tests/java/text/DecimalFormatTest.java
rg/apache/harmony/tests/java/text/Support_DecimalFormat.java
8c80e6bbbe48bc1a3a2c0c0a2eed252e1c04ea2c 05-Sep-2013 Elliott Hughes <enh@google.com> Only use public API for icu4c's FieldPositionIterator.

Change-Id: I247f7c644537b8e9f67f4f27360ce1449fa04300
rg/apache/harmony/tests/java/text/DecimalFormatTest.java
8f9976752b2a6e834994ca5790025bc46a3ef340 31-Aug-2013 Elliott Hughes <enh@google.com> Fix a DecimalFormat crash when formatting the empty string.

We don't even need a general-purpose iterator, and it's never exposed
to user code, so we can simplify things quite a bit. The key change
though is that a null array is not an error condition --- it just
means we didn't actually output anything.

Bug: https://code.google.com/p/android/issues/detail?id=59600
Change-Id: I7ec0bab00e15ab5c3a4dbd15e2dc81494f68e82f
rg/apache/harmony/tests/java/text/DecimalFormatTest.java
74473971cc9d960376295fbcc430320c9ed62991 29-Aug-2013 Elliott Hughes <enh@google.com> Fix harmony java.text test failures.

There were plenty of bad tests here, but there were some real bugs too.

* DecimalFormat was only handling RoundingMode.UNNECESSARY for double
formatting.

* DecimalFormat was not ensuring that it's superclass' fields were
being correctly updated.

* NumberFormat was throwing NPE for a null object because of an
improved detail message, despite being specified to throw IAE.

* We weren't mapping NumberFormat.Field instances to the corresponding icu4c
UNUM_x_FIELD constant, so we weren't actually setting FieldPosition
objects correctly.

* SimpleDateFormat was not formatting milliseconds correctly with 'S'.

* NativeDecimalFormat wasn't handling JNI NewString OOME correctly.

Bug: 2528220
Bug: 3056865
Bug: 3057080
Bug: 3057090
Change-Id: Iac11f902f2e9649e596e7e7b7bc501b13e956fca
rg/apache/harmony/tests/java/text/BidiTest.java
rg/apache/harmony/tests/java/text/CollationElementIteratorTest.java
rg/apache/harmony/tests/java/text/DateFormatSymbolsTest.java
rg/apache/harmony/tests/java/text/DecimalFormatSymbolsTest.java
rg/apache/harmony/tests/java/text/DecimalFormatTest.java
rg/apache/harmony/tests/java/text/FieldPositionTest.java
rg/apache/harmony/tests/java/text/MessageFormatTest.java
rg/apache/harmony/tests/java/text/NumberFormatTest.java
rg/apache/harmony/tests/java/text/RuleBasedCollatorTest.java
rg/apache/harmony/tests/java/text/SimpleDateFormatTest.java
rg/apache/harmony/tests/java/text/Support_DecimalFormat.java
rg/apache/harmony/tests/java/text/Support_Format.java
rg/apache/harmony/tests/java/text/Support_MessageFormat.java
rg/apache/harmony/tests/java/text/Support_SimpleDateFormat.java
994e4e5ded616a100ca42b16cffa36aa9f595f64 28-Aug-2013 Elliott Hughes <enh@google.com> Add harmony java.text tests.

Change-Id: Id8d0acd77d08ff337b4851ae74a48cc002d66cd9
rg/apache/harmony/tests/java/text/AnnotationTest.java
rg/apache/harmony/tests/java/text/AttributedCharacterIteratorAttributeTest.java
rg/apache/harmony/tests/java/text/AttributedCharacterIteratorTest.java
rg/apache/harmony/tests/java/text/AttributedStringTest.java
rg/apache/harmony/tests/java/text/BidiTest.java
rg/apache/harmony/tests/java/text/BreakIteratorTest.java
rg/apache/harmony/tests/java/text/ChoiceFormatTest.java
rg/apache/harmony/tests/java/text/CollationElementIteratorTest.java
rg/apache/harmony/tests/java/text/CollationKeyTest.java
rg/apache/harmony/tests/java/text/CollatorTest.java
rg/apache/harmony/tests/java/text/DataFormatFieldTest.java
rg/apache/harmony/tests/java/text/DateFormatSymbolsTest.java
rg/apache/harmony/tests/java/text/DateFormatTest.java
rg/apache/harmony/tests/java/text/DecimalFormatSymbolsTest.java
rg/apache/harmony/tests/java/text/DecimalFormatTest.java
rg/apache/harmony/tests/java/text/FieldPositionTest.java
rg/apache/harmony/tests/java/text/LoadLocaleProviderTestHelper.java
rg/apache/harmony/tests/java/text/MessageFormatFieldTest.java
rg/apache/harmony/tests/java/text/MessageFormatTest.java
rg/apache/harmony/tests/java/text/NormalizerTest.java
rg/apache/harmony/tests/java/text/NumberFormatFieldTest.java
rg/apache/harmony/tests/java/text/NumberFormatTest.java
rg/apache/harmony/tests/java/text/ParseExceptionTest.java
rg/apache/harmony/tests/java/text/ParsePositionTest.java
rg/apache/harmony/tests/java/text/RuleBasedCollatorTest.java
rg/apache/harmony/tests/java/text/SimpleDateFormatTest.java
rg/apache/harmony/tests/java/text/StringCharacterIteratorTest.java
rg/apache/harmony/tests/java/text/Support_DecimalFormat.java
rg/apache/harmony/tests/java/text/Support_Format.java
rg/apache/harmony/tests/java/text/Support_MessageFormat.java
rg/apache/harmony/tests/java/text/Support_SimpleDateFormat.java
767bb5d0a3671f64e90742e2974c1956ebd63447 23-Aug-2013 Elliott Hughes <enh@google.com> Remove bogus @test comments that confuse vogar.

They should be @tests, but they're useless anyway. (If there weren't
so many, I'd remove all the @tests comments too.)

Change-Id: I6d34a77c48d7d0bac075758453fd0d29f6f9901c
rg/apache/harmony/nio/tests/java/nio/channels/SelectorTest.java
84dc741f553e9f1f98456fe983bff2fb9914d727 20-Aug-2013 Elliott Hughes <enh@google.com> Fix java.util.Scanner bugs.

Also improve the documentation for java.util.regex.Matcher and unify the Scanner tests.

Bug: 10310707
Bug: https://code.google.com/p/android/issues/detail?id=40555

(cherry picked from commit 56ff05b16d4a82bc2386082409c78c3d94e0df01)

Change-Id: I4d7ff44a77768821970c9bab560d5facdb75e1b9
rg/apache/harmony/luni/tests/java/util/ScannerTest.java
56ff05b16d4a82bc2386082409c78c3d94e0df01 20-Aug-2013 Elliott Hughes <enh@google.com> Fix java.util.Scanner bugs.

Also improve the documentation for java.util.regex.Matcher and unify the Scanner tests.

Bug: 10310707
Bug: https://code.google.com/p/android/issues/detail?id=40555
Change-Id: I97bd8243845aaa31c084c8424eceb41bbcd8ebbd
rg/apache/harmony/luni/tests/java/util/ScannerTest.java
f5d8857b623192a985e449453de5bf1efaa4ea79 16-Aug-2013 Elliott Hughes <enh@google.com> Fix a bunch of Charset tests.

The isRegistered test is still failing. The problem is that icu4c's
convrtrs.txt has names like "windows-1252" that are both the canonical
name for one charset and an alias for another legacy charset. I need
to work out how to resolve that.

Bug: 10210999

(cherry picked from commit ea1caf4ccc5c2255f384c0774aa9e055763a6a41)

Change-Id: I83cf1b9ae1d29f9956f443ef914a3e473e0f4692
rg/apache/harmony/nio_char/tests/java/nio/charset/CharsetTest.java
ests/api/java/nio/charset/CharsetProviderTest.java
ests/api/java/nio/charset/CharsetTest.java
ests/api/java/nio/charset/UTFCharsetEncoderTest.java
ea1caf4ccc5c2255f384c0774aa9e055763a6a41 16-Aug-2013 Elliott Hughes <enh@google.com> Fix a bunch of Charset tests.

The isRegistered test is still failing. The problem is that icu4c's
convrtrs.txt has names like "windows-1252" that are both the canonical
name for one charset and an alias for another legacy charset. I need
to work out how to resolve that.

Bug: 10210999
Change-Id: If3425321c814622e4f54b2efca95a767bd16c080
rg/apache/harmony/nio_char/tests/java/nio/charset/CharsetTest.java
ests/api/java/nio/charset/CharsetProviderTest.java
ests/api/java/nio/charset/CharsetTest.java
ests/api/java/nio/charset/UTFCharsetEncoderTest.java
b8e456e3b6d9184d81760a9b68cd1103e610846a 14-Aug-2013 Elliott Hughes <enh@google.com> More Charset test fixes.

Bug: 10210999

(cherry picked from commit c44b103bfd1a79762811d2125e9b94ce37300a44)

Change-Id: If28d9e2eb3d1d148863f0a08c1e17371918fcaa2
ests/api/java/nio/charset/CharsetTest.java
c44b103bfd1a79762811d2125e9b94ce37300a44 14-Aug-2013 Elliott Hughes <enh@google.com> More Charset test fixes.

Bug: 10210999
Change-Id: Ie0686dae1e0b9dc016c1e99af8d9d4e146d73abd
ests/api/java/nio/charset/CharsetTest.java
5ec6bf8d033754e06a463adb091d2c0afd0755ac 08-Aug-2013 Elliott Hughes <enh@google.com> Fix various Charset tests, clean up the implementation.

Bug: 10211558
Bug: 10211378
Change-Id: Ib3f97430f62163c0459c53e0c282ae0ca840e0af
ests/api/java/nio/charset/CharsetEncoderTest.java
ests/api/java/nio/charset/CharsetTest.java
ests/api/java/nio/charset/GBCharsetEncoderTest.java
ests/api/java/nio/charset/ISOCharsetEncoderTest.java
ests/api/java/nio/charset/UTF16BECharsetEncoderTest.java
ests/api/java/nio/charset/UTF16CharsetDecoderTest.java
ests/api/java/nio/charset/UTF16CharsetEncoderTest.java
ests/api/java/nio/charset/UTF16LECharsetEncoderTest.java
ests/api/java/nio/charset/UTFCharsetEncoderTest.java
9a39ec1a7fd6a163f13e19b063a20d8c8b6c075b 07-Aug-2013 Elliott Hughes <enh@google.com> Fix GB-18030 tests.

Bug: 10211040
Change-Id: Icbfa37b930d475e47e86cd6168c303afe9351295
ests/api/java/nio/charset/CharsetProviderTest.java
ests/api/java/nio/charset/GBCharsetEncoderTest.java
b496276f087d57c46cc78ec60574899ebff573a6 07-Aug-2013 Elliott Hughes <enh@google.com> We never supported obsolete EBCDIC variants.

And we're unlikely to start. So lose the failing test.

Bug: 10211032
Change-Id: I36df7f5507b20a301b97ba2e9c2a3250c7de442f
ests/api/java/nio/charset/CP037CharsetTest.java
b274574b7e2681f4411852af9857b4540bf75841 02-Aug-2013 Elliott Hughes <enh@google.com> If libcore wants ASCII casing, it needs to ask for it like everyone else.

http://elliotth.blogspot.com/2012/01/beware-convenience-methods.html

Bug: https://code.google.com/p/android/issues/detail?id=58359
Change-Id: I597b2ac940f17b5b2bc176e390dc4b63fe0a4e72
rg/apache/harmony/nio_char/tests/java/nio/charset/CharsetTest.java
a117015b63e8f85115febb99afea5f8da09af301 02-Aug-2013 Elliott Hughes <enh@google.com> Fix PatternTest failures.

Bug: 10127357
Change-Id: I202e77d0ea0c8b407aca364ad81c8ae1f9c617ad
rg/apache/harmony/tests/java/util/regex/PatternTest.java
195c30902fd54c9e822183a19d570e15f0f8d007 02-Aug-2013 Elliott Hughes <enh@google.com> Fix PatternSyntaxExceptionTest.

The now-deleted copy had the serialization test code, but the other copy had
the serialization test data. Fixed by merging.

Bug: 10127357
Change-Id: Ie3b81b6cd00621965ab2a6a94dc3566df9751649
rg/apache/harmony/tests/java/util/regex/PatternSyntaxExceptionTest.java
9997a91c8624c5abd10a8da33f36debf0d773235 02-Aug-2013 Elliott Hughes <enh@google.com> Fix a CharsetEncoder test.

Bug: 10127357
Change-Id: I223fe74ed924ebb6cda22301c35bf42518532d74
rg/apache/harmony/nio_char/tests/java/nio/charset/CharsetEncoderTest.java
318d6de23bec3024a85eb211f5843d925774622a 01-Aug-2013 Elliott Hughes <enh@google.com> Minor cleanup from investigating UnixSelectorTest failures.

This doesn't address the failures, but I'm moving on to look at the
other failures first.

Bug: 10127357
Change-Id: I6382e843bcb0d3e4b8726500beba2b5e123e9e01
rg/apache/harmony/nio/tests/java/nio/channels/UnixSelectorTest.java
067e5d68f30887f1d53bf6afde6007beb749e2c5 01-Aug-2013 Elliott Hughes <enh@google.com> Fix a Selector bug and a test bug.

Bug: 10127357
Change-Id: I6d80586b243d6bd45fda5a36c043600d7528e891
rg/apache/harmony/nio/tests/java/nio/channels/SelectorTest.java
5c8452e1fca6a47ecbe71ac7f71e378b3be16ec7 27-Jun-2013 Elliott Hughes <enh@google.com> Improve Scanner performance.

We really don't want to compute a new regular expression and compile
it into a new Pattern every time we call nextInt (and friends). Adding
a single-element cache (flushed if the Scanner's locale changes) makes
this 100x faster. There still exists a pathological case where you
switch back and forth between bases.

Also improve the documentation to make it clearer that you really don't
want to use this awful class anyway.

Also bring back a few more of the tests we lost in the gingerbread timeframe.

Bug: https://code.google.com/p/android/issues/detail?id=57050
Change-Id: Id6095682fb44abae2887dda29dd3d32ac777c68f
rg/apache/harmony/luni/tests/java/util/ScannerParseLargeFileBenchmarkTest.java
rg/apache/harmony/luni/tests/java/util/ScannerTest.java
2f6885fcf86bbe5c122eb751a5dd31d15a1cfbc3 25-Jun-2013 Elliott Hughes <enh@google.com> Fix SelectorTest#test_selectJ_Empty_Keys flakiness.

Change-Id: I4acecd936075f226ae867d8b361ff422978af7de
rg/apache/harmony/nio/tests/java/nio/channels/SelectorTest.java
5700a9718eef20f4228ed97d54a59cc70bf40753 04-May-2013 Elliott Hughes <enh@google.com> Various regex test fixes.

Mostly test changes and some duplication removal, but I did turn up a couple of
small bugs.

Change-Id: I46f99cdf0cdb8a67d358c0acc03079360fe5c333
rg/apache/harmony/tests/java/util/regex/MatcherTest.java
rg/apache/harmony/tests/java/util/regex/Pattern2Test.java
rg/apache/harmony/tests/java/util/regex/PatternErrorTest.java
rg/apache/harmony/tests/java/util/regex/PatternTest.java
bfd68b1dd4409f61fbc6800ba61f4605ad57945b 04-May-2013 Elliott Hughes <enh@google.com> Add the harmony regex tests.

Change-Id: Ia98563f4485ee13210f7fb02a08806e2ffd553e0
rg/apache/harmony/tests/java/util/regex/Matcher2Test.java
rg/apache/harmony/tests/java/util/regex/MatcherTest.java
rg/apache/harmony/tests/java/util/regex/ModeTest.java
rg/apache/harmony/tests/java/util/regex/Pattern2Test.java
rg/apache/harmony/tests/java/util/regex/PatternErrorTest.java
rg/apache/harmony/tests/java/util/regex/PatternSyntaxExceptionTest.java
rg/apache/harmony/tests/java/util/regex/PatternTest.java
rg/apache/harmony/tests/java/util/regex/ReplaceTest.java
rg/apache/harmony/tests/java/util/regex/SplitTest.java
56ddb0af9c75dca21f10cd26e73b9f301c58771e 03-May-2013 Elliott Hughes <enh@google.com> Add harmony java.nio.charset tests.

Change-Id: I713069b35865cc01f5ed2f384dbc50b39d8a9346
rg/apache/harmony/nio_char/tests/java/nio/charset/ASCIICharsetEncoderTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/CharacterCodingExceptionTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/CharsetDecoderTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/CharsetEncoderTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/CharsetTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/CoderMalfunctionErrorTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/IllegalCharsetNameExceptionTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/MalformedInputExceptionTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/UnmappableCharacterExceptionTest.java
rg/apache/harmony/nio_char/tests/java/nio/charset/UnsupportedCharsetExceptionTest.java
ests/api/java/nio/charset/ASCCharsetDecoderTest.java
ests/api/java/nio/charset/ASCCharsetTest.java
ests/api/java/nio/charset/AbstractCharsetTestCase.java
ests/api/java/nio/charset/CP037CharsetTest.java
ests/api/java/nio/charset/CharsetDecoderTest.java
ests/api/java/nio/charset/CharsetEncoderTest.java
ests/api/java/nio/charset/CharsetProviderTest.java
ests/api/java/nio/charset/CharsetTest.java
ests/api/java/nio/charset/CoderResultTest.java
ests/api/java/nio/charset/CodingErrorActionTest.java
ests/api/java/nio/charset/GBCharsetDecoderTest.java
ests/api/java/nio/charset/GBCharsetEncoderTest.java
ests/api/java/nio/charset/ISOCharsetDecoderTest.java
ests/api/java/nio/charset/ISOCharsetEncoderTest.java
ests/api/java/nio/charset/ISOCharsetTest.java
ests/api/java/nio/charset/UTF16BECharsetDecoderTest.java
ests/api/java/nio/charset/UTF16BECharsetEncoderTest.java
ests/api/java/nio/charset/UTF16BECharsetTest.java
ests/api/java/nio/charset/UTF16CharsetDecoderTest.java
ests/api/java/nio/charset/UTF16CharsetEncoderTest.java
ests/api/java/nio/charset/UTF16CharsetTest.java
ests/api/java/nio/charset/UTF16LECharsetDecoderTest.java
ests/api/java/nio/charset/UTF16LECharsetEncoderTest.java
ests/api/java/nio/charset/UTF16LECharsetTest.java
ests/api/java/nio/charset/UTF8CharsetTest.java
ests/api/java/nio/charset/UTFCharsetDecoderTest.java
ests/api/java/nio/charset/UTFCharsetEncoderTest.java
ebdccfc7af8ac92f2b0ee158bbedf8d345baa49d 02-May-2013 Elliott Hughes <enh@google.com> Add the harmony BufferedReaderTest.

Bug: 8778372
Change-Id: I10145bdfd90320da7d3ecd08404c4625495cec32
rg/apache/harmony/luni/tests/java/io/BufferedReaderTest.java
105a9405b2e059352185f9ca1138cc8480ccb9bc 27-Apr-2013 Elliott Hughes <enh@google.com> Fix various of the harmony nio tests.

Plus one real bug, in FileChannelImpl. The expectation I've removed was for a
test that doesn't seem to exist in either our tests or the harmony tests.

Change-Id: I1ea99042f3f8897f07ba8b4ad8e9a15f30ace79b
rg/apache/harmony/nio/tests/java/nio/WrappedCharBufferTest2.java
rg/apache/harmony/nio/tests/java/nio/channels/SourceChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/spi/AbstractInterruptibleChannelTest.java
dce2b2fa9d6b26414a8d5a55918e4d7ca2ab1baa 27-Apr-2013 Elliott Hughes <enh@google.com> Add the harmony nio tests.

Change-Id: I8a6d167743b20f31e769fe57d3aba89e16de24c3
rg/apache/harmony/nio/tests/java/nio/AbstractBufferTest.java
rg/apache/harmony/nio/tests/java/nio/BufferOverflowExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/BufferUnderflowExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/ByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ByteOrderTest.java
rg/apache/harmony/nio/tests/java/nio/CharBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DirectByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DirectCharBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DirectDoubleBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DirectFloatBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DirectIntBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DirectLongBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DirectShortBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DoubleBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DuplicateDirectByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DuplicateHeapByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/DuplicateWrappedByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/FloatBufferTest.java
rg/apache/harmony/nio/tests/java/nio/HeapByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/HeapCharBufferTest.java
rg/apache/harmony/nio/tests/java/nio/HeapDoubleBufferTest.java
rg/apache/harmony/nio/tests/java/nio/HeapFloatBufferTest.java
rg/apache/harmony/nio/tests/java/nio/HeapIntBufferTest.java
rg/apache/harmony/nio/tests/java/nio/HeapLongBufferTest.java
rg/apache/harmony/nio/tests/java/nio/HeapShortBufferTest.java
rg/apache/harmony/nio/tests/java/nio/IntBufferTest.java
rg/apache/harmony/nio/tests/java/nio/InvalidMarkExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/LongBufferTest.java
rg/apache/harmony/nio/tests/java/nio/MappedByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyBufferExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyCharBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyDirectByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyDoubleBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyFloatBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyHeapByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyHeapCharBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyHeapDoubleBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyHeapFloatBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyHeapIntBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyHeapLongBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyHeapShortBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyIntBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyLongBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyShortBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyWrappedByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyWrappedCharBufferTest1.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyWrappedDoubleBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyWrappedFloatBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyWrappedIntBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyWrappedLongBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ReadOnlyWrappedShortBufferTest.java
rg/apache/harmony/nio/tests/java/nio/ShortBufferTest.java
rg/apache/harmony/nio/tests/java/nio/SliceDirectByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/SliceHeapByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/SliceWrappedByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/WrappedByteBufferTest.java
rg/apache/harmony/nio/tests/java/nio/WrappedCharBufferTest1.java
rg/apache/harmony/nio/tests/java/nio/WrappedCharBufferTest2.java
rg/apache/harmony/nio/tests/java/nio/WrappedDoubleBufferTest.java
rg/apache/harmony/nio/tests/java/nio/WrappedFloatBufferTest.java
rg/apache/harmony/nio/tests/java/nio/WrappedIntBufferTest.java
rg/apache/harmony/nio/tests/java/nio/WrappedLongBufferTest.java
rg/apache/harmony/nio/tests/java/nio/WrappedShortBufferTest.java
rg/apache/harmony/nio/tests/java/nio/channels/AlreadyConnectedExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/AsynchronousCloseExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/CancelledKeyExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/ChannelsTest.java
rg/apache/harmony/nio/tests/java/nio/channels/ClosedByInterruptExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/ClosedChannelExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/ClosedSelectorExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/ConnectionPendingExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/FileChannelLockingTest.java
rg/apache/harmony/nio/tests/java/nio/channels/FileChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/FileLockInterruptionExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/FileLockTest.java
rg/apache/harmony/nio/tests/java/nio/channels/IllegalBlockingModeExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/IllegalSelectorExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/MapModeTest.java
rg/apache/harmony/nio/tests/java/nio/channels/MockServerSocketChannel.java
rg/apache/harmony/nio/tests/java/nio/channels/MockSocketChannel.java
rg/apache/harmony/nio/tests/java/nio/channels/NoConnectionPendingExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/NonReadableChannelExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/NonWritableChannelExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/NotYetBoundExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/NotYetConnectedExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/OverlappingFileLockExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/PipeTest.java
rg/apache/harmony/nio/tests/java/nio/channels/SelectableChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/SelectionKeyTest.java
rg/apache/harmony/nio/tests/java/nio/channels/SelectorTest.java
rg/apache/harmony/nio/tests/java/nio/channels/ServerSocketChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/SinkChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/SocketChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/SourceChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/UnixSelectorTest.java
rg/apache/harmony/nio/tests/java/nio/channels/UnresolvedAddressExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/UnsupportedAddressTypeExceptionTest.java
rg/apache/harmony/nio/tests/java/nio/channels/spi/AbstractInterruptibleChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/spi/AbstractSelectableChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/spi/AbstractSelectionKeyTest.java
rg/apache/harmony/nio/tests/java/nio/channels/spi/AbstractSelectorTest.java
rg/apache/harmony/nio/tests/java/nio/channels/spi/MockAbstractSelector.java
d0d215d5a6cf237f829908b3921a630bbe46f0e4 26-Apr-2013 Elliott Hughes <enh@google.com> Add the harmony annotation tests.

Change-Id: Ibbca52bae20e24e2d76d038d85e1ff5411ffc523
rg/apache/harmony/annotation/tests/java/lang/annotation/AnnotationFormatErrorTest.java
rg/apache/harmony/annotation/tests/java/lang/annotation/AnnotationTypeMismatchExceptionTest.java
rg/apache/harmony/annotation/tests/java/lang/annotation/ElementTypeTest.java
rg/apache/harmony/annotation/tests/java/lang/annotation/IncompleteAnnotationExceptionTest.java
rg/apache/harmony/annotation/tests/java/lang/annotation/RetentionPolicyTest.java
8658a3f1236f1801f00b9416c9294486a125faae 25-Apr-2013 Elliott Hughes <enh@google.com> Fix a bug in DatagramChannel.send.

Calling sendto(2) binds your socket as a side-effect, but we'd still
report false from isBound.

Also bring in the harmony tests that would have caught this earlier.

Change-Id: I26baa15c8178edab9136a37742faddd11f381c7b
rg/apache/harmony/nio/tests/java/nio/channels/DatagramChannelTest.java
rg/apache/harmony/nio/tests/java/nio/channels/MockDatagramChannel.java
b2da4ac2b5c8ddedf5e08aed31481471e408da5f 24-Apr-2013 Elliott Hughes <enh@google.com> Reads from /dev/urandom can't really block.

Move RandomBitsSupplier into its only caller. Bring over the harmony UUIDTest.
Switch the SHA1_Data constants over to the more modern static import idiom.

Bug: https://code.google.com/p/android/issues/detail?id=54168
Change-Id: I4e659e252ab43f481f39d003cf373100c84013d7
rg/apache/harmony/luni/tests/java/util/UUIDTest.java
3e0dd60f27f63195548bbc87669bd361fd1f1bc2 19-Apr-2013 Elliott Hughes <enh@google.com> Fix an outdated BigInteger test.

I fixed BigInteger's behavior recently, so this test needs to change.

Change-Id: I2cafa987ef290afd2a56f910d58b7a9a21b2d9e0
rg/apache/harmony/tests/java/math/BigIntegerConstructorsTest.java
b5ccf74bdea2d417d9e4820945fe3ba1f636a0d2 09-Apr-2013 Elliott Hughes <enh@google.com> Fix BigInteger test failures.

We were hitting a couple of OpenSSL bugs. I've reported them upstream, and
work around them in the meantime.

Bug: 2943474
Change-Id: Ia06bcf3025f525a954d9b918669d09531631a266
rg/apache/harmony/tests/java/math/BigIntegerConstructorsTest.java
ests/api/java/math/BigIntegerTest.java
053490cb125225453fd17ec42653595233365249 08-Apr-2013 Elliott Hughes <enh@google.com> Fix two tests that weren't passing on Android or the RI.

Change-Id: I8d3cc490a24211ffaff1bafec835f6dbbd877920
rg/apache/harmony/tests/java/math/BigDecimalCompareTest.java
81ccea015ba3d2a2da1c641b14dd3713c6b40a76 05-Apr-2013 Elliott Hughes <enh@google.com> Move the external/apache-harmony/math tests into libcore.

Change-Id: Ic4acfcf8553e0108e6ad127afa2745bb551acba3
rg/apache/harmony/tests/java/math/BigDecimalArithmeticTest.java
rg/apache/harmony/tests/java/math/BigDecimalCompareTest.java
rg/apache/harmony/tests/java/math/BigDecimalConstructorsTest.java
rg/apache/harmony/tests/java/math/BigDecimalConvertTest.java
rg/apache/harmony/tests/java/math/BigDecimalScaleOperationsTest.java
rg/apache/harmony/tests/java/math/BigIntegerAddTest.java
rg/apache/harmony/tests/java/math/BigIntegerAndTest.java
rg/apache/harmony/tests/java/math/BigIntegerCompareTest.java
rg/apache/harmony/tests/java/math/BigIntegerConstructorsTest.java
rg/apache/harmony/tests/java/math/BigIntegerConvertTest.java
rg/apache/harmony/tests/java/math/BigIntegerDivideTest.java
rg/apache/harmony/tests/java/math/BigIntegerHashCodeTest.java
rg/apache/harmony/tests/java/math/BigIntegerModPowTest.java
rg/apache/harmony/tests/java/math/BigIntegerMultiplyTest.java
rg/apache/harmony/tests/java/math/BigIntegerNotTest.java
rg/apache/harmony/tests/java/math/BigIntegerOperateBitsTest.java
rg/apache/harmony/tests/java/math/BigIntegerOrTest.java
rg/apache/harmony/tests/java/math/BigIntegerSubtractTest.java
rg/apache/harmony/tests/java/math/BigIntegerToStringTest.java
rg/apache/harmony/tests/java/math/BigIntegerXorTest.java
ests/api/java/math/BigDecimalTest.java
ests/api/java/math/BigIntegerTest.java