Util#fixNull: Address Javadoc comments and add annotations

This commit is contained in:
Oleg Nenashev authored and GitHub committed 2018-09-30 12:37:53 +02:00
1 parent 179d597679
commit beadc5946f
1 file changed
+4 -2
+4 -2
View File
@@ -1199,9 +1199,11 @@ public class Util {
}
/**
* Convert null to defaultValue.
* Convert {@code null} to a default value.
* @since TODO
*/
public static <T> T fixNull(@CheckForNull T s, T defaultValue) {
@Nonnull
public static <T> T fixNull(@CheckForNull T s, @Nonnull T defaultValue) {
return s != null ? s : defaultValue;
}