History log of /libcore/ojluni/src/main/java/java/text/DateFormatSymbols.java
Revision Date Author Comments
6975f84c2ed72e1e26d20190b6f318718c849008 01-Mar-2017 Tobias Thierer <tobiast@google.com> Make Android patch docs in ojluni more consistent with style guide

This CL consists of an automated and a manual part (originally
reviewed as separate CLs, then squashed together before submitting
in order to minimize the number of times each Android-changed line
is touch, since that makes future git archaeology on these simpler).

Automated part: Run the following command (performs regex replacements):

find ojluni -name \*\.java | xargs sed -i \
-e 's/Android[- ]changed/Android-changed/ig' \
-e 's/Android-changed :/Android-changed:/g' \
-e 's/Android-changed \(BEGIN\|END\)/\1 Android-changed/g' \
-e 's/Android-changed - /Android-changed: /g' \
-e 's/Android[- ]removed/Android-removed/ig' \
-e 's/Android-removed :/Android-removed:/g' \
-e 's/Android-removed \(BEGIN\|END\)/\1 Android-removed/g' \
-e 's/Android-removed - /Android-removed: /g' \
-e 's/Android[- ]added/Android-added/ig' \
-e 's/Android-added :/Android-added:/g' \
-e 's/Android-added \(BEGIN\|END\)/\1 Android-added/g' \
-e 's/Android-added - /Android-added: /g' \
-e 's/----- \(BEGIN\|END\) android\( -----\)\?/\1 Android-changed/g' \
-e 's/\/\* \(BEGIN\|END\) Android-changed \*\//\/\/ \1 Android-changed/g'

Manual part: Move BEGIN Android-* lines out of block comments

Some Android-{changed,removed,added} lines occurred inside block comments.
This CL targets places in ojluni that contained the String "* BEGIN Android-"

Changes made by this CL include:

- Move the "BEGIN Android-" line into a line comment (the style guide
mandates that "Android-" lines are always in line comments). In many
cases, that line comment is immediately followed by a block comment
holding commented-out upstream code.
- Add corresponding "// END Android-" line comments, where missing.
- Drop documented import changes altogether. These create noise for
little benefit:
(1.) Most import problems will be found at compile time
(2.) They generally correspond to documented changes elsewhere in
the file.
- In most cases, the phrasing of comments and the decision whether to
keep commented out upstream code was not changed by this CL.
- Some additional tweaks were made in line with the style guide.

No attempt was made to:

- Verify that commented-out upstream code actually matches the
current upstream.
- Make any fixes (eg. to comments) that would have required
git archaeology (looking up historic commits).

Bug: 35841464
Test: make droid cts update-api

Change-Id: Ibc60979cb6061cfb0e9c7096cc9dcab30ddfa733
92924f23a03635bb194b6481c4a950e6414ca4e4 04-Oct-2016 Neil Fuller <nfuller@google.com> Removal of text/util spi classes and references

This commit contains changes to docs and code.

Reasoning:

The changes made in Android to delegate through to ICU for
various I18N concerns make it unlikely that Android could
support the SPI code without substantial testing.

Explicitly removing the code and docs removes the
pretence / confusion over Android support for pluggable
locale data. It has definite code-size impact and will have
a slight runtime performance improvement.

Changes:

The docs previously referenced SPI classes that are not
public on Android. These references and associated
conditional text have been removed. Some references to
methods returning at least Locale.US have also been
removed because Android provides a larger set.

Code related to calls to the LocaleServiceProviderPool
has been removed or commented. The SPI classes and internal
support classes have been deleted.

Some additional "Android-changed" markers have been made
to highlight Android changes associated with the use of ICU
and/or preexisting removal of the SPI.

Bug: 31851669
Test: Ran CtsLibcoreTestCase and make checkbuild
Change-Id: I262b33f2c88d88dbb0c2f1d2b116952dc4e046e3
f3bc8265e6a02900b151c36aff8361ac3d1e8a7c 15-Jul-2016 Joachim Sauer <jsauer@google.com> Fix DateFormatSymbols.equals()/.hashCode()

DateFormatSymbols was always calculating/loading zoneStrings in its
equals() and hashCode() methods, even when in most cases it wasn't
needed.

Additionally .hashCode() depended only on the values for the first
timezone in zoneNames, which is a poor indicator of similarity (see the
order of field comparisons in equals() for a more useful approach).

hashCode() has been modified to be in sync with the current OpenJDK 8
implementation, as there was no obvious reason to divert from it (we
now cache the calculated hashCode and reset it when necessary).

The only deviation from the OpenJDK code is that the zone strings are
not included in the hashCode() to avoid populating it in the majority
of cases where they are not needed and that equals() tries to avoid
populating them when it knows it to be unnecessary.

This is in preparation of a future commit that should remove the use of
zoneStrings except in cases where user code explicitly sets them with
setZoneStrings().

Note that despite this work, DateFormatSymbols is still not a good
candidate for use as a key in a Map, as it is mutable.

