Update D8 library desugar to align with recent changes
TEST: blaze build --config=d8_desugar --config=android_java8_libs //third_party/java_src/desugar_jdk_libs
RELNOTES: None
@@ -155,9 +155,17 @@ public class CoreLibraryDesugar {
@Override
public void warning(Diagnostic warning) {
+ // Workaround for b/181634110.
if (warning instanceof InterfaceDesugarMissingTypeDiagnostic) {
InterfaceDesugarMissingTypeDiagnostic missingTypeDiagnostic =
(InterfaceDesugarMissingTypeDiagnostic) warning;
+ if (missingTypeDiagnostic.getMissingType().getTypeName().equals("jdk.internal.misc.Unsafe")
+ && missingTypeDiagnostic
+ .getContextType()
+ .getTypeName()
+ .equals("java.util.concurrent.ThreadLocalRandomHelper")) {
+ return;
+ }
outputConsumer.missingImplementedInterface(
DescriptorUtils.descriptorToBinaryName(
missingTypeDiagnostic.getContextType().getDescriptor()),
