Reports String concatenations that can be simplified by replacing them with text blocks.

Requirements:

Use the Report single string literals option to highlight single literals containing line breaks. The quick-fix will still be available even when this option is disabled.

Example:


  String html = "<html>\n" +
                "    <body>\n" +
                "        <p>Hello, world</p>\n" +
                "    </body>\n" +
                "</html>\n";

After the quick-fix is applied:


  String html = """
                <html>
                    <body>
                        <p>Hello, world</p>
                    </body>
                </html>
                """;

This inspection only reports if the language level of the project or module is 15 or higher.

New in 2019.3