Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, Robolectric enabled some of its instrumentation on interfaces in order to support hooking up interceptors on default interface methods. This is because there are now some default interface methods that invoke System.logW (e.g. android.compat.Compatibility$BehaviorChangeDelegate) However, the instrumentation step that makes classes public was also applied to interfaces, and this seems to confuse Mockito/ByteBuddy, but only in certain environments. As a fix, restrict the instrumentation to only rewrite interface method bodies, as well as extends 'InstrumentedInterface', so Robolectric does not re-instrument interfaces when the preinstrumented jars are used. A test case will be added after the preinstrumented jar version is bumped. Fixes #6858 PiperOrigin-RevId: 410440888
- Loading branch information