mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix code
This commit is contained in:
parent
9e5a2063d7
commit
fbe78688a1
@ -321,7 +321,7 @@ public class TimeUtil extends TemporalAccessorUtil {
|
||||
* @since 5.3.10
|
||||
*/
|
||||
public static LocalDate parseDate(final CharSequence text, final DateTimeFormatter formatter) {
|
||||
if (null == text) {
|
||||
if (StrUtil.isBlank(text)) {
|
||||
return null;
|
||||
}
|
||||
if (null == formatter) {
|
||||
@ -339,7 +339,7 @@ public class TimeUtil extends TemporalAccessorUtil {
|
||||
* @return {@link LocalDateTime}
|
||||
*/
|
||||
public static LocalDate parseDate(final CharSequence text, final String format) {
|
||||
if (null == text) {
|
||||
if (StrUtil.isBlank(text)) {
|
||||
return null;
|
||||
}
|
||||
return parseDate(text, DateTimeFormatter.ofPattern(format));
|
||||
|
Loading…
x
Reference in New Issue
Block a user