Skip to content

Incompatible types error with @Nullable Void #1451

@sdeleuze

Description

@sdeleuze

Following JSpecify recommandation, I have tried to update a Spring callback from Void to @Nullable Void, but I get the following error with sdeleuze/spring-framework@retry-task-nullability when running ./gradlew build.

> Task :spring-core:compileJava FAILED
/Users/sdeleuze/workspace/spring-framework/spring-core/src/main/java/org/springframework/core/retry/support/RetryTask.java:200: error: [NullAway] incompatible types: TaskCallback<@Nullable Void, RuntimeException> cannot be converted to TaskCallback<V, E>
                RetryTask<@Nullable Void, RuntimeException> rt = new RetryTask<>(TaskCallback.from(task), retryTemplate) {

I am not 100% sure yet that's a NullAway bug, but could be so I would welcome a feedback.

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