Use text blocks
MSALText blocks are easier to read than concatenated strings.
org. openrewrite. java. migrate. lang. UseTextBlocksOptional
convertStringsWithoutNewlinesboolean
Whether strings without newlines should be converted to text blocks. The default value is true.
avoidLineContinuationsboolean
When enabled, the recipe avoids using \ line continuation escapes in text blocks where the content contains newlines. Non-newline-joined strings are placed on the same text block line instead. The default value is false.
mod run . --recipe= org. openrewrite. java. migrate. lang. UseTextBlocksInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.