Skip to content

Commit c826adb

Browse files
authored
Fix incorrect argument check asserts.
Original Pull Request #2169 Closes #2170
1 parent 1eaebde commit c826adb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/springframework/data/elasticsearch/core/convert/ElasticsearchDateConverter.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ public static ElasticsearchDateConverter of(DateFormat dateFormat) {
6666
*/
6767
public static ElasticsearchDateConverter of(String pattern) {
6868

69-
Assert.notNull(pattern, "pattern must not be null");
7069
Assert.hasText(pattern, "pattern must not be empty");
7170

7271
String[] subPatterns = pattern.split("\\|\\|");
@@ -86,7 +85,7 @@ private ElasticsearchDateConverter(DateFormatter dateFormatter) {
8685
*/
8786
public String format(TemporalAccessor accessor) {
8887

89-
Assert.notNull("accessor", "accessor must not be null");
88+
Assert.notNull(accessor, "accessor must not be null");
9089

9190
if (accessor instanceof Instant) {
9291
Instant instant = (Instant) accessor;

0 commit comments

Comments
 (0)