Turn dangling documentation comments into block comments

MSAL

A documentation comment that does not precede a declaration documents nothing, and since Java 22 -Xlint:dangling-doc-comments warns about it, which fails any build using -Werror. Changing /** to /* keeps the text and silences the warning. A documentation comment that is attached to a declaration is left alone.

org.openrewrite.java.migrate.DanglingDocCommentToBlockComment
mod run . --recipe=org.openrewrite.java.migrate.DanglingDocCommentToBlockComment

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.