Skip to content

Issue #16981: Migrate to Java 21 - [noTrailingWhitespace] not aware of string block """ #16984

@Pankraz76

Description

@Pankraz76

Issue #16981: Migrate to Java 21 - [noTrailingWhitespace] not aware of string block """

    @Test
    public void testRequiredTokenIsEmptyIntArray() throws Exception {
        final File file = new File(temporaryFolder, "file.java");
        try (Writer writer = Files.newBufferedWriter(file.toPath(), StandardCharsets.UTF_8)) {
            final String configComment = """
                    /*
                    com.puppycrawl.tools.checkstyle.TreeWalkerTest\
                    $RequiredTokenIsEmptyIntArray
                    
                    */
                    """;
            writer.write(configComment);
        }
        final String[] expected = CommonUtil.EMPTY_STRING_ARRAY;
        verifyWithInlineConfigParserTwice(file.getPath(), expected);
    }
Image

#16981

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions