Skip to content

Commit cba688d

Browse files
committed
Give actionable warning when a parent of @ConfigProperties class not in index
1 parent 896f683 commit cba688d

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/configproperties/ClassConfigPropertiesUtil.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,10 +352,18 @@ private static ResultHandle populateConfigObject(ClassLoader classLoader, ClassI
352352
if (superClassDotName.equals(DotNames.OBJECT)) {
353353
break;
354354
}
355-
currentClassInHierarchy = applicationIndex.getClassByName(superClassDotName);
356-
if (currentClassInHierarchy == null) {
355+
356+
ClassInfo newCurrentClassInHierarchy = applicationIndex.getClassByName(superClassDotName);
357+
if (newCurrentClassInHierarchy == null) {
358+
if (!superClassDotName.toString().startsWith("java.")) {
359+
LOGGER.warn("Class '" + superClassDotName + "' which is a parent class of '"
360+
+ currentClassInHierarchy.name()
361+
+ "' is not part of the Jandex index so its fields will be ignored. If you intended to include these fields, consider making the dependency part of the Jandex index by following the advice at: https://quarkus.io/guides/cdi-reference#bean_discovery");
362+
}
357363
break;
358364
}
365+
366+
currentClassInHierarchy = newCurrentClassInHierarchy;
359367
}
360368

361369
for (ConfigPropertyBuildItemCandidate candidate : configPropertyBuildItemCandidates) {

0 commit comments

Comments
 (0)