Skip to content

Commit

Permalink
Freeform Map<String,String> configuration properties always marked as…
Browse files Browse the repository at this point in the history
… required, fix quarkusio#42505
  • Loading branch information
ppalaga committed Aug 13, 2024
1 parent 7bbbfe2 commit e354577
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.TypeMirror;

import io.quarkus.annotation.processor.documentation.config.util.TypeUtil;

public record ResolvedType(
TypeMirror wrapperType,
TypeMirror unwrappedType,
Expand Down Expand Up @@ -73,7 +75,11 @@ public static ResolvedType makeMap(TypeMirror type, ResolvedType unwrappedResolv
unwrappedResolvedType.binaryName, unwrappedResolvedType.qualifiedName, unwrappedResolvedType.simplifiedName,
unwrappedResolvedType.isPrimitive,
true, unwrappedResolvedType.isList,
unwrappedResolvedType.isOptional,
unwrappedResolvedType.isOptional
// backwards compatibility with versions before Quarkus 3.14
// see https://github.com/quarkusio/quarkus/issues/42505
|| "java.lang.String".equals(unwrappedResolvedType.qualifiedName)
|| TypeUtil.isPrimitiveWrapper(unwrappedResolvedType.qualifiedName),
unwrappedResolvedType.isDeclared, unwrappedResolvedType.isInterface, unwrappedResolvedType.isClass,
unwrappedResolvedType.isEnum, unwrappedResolvedType.isDuration, unwrappedResolvedType.isConfigGroup);
}
Expand Down

0 comments on commit e354577

Please sign in to comment.