{"record":{"id":"87622a8a8b42952b","repo":"quarkusio/quarkus","slug":"method-method-name-of-interface-ifacedo","errorCode":null,"errorMessage":"Method  + method.name() +  of interface  + ifaceDotName +  is not a getter method since it defined parameters","messagePattern":"Method  \\+ method\\.name\\(\\) \\+  of interface  \\+ ifaceDotName \\+  is not a getter method since it defined parameters","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/spring-boot-properties/deployment/src/main/java/io/quarkus/spring/boot/properties/deployment/InterfaceConfigurationPropertiesUtil.java","lineNumber":161,"sourceCode":"                ctor.body(bc -> {\n                    bc.invokeSpecial(ConstructorDesc.of(Object.class), ctor.this_());\n                    bc.set(ctor.this_().field(configField), configParam);\n                    bc.return_();\n                });\n            });\n\n            for (DotName ifaceDotName : allInterfaces) {\n                ClassInfo classInfo = index.getClassByName(ifaceDotName);\n                List<MethodInfo> methods = classInfo.methods();\n                for (MethodInfo method : methods) {\n                    Type returnType = method.returnType();\n                    short methodModifiers = method.flags();\n                    if (isDefault(methodModifiers) || Modifier.isStatic(methodModifiers)\n                            || Modifier.isPrivate(methodModifiers)) {\n                        continue;\n                    }\n                    if (!method.parameterTypes().isEmpty()) {\n                        throw new IllegalArgumentException(\"Method \" + method.name() + \" of interface \" + ifaceDotName\n                                + \" is not a getter method since it defined parameters\");\n                    }\n                    if (returnType.kind() == Type.Kind.VOID) {\n                        throw new IllegalArgumentException(\"Method \" + method.name() + \" of interface \" + ifaceDotName\n                                + \" is not a getter method since it returns void\");\n                    }\n\n                    NameAndDefaultValue nameAndDefaultValue = determinePropertyNameAndDefaultValue(method, namingStrategy);\n                    String fullConfigName = prefixStr + \".\" + nameAndDefaultValue.getName();\n\n                    cc.method(method.name(), mc -> {\n                        mc.returning(ClassDesc.of(method.returnType().name().toString()));\n                        mc.public_();\n\n                        mc.body(bc -> {\n                            if ((returnType.kind() == Type.Kind.CLASS)) {\n                                ClassInfo returnTypeClassInfo = index.getClassByName(returnType.name());\n                                if ((returnTypeClassInfo != null) && Modifier.isInterface(returnTypeClassInfo.flags())) {","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/spring-boot-properties/deployment/src/main/java/io/quarkus/spring/boot/properties/deployment/InterfaceConfigurationPropertiesUtil.java#L143-L179","documentation":"Interface-based @ConfigurationProperties in Quarkus require every non-default, non-static, non-private interface method to be a property getter. If a method declares parameters, generateImplementationForInterfaceConfigPropertiesRec throws IllegalArgumentException 'Method <name> of interface <iface> is not a getter method since it defined parameters'.","triggerScenarios":"Declaring a method with parameters in an interface annotated with Spring-style @ConfigurationProperties (e.g. a computed accessor like getHost(int index)); raised at build time while generating the config implementation class.","commonSituations":"Porting an interface that mixed helper methods with getters; adding convenience accessors expecting them to be ignored; forgetting to mark helper methods as default or static.","solutions":["Remove the parameters and turn the method into a plain getter.","Mark helper/computed methods as default (with a body) or static so they are skipped.","Move non-getter logic out of the config interface into a separate service class."],"exampleFix":"// before\npublic interface AppProps {\n    String getHost(int index);\n}\n\n// after\npublic interface AppProps {\n    List<String> getHosts();\n\n    default String getHost(int index) { return getHosts().get(index); }\n}","handlingStrategy":"validation","validationCode":"// every abstract method in a config interface must be a no-arg getter\nfor (Method m : AppProps.class.getMethods()) {\n  if (!m.isDefault() && Modifier.isStatic(m.getModifiers()) == false\n      && m.getParameterCount() > 0) {\n    throw new IllegalStateException(\"Non-getter method in config interface: \" + m.getName());\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep config interfaces purely declarative getters","Mark helper methods default or static","Move computed/parameterized accessors into a separate service"],"tags":["quarkus","build-time","config-interface","getter-method"],"backgroundTag":"invalid-config-getter-signature","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}