Fix ClassCastException in ReactModuleSpecProcessor

Reviewed By: AaaChiuuu

Differential Revision: D4752195

fbshipit-source-id: 7c01f9be4d82dbc605f1e6d3b217f0c83f177165
This commit is contained in:
Jonathan Lawlor authored and Facebook Github Bot committed 2017-03-22 11:17:48 -07:00
1 parent ef3db66bb1
commit 379b60d5e8
1 file changed
+4
@@ -79,6 +79,10 @@ public class ReactModuleSpecProcessor extends AbstractProcessor {
Set<? extends Element> reactModuleListElements = roundEnv.getElementsAnnotatedWith(
ReactModuleList.class);
for (Element reactModuleListElement : reactModuleListElements) {
if (!(reactModuleListElement instanceof TypeElement)) {
continue;
}
TypeElement typeElement = (TypeElement) reactModuleListElement;
ReactModuleList reactModuleList = typeElement.getAnnotation(ReactModuleList.class);
if (reactModuleList == null) {