{"record":{"id":"02e9f79823465072","repo":"JetBrains/intellij-community","slug":"error-names-of-parent-groups-cannot-be-empty","errorCode":"error.names.of.parent.groups.cannot.be.empty","errorMessage":"Parent group names of a module cannot be empty","messagePattern":"Parent group names of a module cannot be empty","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/ModuleConfigurable.java","lineNumber":72,"sourceCode":"    }\n    catch (ModuleWithNameAlreadyExists moduleWithNameAlreadyExists) {\n      //do nothing\n    }\n    myConfigurator.moduleRenamed(myModule, myModuleName, name);\n    myModuleName = name;\n    myConfigurator.setModified(!Comparing.strEqual(myModuleName, myModule.getName()));\n    myContext.getDaemonAnalyzer().queueUpdateForAllElementsWithErrors();\n  }\n\n  @Override\n  protected void checkName(@NotNull String name) throws ConfigurationException {\n    super.checkName(name);\n    if (myModuleGrouper.getShortenedNameByFullModuleName(name).isEmpty()) {\n      throw new ConfigurationException(LangBundle.message(\"error.short.name.module.cannot.be.empty\"));\n    }\n    List<String> list = myModuleGrouper.getGroupPathByModuleName(name);\n    if (list.stream().anyMatch(String::isEmpty)) {\n      throw new ConfigurationException(LangBundle.message(\"error.names.of.parent.groups.cannot.be.empty\"));\n    }\n  }\n\n  public ModuleGrouper getModuleGrouper() {\n    return myModuleGrouper;\n  }\n\n  @Override\n  public ProjectStructureElement getProjectStructureElement() {\n    return myProjectStructureElement;\n  }\n\n  @Override\n  public @NotNull Module getEditableObject() {\n    return myModule;\n  }\n\n  @Override","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/JetBrains/intellij-community/blob/be881553f2a76ac8b4ea53950d93f0de78295c19/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/projectRoot/ModuleConfigurable.java#L54-L90","documentation":"Thrown from ModuleConfigurable.checkName() when any intermediate group segment of a dotted module name is empty. For 'a..b' the group path from ModuleGrouper.getGroupPathByModuleName is ['a', ''], and the empty middle group makes the name invalid. Module groups form a hierarchy, and empty group names cannot be represented in the UI tree or .idea/modules.xml.","triggerScenarios":"Renaming a module to a name containing consecutive dots, a leading dot, or any empty segment (e.g. 'a..b', '.x', 'x.'); the check runs anyMatch(String::isEmpty) over the group path.","commonSituations":"Typing mistakes in grouped module names; migrating flat modules to grouped dotted names with a bad script; paste introducing double dots.","solutions":["Fix the module name so every dot-separated segment before the last is non-empty","If grouping is unintended, use a plain name without dots"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"List<String> groups = ModuleGrouper.getGroupPathByModuleName(newName);\nif (groups.stream().anyMatch(String::isEmpty)) reject(\"parent group names cannot be empty\");","typeGuard":null,"tryCatchPattern":"try { moduleConfigurable.checkName(name); } catch (ConfigurationException e) { /* show message next to name field */ }","preventionTips":["Avoid consecutive or leading dots in module names","Build grouped names from validated non-empty segments joined by '.'"],"tags":["intellij","modules","rename","validation","module-groups"],"backgroundTag":null,"analyzedSha":"be881553f2a76ac8b4ea53950d93f0de78295c19","analyzedAt":"2026-08-14T14:13:06.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}