OSDN Git Service

Add Java 6's ResourceBundle/Properties API.
authorElliott Hughes <enh@google.com>
Wed, 31 Mar 2010 20:59:55 +0000 (13:59 -0700)
committerElliott Hughes <enh@google.com>
Wed, 31 Mar 2010 20:59:55 +0000 (13:59 -0700)
commita69373087dd57f2595e7bf53bff9feb054d0a11f
treeac26e22b4b605f138cf1fbb496e340590c1816f3
parent4a02270316298ef47ca5422d2a9abce8d0b94d23
Add Java 6's ResourceBundle/Properties API.

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
libcore/luni/src/main/java/java/util/ListResourceBundle.java
libcore/luni/src/main/java/java/util/Properties.java
libcore/luni/src/main/java/java/util/PropertyResourceBundle.java
libcore/luni/src/main/java/java/util/ResourceBundle.java
libcore/luni/src/main/java/org/apache/harmony/luni/internal/nls/messages.properties
libcore/luni/src/main/java/org/apache/harmony/luni/util/ExternalMessages.properties
libcore/luni/src/test/java/tests/api/java/util/PropertiesTest.java
libcore/luni/src/test/java/tests/api/java/util/ResourceBundleTest.java
libcore/security/src/test/java/org/apache/harmony/security/tests/java/security/ProviderTest.java