{"record":{"id":"f5ef7c977d58f795","repo":"projectlombok/lombok","slug":"there-is-more-than-one-parmaeter-definition-that-d","errorCode":null,"errorMessage":"There is more than one parmaeter definition that does not include TOPIC: ","messagePattern":"There is more than one parmaeter definition that does not include TOPIC: ","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"src/core/lombok/core/configuration/LogDeclaration.java","lineNumber":70,"sourceCode":"\t\tif (declaration == null) return null;\n\t\t\n\t\tMatcher matcher = DECLARATION_PATTERN.matcher(declaration);\n\t\tif (!matcher.matches()) throw new IllegalArgumentException(\"The declaration must follow the pattern: [LoggerType ]LoggerFactoryType.loggerFactoryMethod(loggerFactoryMethodParams)[(loggerFactoryMethodParams)]\");\n\t\t\n\t\tTypeName loggerFactoryType = TypeName.valueOf(matcher.group(2));\n\t\tTypeName loggerType = TypeName.valueOf(matcher.group(1));\n\t\tif (loggerType == null) loggerType = loggerFactoryType;\n\t\tIdentifierName loggerFactoryMethod = IdentifierName.valueOf(matcher.group(3));\n\t\tList<List<LogFactoryParameter>> allParameters = parseParameters(matcher.group(4));\n\t\t\n\t\tList<LogFactoryParameter> parametersWithoutTopic = null;\n\t\tList<LogFactoryParameter> parametersWithTopic = null;\n\t\tfor (List<LogFactoryParameter> parameters: allParameters) {\n\t\t\tif (parameters.contains(LogFactoryParameter.TOPIC)) {\n\t\t\t\tif (parametersWithTopic != null) throw new IllegalArgumentException(\"There is more than one parameter definition that includes TOPIC: \" + parametersWithTopic + \" and \" + parameters);\n\t\t\t\tparametersWithTopic = parameters;\n\t\t\t} else {\n\t\t\t\tif (parametersWithoutTopic != null) throw new IllegalArgumentException(\"There is more than one parmaeter definition that does not include TOPIC: \" + parametersWithoutTopic + \" and \" + parameters);\n\t\t\t\tparametersWithoutTopic = parameters;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// sanity check (the pattern should disallow this situation\n\t\tif (parametersWithoutTopic == null && parametersWithTopic == null) throw new IllegalArgumentException(\"No logger factory method parameters specified.\");\n\t\t\n\t\treturn new LogDeclaration(loggerType, loggerFactoryType, loggerFactoryMethod, parametersWithoutTopic, parametersWithTopic);\n\t}\n\t\n\tprivate static List<List<LogFactoryParameter>> parseParameters(String parametersDefinitions) {\n\t\tList<List<LogFactoryParameter>> allParameters = new ArrayList<List<LogFactoryParameter>>();\n\t\tMatcher matcher = PARAMETERS_PATTERN.matcher(parametersDefinitions);\n\t\twhile (matcher.find()) {\n\t\t\tString parametersDefinition = matcher.group(1);\n\t\t\tList<LogFactoryParameter> parameters = new ArrayList<LogFactoryParameter>();\n\t\t\tif (!parametersDefinition.isEmpty()) { \n\t\t\t\tfor (String parameter : parametersDefinition.split(\",\")) {","sourceCodeStart":52,"sourceCodeEnd":88,"githubUrl":"https://github.com/projectlombok/lombok/blob/6d6a3e9fec0a9555702561fbeb8eac836575116e/src/core/lombok/core/configuration/LogDeclaration.java#L52-L88","documentation":"Symmetric to the TOPIC check: at most one parameter definition list may omit TOPIC. A second non-TOPIC list triggers this IllegalArgumentException (note the 'parmaeter' typo is in the library's message).","triggerScenarios":"LogDeclaration.valueOf with a declaration containing two or more alternative parameter lists that both lack TOPIC, e.g. 'create()()' or 'create(TYPE)(TOPIC)(TYPE,TOPIC)' variants where the non-topic group repeats.","commonSituations":"Declaring multiple no-topic overloads for a custom logger factory method instead of one, when wiring custom logger declarations in lombok.config.","solutions":["Provide exactly one parameter list without TOPIC; collapse extra no-topic overloads.","Distinguish overloads by including TOPIC in the additional list(s).","Remove redundant empty parameter groups like '()()'."],"exampleFix":"// before\nlombok.log.customDeclaration = com.acme.F.create(TYPE)()\n// after\nlombok.log.customDeclaration = com.acme.F.create(TYPE)(TOPIC)","handlingStrategy":"validation","validationCode":"int noTopicLists = 0;\n// for each parenthesized param group: if (!group.contains(\"TOPIC\")) noTopicLists++;\nboolean valid = noTopicLists <= 1;","typeGuard":null,"tryCatchPattern":"try {\n  LogDeclaration decl = LogDeclaration.valueOf(cfgValue);\n} catch (IllegalArgumentException e) {\n  // collapse duplicate no-TOPIC groups and retry\n}","preventionTips":["Provide exactly one parameter list without TOPIC.","Do not write multiple empty '()' groups.","Model extra overloads by adding TOPIC to the additional list."],"tags":["lombok","configuration","logging"],"backgroundTag":"conflicting-config-options","analyzedSha":"6d6a3e9fec0a9555702561fbeb8eac836575116e","analyzedAt":"2026-09-07T23:18:01.841Z","contentChangedAt":"2026-09-07T23:18:01.841Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}