Test: vogar libcore/luni/src/test/java/libcore/java/text/DateFormatSymbolsTest.java
Bug: 20879084
Change-Id: I7f8adc48a21ec394cef5488dd9231807be4f0a4d
49965c1dc9da104344f4893a05e45795a5740d20 30-Jun-2016 Ganesh Mahendran <opensource.ganesh@gmail.com> remove x attribute of java file

java file does not need x attribute. This patch removes it.

Change-Id: I2a7170d99f4bee7a7b819621c84dd197ded37fa2
Signed-off-by: Ganesh Mahendran <opensource.ganesh@gmail.com>
af18bc9973eca35fc0d4db6e240323f38c9d7a91 06-Jul-2016 Paul Duffin <paulduffin@google.com> Apply JDK 8 refactorings that don't change behavior of SimpleDateFormat

In addition to behavioral changes in JDK 8 there are some
refactorings that do not change the behavior but which do
contribute to differences with Android. This change applies the
refactorings that affect SimpleDateFormat/DateFormatSymbols.
* JDK 8 adds support for standalone month format but the
DateFormatSymbols constant is PATTERN_MONTH_STANDALONE while
the Android version is PATTERN_STANDALONE_MONTH.
* A variable has been renamed from compiledPattern to
compiledCode.

Bug: 29352743
Test: Built and run SimpleDateFormatTest
Change-Id: Ideb31998d03e1361cea4c914c9eed13118cade0f
6e42190c7f7d7cf3d8b787c918de0d797c6ddbba 23-Jun-2016 Paul Duffin <paulduffin@google.com> Applies non-functional changes from 7u40 - 8u60

These changes cover:
* JavaDoc improvements.
* Internal use of generics.
* Improve diagnostics for some internal errors.
* Add annotations, e.g. @Override, @SuppressWarnings where
necessary.
* Formatting changes.
* Removing unnecessary modifiers, e.g. public on package private
classes, final on private methods, etc.
* Copyright updates.

Bug: 29352743
Test: flashed onto device and made sure that it comes up
properly, ran make docs and checked the output of a few
representative changes.
Change-Id: I731c556d7d4401e2d571ca9b2a69e63b29ef89e1
2c87ad3a45cecf9e344487cad1abfdebe79f2c7c 21-Dec-2015 Narayan Kamath <narayan@google.com> Update file headers.

Change-Id: I8149f41585768a1a4b72ab7bb4a1452376c05cc2
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
3822402ba5642bd60d5cd6305ceee73a613b4bc8 26-Nov-2015 Narayan Kamath <narayan@google.com> SimpleDateFormat: Emulate support for 'L' and 'c' format specifiers.

It looks like we'd partially implemented this already and this change
fills in the missing pieces. This is a temporary change because all of
this will be replaced with a proper ICU4J based formatter in short order.

bug: 25859156
Change-Id: I316a37b7c4ad5fb55ed592307d0683de85c14670
b7554f779d330037a5cf591fcc8be73db73a0384 07-Sep-2015 Narayan Kamath <narayan@google.com> Pretend to support 'L' and 'c' format specifiers.

Temporary fixes for Clocks / Maps. Proper support for standalone
week and month will be implemented in a future change.

Change-Id: I58e2cdb7c43978423f68f2d98d43341a3d9c748e
9c853c5b9ebbb0ef60a013ae10ee411d70dfa832 18-Feb-2015 Piotr Jastrzebski <haaawk@google.com> Use OpenJdk implementations of java.text.*

- LocaleInternalsTest has been disabled since it depends on
internal implementation details.
- Collator: Use libcore's RuleBasedCollatorICU to fetch collator
rules instead of sun.misc.resources.LocaleData & friends.
- DateFormat: Add support for set24HourTimePref (not wired up
yet).
- DateFormatSymbols : Use libcore's LocaleData & TimeZoneNames
classes internally.
- NumberFormat: Use libcore's LocaleData.
- Drop support for SCIENTIFICSTYLE (we should re-enable this at
some point ?).
- SimpleDateFormat : Don't reject the format specifiers for
standalone weekday and friends. We'll need to switch over to
using ICU4J formatters at some point.
- Calendar : Use GregorianCalendar only.
- TimeZone : Use TimeZoneNames to access time zone names.

Change-Id: I4a2866904d4f2f39f0793154d9aad7f109da3b5a
51b1b6997fd3f980076b8081f7f1165ccc2a4008 16-Feb-2015 Piotr Jastrzebski <haaawk@google.com> Initial import of OpenJdk files.

Create new libcore/ojluni directory with src/main/java and
src/main/native subdirectiories.

Build ojluni into core-oj jar.

Use openjdk classes from java.awt.font package.

Copy all files from jdk/src/share/classes and jdk/src/solaris/classes
directories in openjdk into libcore/ojluni/src/main/java.

Copy following native files from openjdk to
libcore/ojluni/src/main/native:
jdk/src/solaris/native/java/io/canonicalize_md.c
build/linux-amd64/include/classfile_constants.h
jdk/src/share/native/java/net/DatagramPacket.c
jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c
jdk/src/share/native/java/lang/Double.c
jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h
jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c
jdk/src/solaris/native/java/io/FileDescriptor_md.c
jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c
jdk/src/share/native/java/io/FileInputStream.c
jdk/src/solaris/native/sun/nio/ch/FileKey.c
jdk/src/solaris/native/java/io/FileOutputStream_md.c
jdk/src/solaris/native/java/io/FileSystem_md.c
jdk/src/share/native/java/lang/Float.c
jdk/src/share/native/java/net/Inet4Address.c
jdk/src/solaris/native/java/net/Inet4AddressImpl.c
jdk/src/share/native/java/net/Inet6Address.c
jdk/src/solaris/native/java/net/Inet6AddressImpl.c
jdk/src/share/native/java/net/InetAddress.c
jdk/src/solaris/native/java/net/InetAddressImplFactory.c
jdk/src/share/native/java/io/io_util.c
jdk/src/solaris/native/sun/nio/ch/IOUtil.c
jdk/src/share/native/java/io/io_util.h
jdk/src/solaris/native/java/io/io_util_md.c
jdk/src/solaris/native/java/io/io_util_md.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/java_io_FileDescriptor.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_FileInputStream.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_FileOutputStream.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_FileSystem.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_ObjectStreamClass.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_io_UnixFileSystem.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Double.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Float.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Integer.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Long.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Runtime.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Shutdown.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_StrictMath.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_String.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_System.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Thread.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/java_lang_Throwable.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_DatagramPacket.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet4Address.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet4AddressImpl.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet6Address.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_Inet6AddressImpl.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_InetAddress.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_InetAddressImplFactory.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_NetworkInterface.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_PlainDatagramSocketImpl.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_PlainSocketImpl.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_SocketInputStream.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_SocketOptions.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/java_net_SocketOutputStream.h
jdk/src/share/native/java/lang/java_props.h
jdk/src/solaris/native/java/lang/java_props_md.c
jdk/src/share/native/java/util/zip/Adler32.c as java_util_zip_Adler32.c
jdk/src/share/native/java/util/zip/CRC32.c as java_util_zip_CRC32.c
build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_CRC32.h
jdk/src/share/native/java/util/zip/Deflater.c as java_util_zip_Deflater.c
build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_Deflater.h
jdk/src/share/native/java/util/zip/Inflater.c as java_util_zip_Inflater.c
build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_Inflater.h
jdk/src/share/native/java/util/zip/ZipFile.c as java_util_zip_ZipFile.c
build/linux-amd64/tmp/sun/java.util.zip/zip/CClassHeaders/java_util_zip_ZipFile.h
jdk/src/share/native/java/lang/fdlibm/include/jfdlibm.h
jdk/src/share/native/common/jlong.h
jdk/src/solaris/native/common/jlong_md.h
jdk/src/share/native/common/jni_util.c
jdk/src/share/native/common/jni_util.h
jdk/src/solaris/native/common/jni_util_md.c
jdk/src/share/javavm/export/jvm.h
jdk/src/solaris/javavm/export/jvm_md.h
jdk/src/solaris/native/java/net/linux_close.c
jdk/src/share/native/sun/misc/NativeSignalHandler.c
jdk/src/solaris/native/sun/nio/ch/NativeThread.c
jdk/src/share/native/java/net/net_util.c
jdk/src/share/native/java/net/net_util.h
jdk/src/solaris/native/java/net/net_util_md.c
jdk/src/solaris/native/java/net/net_util_md.h
jdk/src/solaris/native/java/net/NetworkInterface.c
jdk/src/share/native/sun/nio/ch/nio.h
jdk/src/solaris/native/sun/nio/ch/nio_util.h
jdk/src/share/native/java/io/ObjectStreamClass.c
jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
jdk/src/solaris/native/java/net/PlainSocketImpl.c
jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c
jdk/src/share/native/java/lang/Runtime.c
jdk/src/share/native/java/lang/Shutdown.c
jdk/src/share/native/sun/misc/Signal.c
jdk/src/solaris/native/java/net/SocketInputStream.c
jdk/src/solaris/native/java/net/SocketOutputStream.c
jdk/src/share/native/java/lang/StrictMath.c
jdk/src/share/native/java/lang/String.c
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/sun_misc_NativeSignalHandler.h
build/linux-amd64/tmp/java/java.lang/java/CClassHeaders/sun_misc_Signal.h
build/linux-amd64/tmp/sun/java.net/net/CClassHeaders/sun_net_spi_DefaultProxySelector.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_FileChannelImpl.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_FileDispatcherImpl.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_FileKey.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_IOStatus.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_IOUtil.h
build/linux-amd64/tmp/java/java.nio/nio/CClassHeaders/sun_nio_ch_NativeThread.h
jdk/src/share/native/java/lang/System.c
jdk/src/share/native/java/lang/Thread.c
jdk/src/share/native/java/lang/Throwable.c
jdk/src/solaris/native/java/io/UnixFileSystem_md.c
jdk/src/solaris/native/java/lang/UNIXProcess_md.c
jdk/src/share/native/java/util/zip/zip_util.c
jdk/src/share/native/java/util/zip/zip_util.h

Change-Id: Ib237df4e1b7b5b4d9f12e74d189e6ec9eed3c31d