Fix ClassCastException in ReactModuleSpecProcessor
Reviewed By: AaaChiuuu Differential Revision: D4752195 fbshipit-source-id: 7c01f9be4d82dbc605f1e6d3b217f0c83f177165
This commit is contained in:
parent
ef3db66bb1
commit
379b60d5e8
|
@ -79,6 +79,10 @@ public class ReactModuleSpecProcessor extends AbstractProcessor {
|
||||||
Set<? extends Element> reactModuleListElements = roundEnv.getElementsAnnotatedWith(
|
Set<? extends Element> reactModuleListElements = roundEnv.getElementsAnnotatedWith(
|
||||||
ReactModuleList.class);
|
ReactModuleList.class);
|
||||||
for (Element reactModuleListElement : reactModuleListElements) {
|
for (Element reactModuleListElement : reactModuleListElements) {
|
||||||
|
if (!(reactModuleListElement instanceof TypeElement)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
TypeElement typeElement = (TypeElement) reactModuleListElement;
|
TypeElement typeElement = (TypeElement) reactModuleListElement;
|
||||||
ReactModuleList reactModuleList = typeElement.getAnnotation(ReactModuleList.class);
|
ReactModuleList reactModuleList = typeElement.getAnnotation(ReactModuleList.class);
|
||||||
if (reactModuleList == null) {
|
if (reactModuleList == null) {
|
||||||
|
|
Loading…
Reference in New Issue