Skip to content

Commit

Permalink
Do not attempt to add primitive types to the Jandex index
Browse files Browse the repository at this point in the history
This will just fail and leave ugly logs.
  • Loading branch information
yrodiere committed May 19, 2021
1 parent 47eb836 commit 701c2a5
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,14 @@ private void addClassHierarchyToReflectiveList(Collector collector, DotName clas
}
// we need to check for enums
for (FieldInfo fieldInfo : classInfo.fields()) {
DotName fieldType = fieldInfo.type().name();
ClassInfo fieldTypeClassInfo = index.getClassByName(fieldType);
Type fieldType = fieldInfo.type();
if (Type.Kind.PRIMITIVE == fieldType.kind()) {
continue;
}
DotName fieldClassName = fieldInfo.type().name();
ClassInfo fieldTypeClassInfo = index.getClassByName(fieldClassName);
if (fieldTypeClassInfo != null && ClassNames.ENUM.equals(fieldTypeClassInfo.superName())) {
collector.enumTypes.add(fieldType.toString());
collector.enumTypes.add(fieldClassName.toString());
}
}

Expand Down

0 comments on commit 701c2a5

Please sign in to comment.