Skip to content

JDK 27: Adapt to sourcePositions.getStartPosition changes in b16 #1637

@wmdietl

Description

@wmdietl

b16 fails with

/home/runner/work/checker-framework/checker-framework/framework/src/main/java/org/checkerframework/framework/source/SourceChecker.java:1911: warning: [removal] getStartPosition(CompilationUnitTree,Tree) in SourcePositions has been deprecated and marked for removal
        long start = sourcePositions.getStartPosition(currentRoot, tree);
> Task :framework:compileJava
                                    ^
/home/runner/work/checker-framework/checker-framework/framework/src/main/java/org/checkerframework/framework/source/SourceChecker.java:1912: warning: [removal] getEndPosition(CompilationUnitTree,Tree) in SourcePositions has been deprecated and marked for removal
        long end = sourcePositions.getEndPosition(currentRoot, tree);
                                  ^
error: warnings found and -Werror specified
/home/runner/work/checker-framework/checker-framework/framework/src/main/java/org/checkerframework/common/basetype/BaseTypeVisitor.java:519: warning: [removal] getStartPosition(CompilationUnitTree,Tree) in SourcePositions has been deprecated and marked for removal
                            positions.getStartPosition(root, expected),
                                     ^

Which comes from a recent change in the JDK. I'll suppress these warnings and file a follow-up issue.

Originally posted by @wmdietl in #1617 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions