Ignore static initializers, throw assumptions.
For classes that haven't built out Ravenwood support, they still may be referenced in a way that causes their <clinit> to be invoked. This can cause a cascade of trouble as we try constructing other classes that aren't yet supported. Instead, we take the path of "ignoring" these initializers for the time being, treating them as no-op. This does leave `static final` values as their defaults values (such as null), which feels reasonable, as the remainder of the class would throw when used. Additionally, pivot to throwing `AssumptionViolatedException` when we encounter unsupported behavior. This has a nice side-effect of allowing large numbers of existing tests to be executed under Ravenwood as-is, where we can get an "unknown" signal today that automatically turns "green" once all underlying infrastructure is supported in the future. Bug: 292141694 Test: atest-dev CtsUtilTestCasesRavenwood Change-Id: Ia0a93f5e0af0b4c8c680daca1732c10c5fe404af
Loading
Please register or sign in to comment