This input:
@org.immutables.value.Value.Immutable
public abstract class Test {
public abstract @jakarta.annotation.Nullable String getStringJakarta();
public abstract @org.jspecify.annotations.Nullable String getStringJspecify();
public abstract @org.checkerframework.checker.nullness.qual.Nullable String getStringChecker();
}
results in this expected output:
import jakarta.annotation.Nullable;
...
private final @Nullable String stringJakarta;
private final @org.jspecify.annotations.Nullable String stringJspecify;
private final @org.checkerframework.checker.nullness.qual.Nullable String stringChecker;
However, this input:
@org.immutables.value.Value.Immutable
@org.immutables.value.Value.Style(fallbackNullableAnnotation = org.jspecify.annotations.Nullable.class)
public abstract class Test {
public abstract @jakarta.annotation.Nullable String getStringJakarta();
public abstract @org.jspecify.annotations.Nullable String getStringJspecify();
public abstract @org.checkerframework.checker.nullness.qual.Nullable String getStringChecker();
}
results in a bunch of duplicated nullable annotations where they shouldn't be:
import jakarta.annotation.Nullable;
...
private final @Nullable @org.jspecify.annotations.Nullable String stringJakarta;
private final @org.jspecify.annotations.Nullable String stringJspecify;
private final @org.checkerframework.checker.nullness.qual.Nullable @org.jspecify.annotations.Nullable String stringChecker;
I would expect this part of the output to be identical to the first test case.
This input:
results in this expected output:
However, this input:
results in a bunch of duplicated nullable annotations where they shouldn't be:
I would expect this part of the output to be identical to the first test case.