// Note: The main part of this test happens during `dex2oat` compilation of the `*-ex.jar`. // The verification of `SubClassOfDuplicateClassUser` in `*-ex.jar` triggers verification of // `DuplicateClassUser` in the parent class loader and that loads `DuplicateClass` from the // parent class loader. Previously, we would record image classes only by descriptor and // therefore the `DuplicateClass` from parent class loader would be considered an image class. // Hovever, when compiling the `*-ex.jar`, we cannot put classes from the parent class loader // to the image and `dex2oat` used to fail a consistency `CHECK()` in `ImageWriter`. publicclass Main { staticfinal String TEST_NAME = "184-dex2oat-dlc"; staticfinal String EX_JAR_FILE = System.getenv("DEX_LOCATION") + "/" + TEST_NAME + "-ex.jar";
assertFalse("Secondary app image is not loaded", checkAppImageLoaded("184-dex2oat-dlc-ex"));
ClassLoader delegateLast = new DelegateLastClassLoader(EX_JAR_FILE, mainClassLoader);
assertTrue("Secondary app image is loaded", checkAppImageLoaded("184-dex2oat-dlc-ex"));
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.