Skip to content

Convert concatenated strings to text blocks #17304

@AmitKumarDeoghoria

Description

@AmitKumarDeoghoria

From comment : #17259 (comment).
During the JDK 17 upgrade(#17168), 5 test methods across 4 files use string concatenation patterns that can be replaced with Java 15+ text blocks. Since text blocks require JDK 15+, these should be addressed after the JDK 17 migration.

Affected Files/Methods

  1. TreeWalkerTest.java

    • testRequiredTokenIsEmptyIntArray()
  2. TreeTableTest.java

    • testFindNodesIdent()
    • testFindNodesAllClassDefs()
  3. GeneratedJavaTokenTypesTest.java

    • testTokenNumbering()
  4. CommitValidationTest.java

    • testRevertCommitMessage()

Before:

String query = "/CLASS_DEF" + "\n" + "//IDENT";

After:

String query = """ /CLASS_DEF //IDENT""";

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions