Reuse own API

This commit is contained in:
Gary Gregory 2022-11-04 16:18:35 -04:00
parent bea5bd3c0a
commit 54e26e04fa

View File

@ -19,6 +19,8 @@
import java.util.TimeZone;
import org.apache.commons.lang3.ObjectUtils;
/**
* Helps to deal with {@link java.util.TimeZone}s.
*
@ -50,7 +52,7 @@ private TimeZones() {
* @since 3.13.0
*/
public static TimeZone toTimeZone(final TimeZone timeZone) {
return timeZone != null ? timeZone : TimeZone.getDefault();
return ObjectUtils.getIfNull(timeZone, TimeZone::getDefault);
}
}