{"record":{"id":"9882799366927d5e","repo":"JetBrains/intellij-community","slug":"string-descriptor-value-required","errorCode":null,"errorMessage":"String descriptor value required","messagePattern":"String descriptor value required","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"java/compiler/forms-compiler/src/com/intellij/uiDesigner/lw/LwRbIntroStringProperty.java","lineNumber":22,"sourceCode":"import com.intellij.uiDesigner.UIFormXmlConstants;\nimport org.jdom.Element;\n\npublic final class LwRbIntroStringProperty extends LwIntrospectedProperty {\n  LwRbIntroStringProperty(final String name){\n    super(name, String.class.getName());\n  }\n\n  /**\n   * @return instance of {@link StringDescriptor}\n   */\n  @Override\n  public Object read(final Element element) {\n    final StringDescriptor descriptor = LwXmlReader.getStringDescriptor(element,\n                                                                        UIFormXmlConstants.ATTRIBUTE_VALUE,\n                                                                        UIFormXmlConstants.ATTRIBUTE_RESOURCE_BUNDLE,\n                                                                        UIFormXmlConstants.ATTRIBUTE_KEY);\n    if (descriptor == null) {\n      throw new IllegalArgumentException(\"String descriptor value required\");\n    }\n    return descriptor;\n  }\n}\n\n","sourceCodeStart":4,"sourceCodeEnd":28,"githubUrl":"https://github.com/JetBrains/intellij-community/blob/be881553f2a76ac8b4ea53950d93f0de78295c19/java/compiler/forms-compiler/src/com/intellij/uiDesigner/lw/LwRbIntroStringProperty.java#L4-L28","documentation":"Thrown by LwRbIntroStringProperty.read when reading an intro-string property from form XML: LwXmlReader.getStringDescriptor returns null because none of the value/resource-bundle/key attributes produced a descriptor. Intro-string properties (like radio-button group labels) must resolve to a StringDescriptor, so a null result is rejected with IllegalArgumentException.","triggerScenarios":"An XML element for an introspected string property carries neither a 'value' attribute nor a resolvable bundle+key pair, so getStringDescriptor returns null. E.g. <intro-string-property name=\"text\"/> with all attributes omitted.","commonSituations":"Hand-edited or tool-generated form XML where property elements were stripped of their value attributes; properties serialized in a newer format (stored as <property> elements with different attribute names) being read by an older reader.","solutions":["Add a value attribute (or resource-bundle + key pair) to the property element shown in the stack trace.","Re-open the form in the GUI designer and re-enter the property value so it serializes correctly.","Remove the malformed property element if the value is not needed."],"exampleFix":"<!-- before -->\n<intro-string-property name=\"text\"/>\n\n<!-- after -->\n<intro-string-property name=\"text\" value=\"My Label\"/>","handlingStrategy":"validation","validationCode":"// When writing intro-string properties, always emit a value or bundle+key\nif (value == null && (bundle == null || key == null)) throw new IllegalStateException(\"intro-string-property needs value or bundle+key\");","typeGuard":null,"tryCatchPattern":"try { property.read(element); } catch (IllegalArgumentException e) { if (\"String descriptor value required\".equals(e.getMessage())) { /* add value attribute to the property element */ } else throw e; }","preventionTips":["Give radio-button/label string properties a value or resource bundle entry in the designer.","Never strip value attributes when hand-trimming form files."],"tags":["gui-designer","form-xml","string-descriptor","property"],"backgroundTag":null,"analyzedSha":"be881553f2a76ac8b4ea53950d93f0de78295c19","analyzedAt":"2026-08-14T14:13:06.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}