Keep annotations of default methods in interfaces during desugaring.
RELNOTES: n/a
@@ -234,6 +234,13 @@ class InterfaceDesugaring extends ClassVisitor {
annotationOnlyDest.visitParameter(name, access);
}
+ @Override
+ public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
+ AnnotationVisitor dest = super.visitAnnotation(desc, visible);
+ AnnotationVisitor annoDest = annotationOnlyDest.visitAnnotation(desc, visible);
+ return new MultiplexAnnotationVisitor(dest, annoDest);
+ }
+
@Override
public AnnotationVisitor visitTypeAnnotation(
int typeRef, TypePath typePath, String desc, boolean visible) {
