| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These new tests focusi on areas where I am making OpenSSL
implementation chages, where I found differences from the RI when
working on that code, and places where we were missing functionality
compared to the spec. They all work on the RI, many fail on Dalvik
luni/src/test/java/javax/net/ssl/AllTests.java
luni/src/test/java/javax/net/ssl/SSLContextTest.java
luni/src/test/java/javax/net/ssl/SSLSessionContextTest.java
luni/src/test/java/javax/net/ssl/SSLSessionTest.java
luni/src/test/java/javax/net/ssl/SSLSocketFactoryTest.java
luni/src/test/java/javax/net/ssl/SSLSocketTest.java
Adding my javax.net.ssl.AllTests to the main list
luni/src/test/java/tests/AllTests.java
Adding Bouncy Castle provider /usr/share/java/bcprov.jar to host
classpath for testing with --java-home /usr/lib/jvm/java-6-openjdk
tools/runner/java/dalvik/runner/JavaVm.java
Fix usage comment to reboot to bootloader
run-core-tests
Change-Id: I7a7998fc7bedc7a00b1836517d043c6a27c8bd4d
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
New implementation, documentation, and tests, very loosely based on the harmony
code.
We can't run the harmony or jtreg tests because we don't have the infrastructure.
My test just tests the most obvious use cases, on the assumption that at some
point we'll get the other test suites working; quite possibly before anyone ever
wants to use this stuff on Android.
(We might want to switch over existing META-INF/services/ code to use
ServiceLoader. I've raised http://b/2567593 for this.)
Bug: 2497395
Change-Id: I62b0ac4748204555d3ba9356794a72aff4f4f01e
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These specialized methods are little used, and in several cases ICU itself
just returns the list of locales, but that's ICU's business, not ours. As
long as ICU is in charge of our locale-specific data, it should be responsible
for answering questions about what locale-specific data is available...
Change-Id: Idc8a66bbf7fcbc6b06e30929e6a7af3fe30ab7d1
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
harmony's tests and my code, though ICU4C does all the hard work.
I've added a test of my own to demonstrate some weird RI behavior (that I've
emulated in our implementation).
Bug: 2497395
Change-Id: I8146f72a8a3204449ee3d0d9065dadc1c1c77fcc
|
| | |
| | |
| | |
| | | |
Change-Id: I15f932bc246ebc7fec9471a873bef8bd58ef15fc
|
|\ \ \
| |/ /
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I've pretty much taken the upstream ResourceBundle implementations
as-is, putting back our string-to-locale conversion, removing a bit
of duplication and non-free, non-spec EBCDIC support, and hard-coding
the text of the MissingResourceExceptions (since harmony's changed
its message catalog from ours, so I had to touch those bits of the
code anyway).
(Why haven't I bothered to pay much attention to the resource bundle
implementations? Because I already rewrote our only code that was
using them to not use them, and third-party developers should be
using Android's resource system instead. There's very little chance
anyone needs Java resource bundles. I paid some attention to Properties,
because they're still somewhat useful.)
Also remove various unused messages, and update our tests. I've mostly
_not_ taken the upstream tests, because it would require a lot of work
that we'll be doing anyway when we switch to using their test suite
properly.
I ran the jtreg tests we're able to run, and the normal-case ones (plus
the stress test) seemed okay.
Bug: 2497395
Change-Id: I91606df0dc1a45e6974fbb27a0d334af87254f0b
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
Also correct two javadoc mistakes I added, and bring back the latest harmony
java6 CalendarTest.
Bug: 2497395
Change-Id: If481390948ca93d5f709a8ed4585991889de9f8b
|
| |
| |
| |
| |
| |
| | |
Removing cruft and renaming things.
Change-Id: I317726c40a1addf3a1ad9d905239438424082549
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the Java array allocation in InetAddress.cpp failed, we'd free NULL instead of the
previously-allocated structure. This is a new bug in froyo, but only happens in out of
memory situations, so doesn't seem worth fixing there.
Unrelatedly, let's disallow assignment and copying of all our RAII classes. This isn't
a mistake I've seen made, but it's easy to protect against, so we may as well do so
consistently.
Change-Id: I2433b31ff983d388788b09e59e08d661f1725ecd
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rather than try to be clever with header files (which didn't work with glibc
for the sim build) let's make Math.copySign have the StrictMath behavior,
and have StrictMath call Math. (The other way round, though it might seem
more logical, wouldn't solve the problem. We already have numerous cases of
StrictMath calling Math anyway.)
Change-Id: Ifff065ddc8fbd5d5f8d4d5b67bc9ac07a719eb00
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
StrictMath's copySign method is defined to treat all NaNs as positive, regardless
of their sign bit. Rather than add yet more code on the Java side (which already
called down to native code three times), let's just make one call to native code.
This change fixes failures in already-committed StrictMath tests.
The only other potential instances of this class of error were in the
max and min methods, but they all handle NaNs before calling
(double|float)To(Raw)?LongBits, so the choice there really is arbitrary.
Change-Id: I439dbdff9068cb420b78a6330cde9d7d0d12c0ef
|
| |
| |
| |
| |
| |
| | |
(I introduced this in https://android-git.corp.google.com/g/46305.)
Change-Id: I100202fc18e246dd7b66870ce75543642505336d
|
| |
| |
| |
| |
| |
| |
| | |
They didn't add a test for this; supposedly it fixed a flaky AWT test. But
the change looks plausible.
Change-Id: I358849a20d5e38d01d6c77a4c335002bb7bba095
|
| |
| |
| |
| |
| |
| |
| | |
I couldn't find any more that were using getClass() rather than
getClass().getName().
Change-Id: I30b375748d36bc36d1e6999349fc472496456746
|
|\ \
| |/
| |
| |
| |
| |
| | |
Merge commit 'ec7c8c98a4094580224eb9c400249c5c0984cf29' into dalvik-dev
* commit 'ec7c8c98a4094580224eb9c400249c5c0984cf29':
Fix java.util.Random's constructors.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Subclasses rely on having their overridden setSeed called by Random's
constructors, and the RI actually documents this behavior. (The
documentation even changed between Java 5 and Java 6 to make it _more_
explicit.)
This patch keeps that part of I6239d93bb46876ef1c4a5e155a6dc1ac6fab4eae
that improved our randomness, but reverts the attempt to fix Random's
uncouth behavior.
Also a regression test so we don't try to fix Random again in future.
Bug: 2502231
Change-Id: Ieea1009145c74eac9475c0cd5066dabad20eb114
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
DecimalFormatSymbols.
This patch also improves the documentation of all getAvailableLocales methods
to clarify exactly what "available" means. Note that at the moment, many of
our implementations just return Locale.getAvailableLocales. It turns out that
ICU does the same in most cases, but I'll come back in a separate patch and
add code so we just pass these down to ICU, and wash our hands of the matter.
I've rewritten DateFormatSymbols.equals, which was very wrong. The time zone
names comparison had an invalid optimization, and its slow-path loop was wrong
too: it only ever tested values against themselves, which isn't likely to have
been the author's intention.
I've added toString overrides to DateFormatSymbols and DecimalFormatSymbols,
because I need them every time I work on these classes.
I've made the constants in DecimalFormatSymbols static final, and given them
idiomatic names. (I still think we might benefit from breaking these into
separate fields, as in the serialized form, but that's a separate issue.)
Finally, and unrelatedly, I've added a comment to BreakIteratorProvider that
I missed in my last change to that file.
Change-Id: I5d6cb30f9afdb502d38353d8a624dc2f0fef41ac
|
|\ \
| | |
| | |
| | | |
dalvik-dev
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These were clearly added just to shut up our own warning, and are now
unnecessary and misleading to future maintainers.
There's one barely-related change: InputStreamReader and OutputStreamWriter
are very similar, and this patch makes them more similar, and adds a few
missing modifiers from their fields.
Change-Id: I959011f914ff215e92bbfa41c1bac66465803685
|
|\ \ \
| |/ /
|/| /
| |/
| |
| |
| | |
Merge commit 'b7b9be1343b59b429b6de9b28ffffbbbde8478c2' into dalvik-dev
* commit 'b7b9be1343b59b429b6de9b28ffffbbbde8478c2':
Improve java.net.InetAddress.getLocalHost documentation.
|
| |
| |
| |
| |
| | |
Bug: 1518707
Change-Id: I741a7a28325320949e84e997e6a49d3356c9a308
|
| |
| |
| |
| |
| |
| | |
Everyone seems to agree these have outlived their usefulness.
Change-Id: Ia2a53ffa1f9498333b4b2d51d5c1db488b89abaf
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We don't currently use these, and don't necessarily plan to. Full support
would have a run-time cost, and it's not obvious that it would be particularly
useful.
Code search can't actually find any users of this stuff in the wild outside
of the various VM implementations and their test suites.
Bug: 2497395
Change-Id: Ie25aef73ece6d1fd169fdcb7b2f847761d77914d
|
| |
| |
| |
| |
| |
| |
| | |
I've fixed a few typos, and removed a few of the more egregiously nonsensical
or incorrect comments that were nearby.
Change-Id: I35851baebd532f949cc269f4738a26eeb9b6e697
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I've kept our binary search implementation and just generalized the
interface.
I've gone out of my way to preserve exception priority. I know we don't
agree that it's necessary, but it is important if we want to be able to
run other people's tests. If someone wants to write a new high-quality
test suite (which would be a great thing to have), we should remove the
hacks. (I've commented them.) Otherwise, I've gone out of my way to keep
the near-duplicates forced on us by Java's primitive type system as
identical as possible.
This passes all harmony and jtreg tests.
Change-Id: I91fbf707dac76124c6dbe59b0b30b7ded9a69529
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Format and NumberFormat's bogusly-public constructors became protected with
Java 6. DecimalFormat gained more control over rounding behavior. There's a
slight mismatch with our ICU4C-based implementation in that ICU4C doesn't
support RoundingMode.UNNECESSARY, so I've had to fake that (but I doubt it's
used much, if at all).
I've pulled out the obviously Android-specific tests from the harmony
DecimalFormatTest.java, but I've only brought back the rounding mode changes
from the current harmony code to avoid the new tests' dependencies. I've also
added one new test of my own, to check that setMaximumFractionDigits affects
rounding as it should (since the harmony tests don't test this, and it's
somewhat subtle).
Bug: 2497395
Change-Id: Ifafc8bb051e078ead988073281f5c33f0aeb130a
|
| |
| |
| |
| |
| |
| |
| |
| | |
(The harmony ScannerTest.java is quite different from ours, and doesn't test
this trivial method anyway.)
Bug: 2497395
Change-Id: I8b2b3db7233f766ef70bfdbfdcdfbd0f23e4bdb4
|
| |
| |
| |
| |
| |
| |
| |
| | |
Also bring back the latest harmony java6 branch tests, and modify them to pass
with our deliberate [spec-compliant] exception changes.
Bug: 2497395
Change-Id: Ifb3f9bf48f8eec4120f9e59b03beb3969cfe0cd3
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also bring back the latest harmony java6 tests. We fail two of these tests,
but this is not a regression caused by this patch: our existing code fails
the same tests in the same way, so we already had the bugs and just didn't
know.
Bug: 2497395
Change-Id: I70412cdea747c30ea8d19a55d2ae5e73d3c59c1a
|
| |
| |
| |
| |
| |
| |
| | |
Also bring back the latest harmony java6 branch tests.
Bug: 2497395
Change-Id: I242e9a7d0446b46faaa5b28e0348806e999d8fdf
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is actually functional, if you're in the mood to "adb shell".
The implementation is based on harmony's, but with the initialization and
native code rewritten, with readPassword responsible for echoing a newline (so
we don't have to play silly tricks with the ECHONL flag), and a vastly
simplified ConsoleReader class. I've also rewritten the documentation.
Change-Id: I902b47fb27a8fdb2d6f067bb905ee02c6a10e454
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | | |
Merge commit '288de8e67b5a2c2e6a19372a2b99f17ca17de2fa' into dalvik-dev
* commit '288de8e67b5a2c2e6a19372a2b99f17ca17de2fa':
Replace a use of index with strchr.
|
| | |
| | |
| | |
| | | |
Change-Id: I2c1238bc1bd0945533712d0d74a761721b8408a3
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
(This is just preliminary to what I really want to do, which is vastly
reduce the number of near-duplicate methods we have: all the send/recv
variants, for example.)
Change-Id: Ib03653820a18f55aea6c5b876c397afd281a98dc
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | | |
Bug: 2509206
Change-Id: I72a34e1f80fd6936d255b94daf5683cc2a0f2327
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
IOError and IOException are just copied from harmony. The native code
is all our own, and the File code is rewritten to match our earlier
changes. FileTest gains more tests for the new methods' behavior with
File("").
We still can't test most of this stuff directly because we run our tests
as root. Manual inspection looks good, though, and I've raised a bug
for switching our tests over to run as a non-root user.
I've removed all the Java 6 exceptions from expectations.txt because
we plan on fixing them all, and almost all of the ones mentioned there
are already addressed anyway.
Bug: 2497395
Change-Id: I517cd2d871bff64d63b2f4eb80fda4cfd6d19cd8
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As well as avoiding unnecessary work, this also means we can reuse the native
code we already have for ioctl(FIONREAD), though we need to change the
interface to take FileDescriptor rather than int, and extract the int on the
native side.
Change-Id: I4c6d9e4e72e514e3e7872c7f882bda5441059915
|
| |
| |
| |
| |
| |
| | |
match Java 6.
Change-Id: Ia8ae90634bfb3680c8e82e4e4cf7f7459263c3d3
|
| |
| |
| |
| |
| |
| |
| |
| | |
There's already a perfectly good exception to throw when we see
a format conversion we don't understand, and my assertion prevented
us from getting to the code that would have thrown it.
Change-Id: I38fdd95482a3d48e26b68b045444f45e94ffc26f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Removes duplication, fixes typos, and removes some unnecessary object creation.
Note that otherwise-duplicated code that calls a native method needs to remain
duplicated, because the native methods have different implementations. Other
than that, it's not clear to me that the remaining textual differences (mainly
scalb and its implementation details) are meaningful, but it's not clear that
they're not, so I'm leaving them for now. We can always come back later.
This new code still passes all the junit and jtreg tests.
Change-Id: Ica28a01fd1469a162e05deccdb9e6f919246d9f3
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There's some ugliness here I want to remove, but it'll be less confusing if
I commit the upstream code first without my changes...
...that said, I've reverted the upstream Math.pow change because it it's just
cruft; we already pass their tests and jtreg's more thorough pow tests (see
http://blogs.sun.com/darcy/entry/finding_a_bug_in_fdlibm). My guess is that
their real problem was that they were using the buggy fdlibm 5.2 until after
they made the Math.pow change. We've always used 5.3, so we were fine.
Change-Id: I5a6c080d9fd6b60dc7bf77ac10096a913766f512
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Our sholes continuous build is having XML trouble with a FormatterTest
failure that outputs ASCII NUL. Ideally, our junit test runner would escape
all non-printable ASCII as \u escapes, but this seems like a minimal change,
and it's one we already have in the equivalent jtreg code.
Change-Id: Ib9b3219c25515fb358c204d45cb5064293a85b9f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
OpenSSL's BN library accepts pretty much all input, so if we want to follow
Java's rules, we have to implement them ourselves.
(The FormatterTest change is unrelated and fixes outstanding build breakage
caused by me.)
Bug: http://code.google.com/p/android/issues/detail?id=7036
Change-Id: I0f5413b56fad9289644927672bebf7c3d57e8042
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I rewrote the documentation for Double, Enum, and Float, but the "code" is the
same as harmony's. I rewrote the String code and wrote some tests to ensure
that a malicious Charset can't subvert String immutability.
I've also extracted the Android-specific bits of StringTest (which weren't
testing String at all) and brought back the latest harmony StringTest.java.
(The Class and Package changes are just to placate our API comparison tools.)
Bug: 2497395
Change-Id: Id57bda806891c3c85adfcb3b85eea8a8fad2c7b4
|
|\ \
| |/
| |
| |
| |
| |
| | |
Merge commit '40bd3d28fb2f34f060e7413cc19eeeb195c0ff90' into dalvik-dev
* commit '40bd3d28fb2f34f060e7413cc19eeeb195c0ff90':
Work around droiddoc bug http://b/2022288.
|
| |
| |
| |
| | |
Change-Id: Ib46a260916dee99f190aa8b9465f4f2d3b04aa67
|