diff --git a/core/processor/src/main/java/io/quarkus/annotation/processor/generate_doc/ConfigDocItemFinder.java b/core/processor/src/main/java/io/quarkus/annotation/processor/generate_doc/ConfigDocItemFinder.java index 26035efd27f36..0e5c0643f18ea 100644 --- a/core/processor/src/main/java/io/quarkus/annotation/processor/generate_doc/ConfigDocItemFinder.java +++ b/core/processor/src/main/java/io/quarkus/annotation/processor/generate_doc/ConfigDocItemFinder.java @@ -159,8 +159,6 @@ private List recursivelyFindConfigItems(Element element, String r String name = null; String defaultValue = NO_DEFAULT; String defaultValueDoc = EMPTY; - final TypeMirror typeMirror = unwrapTypeMirror(enclosedElement.asType()); - String type = typeMirror.toString(); List acceptedValues = null; final TypeElement clazz = (TypeElement) element; final String fieldName = enclosedElement.getSimpleName().toString(); @@ -250,6 +248,9 @@ private List recursivelyFindConfigItems(Element element, String r defaultValue = EMPTY; } + TypeMirror typeMirror = unwrapTypeMirror(enclosedElement.asType()); + String type = getType(typeMirror); + if (isConfigGroup(type)) { List groupConfigItems = readConfigGroupItems(configPhase, rootName, name, type, configSection, withinAMap, generateSeparateConfigGroupDocsFiles); @@ -387,6 +388,15 @@ private TypeMirror unwrapTypeMirror(TypeMirror typeMirror) { return typeMirror; } + private String getType(TypeMirror typeMirror) { + if (typeMirror instanceof DeclaredType) { + DeclaredType declaredType = (DeclaredType) typeMirror; + TypeElement typeElement = (TypeElement) declaredType.asElement(); + return typeElement.getQualifiedName().toString(); + } + return typeMirror.toString(); + } + private boolean isConfigGroup(String type) { if (type.startsWith("java.") || PRIMITIVE_TYPES.contains(type)) { return false;