{"record":{"id":"2909aca1eef823f6","repo":"prestodb/presto","slug":"invalid-property-description-s","errorCode":null,"errorMessage":"Invalid property description '%s'","messagePattern":"Invalid property description '(.+?)'","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"presto-spi/src/main/java/com/facebook/presto/spi/session/SessionPropertyMetadata.java","lineNumber":56,"sourceCode":"    @JsonCreator\n    public SessionPropertyMetadata(\n            @JsonProperty(\"name\") String name,\n            @JsonProperty(\"description\") String description,\n            @JsonProperty(\"typeSignature\") TypeSignature typeSignature,\n            @JsonProperty(\"defaultValue\") String defaultValue,\n            @JsonProperty(\"hidden\") boolean hidden)\n    {\n        this.name = requireNonNull(name, \"name is null\");\n        this.description = requireNonNull(description, \"description is null\");\n        this.typeSignature = requireNonNull(typeSignature, \"typeSignature is null\");\n        this.defaultValue = defaultValue;\n        this.hidden = hidden;\n\n        if (name.isEmpty() || !name.trim().toLowerCase(ENGLISH).equals(name)) {\n            throw new IllegalArgumentException(format(\"Invalid property name '%s'\", name));\n        }\n        if (description.isEmpty() || !description.trim().equals(description)) {\n            throw new IllegalArgumentException(format(\"Invalid property description '%s'\", description));\n        }\n    }\n\n    /**\n     * Name of the property.  This must be a valid identifier.\n     */\n    @JsonProperty\n    public String getName()\n    {\n        return name;\n    }\n\n    /**\n     * Description for the end user.\n     */\n    @JsonProperty\n    public String getDescription()\n    {","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-spi/src/main/java/com/facebook/presto/spi/session/SessionPropertyMetadata.java#L38-L74","documentation":"SessionPropertyMetadata validates the property description: it must be non-empty and contain no leading/trailing whitespace. Descriptions are shown verbatim in documentation and EXPLAIN-style output, so canonical text is required.","triggerScenarios":"Constructing SessionPropertyMetadata with an empty description or one with trailing/leading spaces, e.g. description=\"Max splits per query \".","commonSituations":"Plugin authors writing descriptions programmatically or pasting strings with trailing whitespace/line breaks.","solutions":["Trim the description string before constructing","Provide a non-empty one-line description","Remove trailing whitespace/newlines from resource strings"],"exampleFix":"// before\n.description(\" Number of splits \")\n// after\n.description(\"Number of splits\")","handlingStrategy":"validation","validationCode":"if (description == null || description.isEmpty() || !description.trim().equals(description)) { throw new IllegalArgumentException(\"description must be non-empty without outer whitespace\"); }","typeGuard":"boolean isValidDescription(String d) { return d != null && !d.isEmpty() && d.trim().equals(d); }","tryCatchPattern":null,"preventionTips":["Trim descriptions before building metadata","Keep descriptions single-line without trailing spaces","Review string constants in plugin config for whitespace"],"tags":["spi","session-properties","validation","plugin"],"backgroundTag":"invalid-identifier-name","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}