{"record":{"id":"a09cc53fa82f3e51","repo":"JetBrains/intellij-community","slug":"0-is-invalid-qualified-parameter-class-name","errorCode":null,"errorMessage":"''{0}'' is invalid qualified parameter class name","messagePattern":"''(.+?)'' is invalid qualified parameter class name","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"warning","filePath":"java/java-impl-refactorings/src/com/intellij/refactoring/introduceparameterobject/IntroduceParameterObjectDialog.java","lineNumber":503,"sourceCode":"      }\n    }\n    else if (!useExistingClass()) {\n      final String className = getClassName();\n      if (className.isEmpty() || !nameHelper.isIdentifier(className)) {\n        throw new ConfigurationException(\n          JavaRefactoringBundle.message(\"introduce.parameter.object.error.invalid.parameter.class.name\", className));\n      }\n      final String packageName = getPackageName();\n\n      if (packageName.isEmpty() || !nameHelper.isQualifiedName(packageName)) {\n        throw new ConfigurationException(\n          JavaRefactoringBundle.message(\"introduce.parameter.object.error.invalid.parameter.class.package.name\", packageName));\n      }\n    }\n    else {\n      final String className = getExistingClassName();\n      if (className.isEmpty() || !nameHelper.isQualifiedName(className)) {\n        throw new ConfigurationException(\n          JavaRefactoringBundle.message(\"introduce.parameter.object.error.invalid.qualified.parameter.class.name\", className));\n      }\n      if (JavaPsiFacade.getInstance(getProject()).findClass(className, GlobalSearchScope.allScope(getProject())) == null) {\n        throw new ConfigurationException(JavaRefactoringBundle.message(\"introduce.parameter.object.error.class.does.not.exist\", className));\n      }\n    }\n  }\n\n  private @NotNull String getInnerClassName() {\n    return myInnerClassNameTextField.getText().trim();\n  }\n\n  public @NotNull String getPackageName() {\n    return packageTextField.getText().trim();\n  }\n\n  public @NotNull String getExistingClassName() {\n    return existingClassField.getText().trim();","sourceCodeStart":485,"sourceCodeEnd":521,"githubUrl":"https://github.com/JetBrains/intellij-community/blob/be881553f2a76ac8b4ea53950d93f0de78295c19/java/java-impl-refactorings/src/com/intellij/refactoring/introduceparameterobject/IntroduceParameterObjectDialog.java#L485-L521","documentation":"Thrown by IntroduceParameterObjectDialog.canRun() (IntroduceParameterObjectDialog.java:503) in the 'Use existing class' branch when the existing-class field is empty or is not a syntactically valid qualified name (PsiNameHelper.isQualifiedName). Before the dialog even resolves the class, it checks the grammar of 'package.Outer.Inner' style names. A syntactically valid but unresolvable name is reported separately (error 246).","triggerScenarios":"Introduce Parameter Object with 'Use existing class' selected; the field left blank or holding 'Params', 'com..acme.Params', or 'com.acme.My Params' instead of a full dotted qualified name.","commonSituations":"Typing only the simple class name and forgetting the package, pasting with whitespace, doubled dots, or clearing the field after browsing.","solutions":["Enter the fully qualified name ('com.acme.params.RequestParams') or use the class browser (...) to insert it.","If only the simple name is known, switch back to create-class mode or locate the package via Search Everywhere first.","Programmatically: check PsiNameHelper.getInstance(project).isQualifiedName(fqn) && !fqn.isEmpty() before opening/confirming the dialog."],"exampleFix":"// before\n// existing class field: RequestParams -> invalid qualified name\n\n// after\n// existing class field: com.acme.params.RequestParams","handlingStrategy":"validation","validationCode":"String fqn = getExistingClassName().trim();\nPsiNameHelper helper = PsiNameHelper.getInstance(project);\nif (fqn.isEmpty() || !helper.isQualifiedName(fqn)) {\n  // block before OK; let user pick the class via a chooser instead of typing\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Insert existing-class fields via a JavaCodeFragment browse button rather than free text.","Validate qualified names with PsiNameHelper.isQualifiedName before any findClass call."],"tags":["intellij","refactoring","java","validation","qualified-name","fqn"],"backgroundTag":null,"analyzedSha":"be881553f2a76ac8b4ea53950d93f0de78295c19","analyzedAt":"2026-08-14T14:13:06.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}