OSDN Git Service

Clean up the construction-time arrangements.
authorDan Bornstein <danfuzz@android.com>
Sat, 16 Oct 2010 00:27:26 +0000 (17:27 -0700)
committerDan Bornstein <danfuzz@android.com>
Sat, 16 Oct 2010 00:36:14 +0000 (17:36 -0700)
commitb27ce0cf1efee048fa6e4c20bc6b38e4ebad6930
treecc4a1eedeff0fd48429787717737fd4d582cd633
parent7fe9c8ad62d8fcedf14ed44761de32a5a7ad569b
Clean up the construction-time arrangements.

There was all sorts of code here that pointlessly pushed the bulk of
the constructor operation off to instance methods, which (a) could
cause confusion when there's bona fide trouble -- that is, it's better
to throw in the constructor -- and (b) didn't really help with
efficiency in any realistic scenario -- that is, while the original
code nominally avoided extra work until first use, in practice first
use occurs immediately after construction (and in the same thread,
even).

Now, all the one-time work happens in the constructor, and we get to
avoid asking "am I set up yet?" before doing anything substantive.

While I was in the territory, I also did a bit of more minor code
hygiene maintenance.

Change-Id: I41225d373e3ab481b6bc3da5b74bde89c4fd895e
dalvik/src/main/java/dalvik/system/DexClassLoader.java
dalvik/src/main/java/dalvik/system/PathClassLoader.java
dalvik/src/main/java/dalvik/system/TouchDexLoader.java