mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-09 11:34:55 +00:00
Reuse own API
This commit is contained in:
parent
bea5bd3c0a
commit
54e26e04fa
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user