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