OSDN Git Service

Make Resources$DefaultTimeZones preloadable again.
authorElliott Hughes <enh@google.com>
Wed, 16 Sep 2009 00:02:16 +0000 (17:02 -0700)
committerElliott Hughes <enh@google.com>
Wed, 16 Sep 2009 00:02:16 +0000 (17:02 -0700)
commitcb12fde6b095f1cc38351d5998c10e1e7f0af25c
tree9e325ef6425cd4f2c509ef2441a3f88585a4e93f
parente937b1b2d90dd9c1151f16af045c0fff1453c34e
Make Resources$DefaultTimeZones preloadable again.

http://s9/81864 was a premature optimization that stopped the timezone data
being loaded in the zygote. So instead of paying the (admittedly large) time
and space costs once in the zygote, we now pay them once per application.

Revert the problematic parts of that change. Note that this isn't simply a
reverse patch:

1. I've changed the comment to make it clear that although
this *looks* like idiomatic lazy initialization, it's actually the opposite.
A comment to that effect might have prevented this code from being broken.

2. I've left the last two hunks of the original patch stand, because they
appear reasonable but unrelated.

Bug: 19413111819285.
libcore/icu/src/main/java/com/ibm/icu4jni/util/Resources.java