Skip to content

Google-style: Add resources-noncompilable inputs to the compilation by latest jdk #17309

@romani

Description

@romani

detected at #17288 (comment)

error of google formatter execution.

 src/it/resources-noncompilable/com/google/checkstyle/test/chapter4formatting/
    rule462horizontalwhitespace/InputWhitespaceAroundArrowCorrect.java:16:20: 
error: : or -> expected
      case String s when (s.equals("a")) -> {}

this is due gap in our complication coverage.

There is no comment what jdk should be used to compile

package com.google.checkstyle.test.chapter4formatting.rule462horizontalwhitespace;
/** some javadoc. */
public class InputWhitespaceAroundArrowCorrect {

"non-compiled" usually means non-compiled by jdk11 but compiled by some latest jdk. And we have a just another gap here.

Expected:
Add such folders to CI for compilation on all javac CI jobs

javac21)
files=($(grep -Rl --include='*.java' ': Compilable with Java21' \
src/test/resources-noncompilable \
src/xdocs-examples/resources-noncompilable || true))

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