summaryrefslogtreecommitdiff
path: root/test/142-classloader2/src/Main.java
Commit message (Collapse)AuthorAgeFilesLines
* Tests: never use System.errKevin Brodsky2017-06-021-1/+1
| | | | | | | | | | | | Always print stack traces to System.out, and replace all System.err.println()'s with System.out.println(). Follow-up of https://android-review.googlesource.com/#/c/187020/ and https://android-review.googlesource.com/#/c/407032/. Test: m test-art-host m test-art-target Change-Id: I9ab9cd955a8db25b2ec6673790e5bc924f62c88a
* Add class status for resolved erroneous classes.Vladimir Marko2017-01-241-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split the old ambiguous status mirror::Class::kStatusError into kStatusErrorUnresolved and kStatusErrorResolved. Once a class has been resolved, IsResolved() shall return true even if the class later becomes erroneous. Allow returning erroneous class from ClassLinker::EnsureResolved() if it has been previously resolved. This allows consistent behavior for retrieving classes, immune to multi-threaded races and multi-dex weirdness. It also allows JVMTI to properly report "prepared" (i.e. resolved) classes that are also erroneous. The new behavior is consistent with the RI. Add regression tests to 008-exceptions for inconsistent behavior for multi-dex retrieval of erroneous resolved class (wrapping or not wrapping the old exception based on which dex file is used for lookup) and for a CHECK(IsResolved()) crash in ClassLinker::LoadSuperAndInterfaces() (without any tests for similar checks that could have previously failed only due to extremely unlikely race conditions; these should now also be fixed). Inconsistency still remains for class verification as shown by the new exceptionsForSuperClassInitFailure() test in 008-exceptions, where interpreter and Optimizing still cause different exceptions to be thrown. Note: This is partially changing behavior implemented for bug 28787733. Since we allow the class loader to retrieve an erroneous resolved class, the ExceptionInInitializerError is not thrown at all from VMClassLoader_findLoadedClass(), so there is nothing to wrap in ClassNotFoundException. Test: m test-art-host Bug: 30627598 Bug: 28787733 Change-Id: I86cdca00f35a0d6221d2559e3026ac0428a3613c
* ART: Fix type parameter in testsAndreas Gampe2016-07-221-2/+2
| | | | | | | | Move Class to Class<?>, Constructor to Constructor<?>, and in general clean up reflection. Test: m test-art-host-run-test Change-Id: I3a4223ee8d14d032015edf34bf27135757f7138c
* Wrap certain exception types when loading an erroneous class.Jeff Hao2016-06-071-0/+15
| | | | | | | | Bug: 28787733 (cherry-picked from commit 7c8aa8357196781c811a73d2eb66aaaa1681ce36) Change-Id: Iea55486c4b95ee16e1f19c8ba2d24c18b9100c97
* ART: PathClassLoader testAndreas Gampe2015-09-221-0/+76
Add a test checking that subclassing PathClassLoader works as expected. Change-Id: Ic6bb733b748df5e29b21df021f302ed4237b0f99