Skip to content

Commit e771016

Browse files
author
Marc Vanbrabant
committed
PR comments for #1668
1 parent 42fda1d commit e771016

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Diff for: src/test/java/org/springframework/data/elasticsearch/core/CriteriaQueryMappingUnitTests.java

+3-7
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import java.time.LocalDate;
2121
import java.util.*;
2222

23-
import org.apache.commons.lang3.time.DateUtils;
2423
import org.json.JSONException;
2524
import org.junit.jupiter.api.BeforeEach;
2625
import org.junit.jupiter.api.DisplayName;
@@ -109,7 +108,7 @@ void shouldMapNamesAndConvertValuesInCriteriaQuery() throws JSONException {
109108
}
110109

111110
@Test
112-
// DATAES-1668
111+
// #1668
113112
void shouldMapNamesAndConvertValuesInCriteriaQueryForSubCriteria() throws JSONException {
114113

115114
// use POJO properties and types in the query building
@@ -184,17 +183,14 @@ void shouldMapNamesAndConvertValuesInCriteriaQueryForSubCriteria() throws JSONEx
184183
}
185184

186185
@Test
187-
// DATAES-1668
186+
// #1668
188187
void shouldMapNamesAndConvertValuesInCriteriaQueryForSubCriteriaWithDate() throws JSONException {
189-
Calendar calendar = Calendar.getInstance();
190-
//calendar.set(1982, Calendar.FEBRUARY, 28, 13, 2, 1 );
191-
calendar.setTimeInMillis(383745721653L);
192188
// use POJO properties and types in the query building
193189
CriteriaQuery criteriaQuery = new CriteriaQuery( //
194190
Criteria.or()
195191
.subCriteria( Criteria.where("birthDate") //
196192
.between(LocalDate.of(1989, 11, 9), LocalDate.of(1990, 11, 9)) ) //
197-
.subCriteria( Criteria.where( "createdDate").is(calendar.getTime()) ) //
193+
.subCriteria( Criteria.where( "createdDate").is(383745721653L) ) //
198194
);
199195

200196
// mapped field name and converted parameter

0 commit comments

Comments
 (0)