Skip to content

Whitespace is not correctly trimmed when generating configuration properties metadata from records #40593

@philwebb

Description

@philwebb

#29403 recently added support for generating metadata from parameters but we need to refine it to deal with wrapped whitespace.

Currently:

/**
 * Some description.
 *
 * @param foo Imagine this is a long description which
 *            gets wrapped by the formatter for readability
 */
@ConfigurationProperties(“myconfig")
public record MyProperties(String foo) {

Results in

    {
      "name": "myconfig.foo",
      "type": "java.lang.String",
      "description": "Imagine this is a long description which            gets wrapped by the formatter for readability",
      "sourceType": “com.mypkg.MyProperties"
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions