JetBrains/intellij-community · warning · ConfigurationException
''{0}'' is invalid qualified parameter class name
Error message
''{0}'' is invalid qualified parameter class name What it means
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).
Source
Thrown at java/java-impl-refactorings/src/com/intellij/refactoring/introduceparameterobject/IntroduceParameterObjectDialog.java:503
}
}
else if (!useExistingClass()) {
final String className = getClassName();
if (className.isEmpty() || !nameHelper.isIdentifier(className)) {
throw new ConfigurationException(
JavaRefactoringBundle.message("introduce.parameter.object.error.invalid.parameter.class.name", className));
}
final String packageName = getPackageName();
if (packageName.isEmpty() || !nameHelper.isQualifiedName(packageName)) {
throw new ConfigurationException(
JavaRefactoringBundle.message("introduce.parameter.object.error.invalid.parameter.class.package.name", packageName));
}
}
else {
final String className = getExistingClassName();
if (className.isEmpty() || !nameHelper.isQualifiedName(className)) {
throw new ConfigurationException(
JavaRefactoringBundle.message("introduce.parameter.object.error.invalid.qualified.parameter.class.name", className));
}
if (JavaPsiFacade.getInstance(getProject()).findClass(className, GlobalSearchScope.allScope(getProject())) == null) {
throw new ConfigurationException(JavaRefactoringBundle.message("introduce.parameter.object.error.class.does.not.exist", className));
}
}
}
private @NotNull String getInnerClassName() {
return myInnerClassNameTextField.getText().trim();
}
public @NotNull String getPackageName() {
return packageTextField.getText().trim();
}
public @NotNull String getExistingClassName() {
return existingClassField.getText().trim();View on GitHub (pinned to be881553f2)
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.
Example fix
// before // existing class field: RequestParams -> invalid qualified name // after // existing class field: com.acme.params.RequestParams
Defensive patterns
Strategy: validation
Validate before calling
String fqn = getExistingClassName().trim();
PsiNameHelper helper = PsiNameHelper.getInstance(project);
if (fqn.isEmpty() || !helper.isQualifiedName(fqn)) {
// block before OK; let user pick the class via a chooser instead of typing
} Prevention
- Insert existing-class fields via a JavaCodeFragment browse button rather than free text.
- Validate qualified names with PsiNameHelper.isQualifiedName before any findClass call.
When it happens
Trigger: 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.
Common situations: Typing only the simple class name and forgetting the package, pasting with whitespace, doubled dots, or clearing the field after browsing.
Related errors
- replace.constructor.builder.error.invalid.builder.class.name
- replace.constructor.builder.error.invalid.builder.qualified.
- Invalid package name: {0}
- Nothing found to extract
- ''{0}'' is invalid extracted class name
AI-assisted analysis of JetBrains/intellij-community@be881553f2 (2026-08-14).
Data as JSON: /api/errors/a09cc53fa82f3e51.
Report an issue: GitHub.