|
|
|
|
@ -58,7 +58,7 @@ class Auditor<T> {
@@ -58,7 +58,7 @@ class Auditor<T> {
|
|
|
|
|
* |
|
|
|
|
* @param source can be {@literal null}. |
|
|
|
|
* @param <T> |
|
|
|
|
* @return {@link Auditor#none()} if the given {@literal source} is {@literal null}. } |
|
|
|
|
* @return {@link Auditor#none()} if the given {@literal source} is {@literal null}. |
|
|
|
|
*/ |
|
|
|
|
@SuppressWarnings({ "unchecked", "rawtypes" }) |
|
|
|
|
public static <T> Auditor<T> of(@Nullable T source) { |
|
|
|
|
@ -77,7 +77,7 @@ class Auditor<T> {
@@ -77,7 +77,7 @@ class Auditor<T> {
|
|
|
|
|
* |
|
|
|
|
* @param source must not be {@literal null}. |
|
|
|
|
* @param <T> |
|
|
|
|
* @return {@link Auditor#none()} if the given {@literal source} is {@literal null}. } |
|
|
|
|
* @return {@link Auditor#none()} if the given {@literal source} is {@literal null}. |
|
|
|
|
*/ |
|
|
|
|
public static <T> Auditor<T> ofOptional(Optional<T> source) { |
|
|
|
|
return Auditor.of(source.orElse(null)); |
|
|
|
|
|