diff --git a/core/src/main/java/hudson/Util.java b/core/src/main/java/hudson/Util.java
index 00a88df95e..ac4b7e0d90 100644
--- a/core/src/main/java/hudson/Util.java
+++ b/core/src/main/java/hudson/Util.java
@@ -1199,7 +1199,7 @@ public class Util {
}
/**
- * Convert {@code null} to a default value.
+ * Convert {@code null} to a default immutable value.
* @since TODO
*/
@Nonnull
@@ -1227,21 +1227,53 @@ public class Util {
return fixEmpty(s.trim());
}
+ /**
+ *
+ * @param l list to check
+ * @param
+ * @return
+ * l if l is not {@code null}
+ * an empty immutable list if l is {@code null}
+ */
@Nonnull
public static List fixNull(@CheckForNull List l) {
return fixNull(l, Collections.emptyList());
}
+ /**
+ *
+ * @param l set to check
+ * @param
+ * @return
+ * l if l is not {@code null}
+ * an empty immutable set if l is {@code null}
+ */
@Nonnull
public static Set fixNull(@CheckForNull Set l) {
return fixNull(l, Collections.emptySet());
}
+ /**
+ *
+ * @param l collection to check
+ * @param
+ * @return
+ * l if l is not {@code null}
+ * an empty immutable set if l is {@code null}
+ */
@Nonnull
public static Collection fixNull(@CheckForNull Collection l) {
return fixNull(l, Collections.emptySet());
}
+ /**
+ *
+ * @param l iterable to check
+ * @param
+ * @return
+ * l if l is not {@code null}
+ * an empty immutable set if l is {@code null}
+ */
@Nonnull
public static Iterable fixNull(@CheckForNull Iterable l) {
return fixNull(l, Collections.emptySet());