Skip to content

Whitespace can be incorrectly removed when spring-boot-configuration-processor runs on multi-line javadoc#49039

Closed
srt wants to merge 1 commit intospring-projects:mainfrom
srt:whitespace
Closed

Whitespace can be incorrectly removed when spring-boot-configuration-processor runs on multi-line javadoc#49039
srt wants to merge 1 commit intospring-projects:mainfrom
srt:whitespace

Conversation

@srt
Copy link
Contributor

@srt srt commented Feb 3, 2026

When using multiline markdown javadoc comments in Java 25 the description generated in META-INF/spring-configuration-metadata.json by spring-boot-configuration-processor is missing whitespaces.

The following javadoc comment

/// foo
/// bar

results in

"description": "foobar"

This pull request fixes this.

Signed-off-by: Stefan Reuter <stefan.reuter@reucon.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 3, 2026
@wilkinsona
Copy link
Member

We don't yet support Markdown for configuration property documentation. #40562 is tracking that enhancement. I think it's probably best if we close this one as merging it may give the unwanted impression that Markdown is already supported. Thanks anyway for the PR.

@wilkinsona wilkinsona closed this Feb 3, 2026
@wilkinsona wilkinsona added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 3, 2026
@srt
Copy link
Contributor Author

srt commented Feb 3, 2026

Hey @wilkinsona, thanks for having a look into this and for your quick response.
I don't think the change hurts or creates the impression that markdown is already fully supported. It just treats newline and spaces equally.
You can also demonstrate the issue and the fix by this pr with tradtitional javadoc:

The following javadoc comment

/** foo
 *bar
 */

results in

"description": "foobar"

With this pr applied you get "foo bar" as expected.

@philwebb philwebb reopened this Feb 4, 2026
@philwebb philwebb changed the title Fix whitespace handling in markdown comments for spring-boot-configuration-processor Fix whitespace handling in javadoc comments for spring-boot-configuration-processor Feb 4, 2026
@philwebb philwebb changed the title Fix whitespace handling in javadoc comments for spring-boot-configuration-processor Whitespace can be incorrectly removed when spring-boot-configuration-processor runs on multi-line javadoc Feb 5, 2026
@philwebb philwebb added type: bug A general bug and removed status: declined A suggestion or change that we don't feel we should currently apply labels Feb 5, 2026
@philwebb philwebb self-assigned this Feb 5, 2026
@philwebb philwebb added this to the 3.5.11 milestone Feb 5, 2026
philwebb pushed a commit that referenced this pull request Feb 5, 2026
Update spring-boot-configuration-processor to deal with multi-line
javadoc comments that do not include their own whitespace after the
new line.

See gh-49039

Signed-off-by: Stefan Reuter <stefan.reuter@reucon.com>
@philwebb philwebb closed this in e015a3c Feb 5, 2026
@philwebb
Copy link
Member

philwebb commented Feb 5, 2026

Thanks very much @srt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants