Reuse own API
This commit is contained in:
parent
bea5bd3c0a
commit
54e26e04fa
|
@ -19,6 +19,8 @@ package org.apache.commons.lang3.time;
|
|||
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
|
||||
/**
|
||||
* Helps to deal with {@link java.util.TimeZone}s.
|
||||
*
|
||||
|
@ -50,7 +52,7 @@ public class TimeZones {
|
|||
* @since 3.13.0
|
||||
*/
|
||||
public static TimeZone toTimeZone(final TimeZone timeZone) {
|
||||
return timeZone != null ? timeZone : TimeZone.getDefault();
|
||||
return ObjectUtils.getIfNull(timeZone, TimeZone::getDefault);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue