diff options
author | Samuel Liu <slliu@google.com> | 2022-10-31 19:29:42 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-10-31 19:30:13 -0700 |
commit | da9a5d40f425aa09a9e64dc30549e3324c0c742f (patch) | |
tree | c9dd49c3428c0334f2beb864df4a40bb6912ba2c /sandbox | |
parent | a61d00755d13ed3533f21af8424b89ca04c2ef5e (diff) | |
download | robolectric-da9a5d40f425aa09a9e64dc30549e3324c0c742f.tar.gz |
Prevent Robolectric's class loader from loading the org.objectweb.asm package
An internal change caused an issue where the org.objectweb.asm package was being loaded by both Robolectric's class loader and the bootstrap (top-level) class loader. A class should not be loaded by two class loaders and will result in a LinkageError
PiperOrigin-RevId: 485206648
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/src/main/java/org/robolectric/config/AndroidConfigurer.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sandbox/src/main/java/org/robolectric/config/AndroidConfigurer.java b/sandbox/src/main/java/org/robolectric/config/AndroidConfigurer.java index 3a549a763..ce81f2a61 100644 --- a/sandbox/src/main/java/org/robolectric/config/AndroidConfigurer.java +++ b/sandbox/src/main/java/org/robolectric/config/AndroidConfigurer.java @@ -60,6 +60,7 @@ public class AndroidConfigurer { .doNotAcquirePackage("jdk.internal.") .doNotAcquirePackage("org.junit") .doNotAcquirePackage("org.hamcrest") + .doNotAcquirePackage("org.objectweb.asm") .doNotAcquirePackage("org.robolectric.annotation.") .doNotAcquirePackage("org.robolectric.internal.") .doNotAcquirePackage("org.robolectric.pluginapi.") @@ -98,8 +99,7 @@ public class AndroidConfigurer { } // Instrumenting these classes causes a weird failure. - builder.doNotInstrumentClass("android.R") - .doNotInstrumentClass("android.R$styleable"); + builder.doNotInstrumentClass("android.R").doNotInstrumentClass("android.R$styleable"); builder .addInstrumentedPackage("dalvik.") |