Skip to content

Commit 69b128d

Browse files
committed
Annotation processor - Error on legacy config classes
We deprecated the legacy config classes in 3.19. Most of the ecosystem has moved to the interfaces annotated with @ConfigMapping. It is time to complain loudly about them now, so that we can envision dropping the support for legacy config classes
1 parent 6881f0d commit 69b128d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

core/processor/src/main/java/io/quarkus/annotation/processor/ExtensionAnnotationProcessor.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ public synchronized void init(ProcessingEnvironment processingEnv) {
4343

4444
boolean useConfigMapping = !Boolean
4545
.parseBoolean(utils.processingEnv().getOptions().getOrDefault(Options.LEGACY_CONFIG_ROOT, "false"));
46+
47+
if (!useConfigMapping) {
48+
throw new IllegalArgumentException(
49+
"Starting with Quarkus 3.25, legacy config classes (deprecated since Quarkus 3.19) are not supported anymore. "
50+
+ "Please migrate the configuration of your extension to interfaces annotated with @ConfigMapping. See https://quarkus.io/guides/config-mappings#config-mappings for more information.");
51+
}
52+
4653
boolean debug = Boolean.getBoolean(DEBUG);
4754

4855
ExtensionModule extensionModule = utils.extension().getExtensionModule();

0 commit comments

Comments
 (0)