Fix incorrect argument check asserts.

Original Pull Request #2169 
Closes #2170
This commit is contained in:
panzhenchao 2022-05-27 22:40:38 +08:00 committed by GitHub
parent 1eaebdec33
commit c826adb152
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,7 +66,6 @@ final public class ElasticsearchDateConverter {
*/
public static ElasticsearchDateConverter of(String pattern) {
Assert.notNull(pattern, "pattern must not be null");
Assert.hasText(pattern, "pattern must not be empty");
String[] subPatterns = pattern.split("\\|\\|");
@ -86,7 +85,7 @@ final public class ElasticsearchDateConverter {
*/
public String format(TemporalAccessor accessor) {
Assert.notNull("accessor", "accessor must not be null");
Assert.notNull(accessor, "accessor must not be null");
if (accessor instanceof Instant) {
Instant instant = (Instant) accessor;