Skip to content

Commit 52415bc

Browse files
committed
Polishing.
Update since version. Reformat code. See: #3761.
1 parent 43de140 commit 52415bc

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

Diff for: spring-data-mongodb/src/main/kotlin/org/springframework/data/mongodb/core/query/TypedCriteriaExtensions.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ infix fun KProperty<GeoJson<*>>.minDistance(d: Double): Criteria =
370370
* See [MongoDB Query operator:
371371
* $maxDistance](https://docs.mongodb.com/manual/reference/operator/query/maxDistance/)
372372
* @author Sangyong Choi
373-
* @since 3.2
373+
* @since 3.2.5
374374
* @see Criteria.maxDistance
375375
*/
376376
infix fun Criteria.maxDistance(d: Double): Criteria =
@@ -380,7 +380,7 @@ infix fun Criteria.maxDistance(d: Double): Criteria =
380380
* Creates a geospatial criterion using a $minDistance operation, for use with $near or
381381
* $nearSphere.
382382
* @author Sangyong Choi
383-
* @since 3.2
383+
* @since 3.2.5
384384
* @see Criteria.minDistance
385385
*/
386386
infix fun Criteria.minDistance(d: Double): Criteria =

Diff for: spring-data-mongodb/src/test/kotlin/org/springframework/data/mongodb/core/query/TypedCriteriaExtensionsTests.kt

+7-4
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ import org.springframework.data.mongodb.core.schema.JsonSchemaObject.Type
2525
import java.util.regex.Pattern
2626

2727
/**
28+
* Unit tests for [Criteria] extensions.
29+
*
2830
* @author Tjeu Kayim
2931
* @author Mark Paluch
32+
* @author Sangyong Choi
3033
*/
3134
class TypedCriteriaExtensionsTests {
3235

@@ -319,8 +322,8 @@ class TypedCriteriaExtensionsTests {
319322

320323
@Test
321324
fun `maxDistance() should equal expected criteria with nearSphere`() {
322-
val point = Point(0.0, 0.0)
323325

326+
val point = Point(0.0, 0.0)
324327
val typed = Building::location nearSphere point maxDistance 3.0
325328
val expected = Criteria("location")
326329
.nearSphere(point)
@@ -331,8 +334,8 @@ class TypedCriteriaExtensionsTests {
331334

332335
@Test
333336
fun `minDistance() should equal expected criteria with nearSphere`() {
334-
val point = Point(0.0, 0.0)
335337

338+
val point = Point(0.0, 0.0)
336339
val typed = Building::location nearSphere point minDistance 3.0
337340
val expected = Criteria("location")
338341
.nearSphere(point)
@@ -343,8 +346,8 @@ class TypedCriteriaExtensionsTests {
343346

344347
@Test
345348
fun `maxDistance() should equal expected criteria with near`() {
346-
val point = Point(0.0, 0.0)
347349

350+
val point = Point(0.0, 0.0)
348351
val typed = Building::location near point maxDistance 3.0
349352
val expected = Criteria("location")
350353
.near(point)
@@ -355,8 +358,8 @@ class TypedCriteriaExtensionsTests {
355358

356359
@Test
357360
fun `minDistance() should equal expected criteria with near`() {
358-
val point = Point(0.0, 0.0)
359361

362+
val point = Point(0.0, 0.0)
360363
val typed = Building::location near point minDistance 3.0
361364
val expected = Criteria("location")
362365
.near(point)

0 commit comments

Comments
 (0)