Skip to content

Migrate null annotations to jspecify #1066

Description

@michaelboyles

Currently, the sdk uses Reactor's reactor.util.annotation.Nullable annotations, such as here

public static void notEmpty(@Nullable Collection<?> collection, String message) {

This is causing warnings in my downstream build since that type refers to javax classes I don't have on the classpath.

This is Reactor Nullable, along with its imports:

import javax.annotation.Nonnull;
import javax.annotation.meta.TypeQualifierNickname;
import javax.annotation.meta.When;

@Nonnull(when = When.MAYBE)
@TypeQualifierNickname
@Deprecated
public @interface Nullable {
}

The Reactor type is now deprecated, and they recommend you using JSpecify which is fast becoming the standard, if it is not already.

I can possibly submit a PR for this, but I notice a lot of PRs opened recently have limited activity, so will wait for the go-ahead first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions