Skip to content

Commit 0124cb1

Browse files
cushonError Prone Team
authored andcommitted
Automatic code cleanup.
PiperOrigin-RevId: 903045386
1 parent 2925bdf commit 0124cb1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

docgen_processor/src/main/java/com/google/errorprone/BugPatternInstance.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
import javax.lang.model.element.AnnotationValue;
2626
import javax.lang.model.element.Element;
2727
import javax.lang.model.element.ExecutableElement;
28+
import javax.lang.model.element.TypeElement;
29+
import javax.lang.model.type.DeclaredType;
2830

2931
/** A serialization-friendly POJO of the information in a {@link BugPattern}. */
3032
public final class BugPatternInstance {
@@ -71,7 +73,9 @@ public static BugPatternInstance fromElement(Element element) {
7173

7274
private static Map<String, Object> getAnnotation(Element element, String name) {
7375
for (AnnotationMirror mirror : element.getAnnotationMirrors()) {
74-
if (mirror.getAnnotationType().toString().equals(name)) {
76+
if (((TypeElement) ((DeclaredType) mirror.getAnnotationType()).asElement())
77+
.getQualifiedName()
78+
.contentEquals(name)) {
7579
return annotationKeyValues(mirror);
7680
}
7781
}

0 commit comments

Comments
 (0)