You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting a compiler warning Redundant java.lang.SafeVarargs annotation. Varargs element type java.lang.String is reifiable. because immutables creates the @SafeVarargs annotation even for primitive types/reifiable types (like String)
.....
@SafeVarargs
public final Builder addAvailable(String... elements) {
this.available_list = this.available_list.appendAll(Arrays.asList(elements));
return this;
}
...
}
in my understanding, the @SaveVarargs should only be generated when the variable argument types contain type parameters?
Why does this matter? I'm trying to harden my project by setting the -Werror javac compiler option, but this code in immutables is still preventing that.
Putting the @SuppressWarnings({ "all", "varargs" }) on my interface does work as a workaround, but feels wrong.
The text was updated successfully, but these errors were encountered:
Hi!
I'm using immutables-value 2.7.5
I'm getting a compiler warning
Redundant java.lang.SafeVarargs annotation. Varargs element type java.lang.String is reifiable.
because immutables creates the @SafeVarargs annotation even for primitive types/reifiable types (like String)my interface looks like this
which then creates
in my understanding, the
@SaveVarargs
should only be generated when the variable argument types contain type parameters?Why does this matter? I'm trying to harden my project by setting the
-Werror
javac compiler option, but this code in immutables is still preventing that.Putting the
@SuppressWarnings({ "all", "varargs" })
on my interface does work as a workaround, but feels wrong.The text was updated successfully, but these errors were encountered: