Hi,
in recent versions google guava migrated from jsr305 @Nullable to Checker Framework @NullableDecl.
E.g. Strings.java:
public static String nullToEmpty(@NullableDecl String string) {
return (string == null) ? "" : string;
}
Now the code:
String notNull = Strings.nullToEmpty(string);
reports for S4449 the following warning:
Argument can be null.
Annotate the parameter with @javax.annotation.Nullable in method 'nullToEmpty' declaration, or make sure that null can not be passed as argument.
Could "S4449 Nullness of parameters should be guaranteed" also support @Nullable/@NullableDecl from checker framework?
Jiri Pejchal