diff --git a/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/JpaJandexScavenger.java b/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/JpaJandexScavenger.java index ee5d21a9e6d96..f8eb837c6c79d 100644 --- a/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/JpaJandexScavenger.java +++ b/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/JpaJandexScavenger.java @@ -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()); } }