[JAVA-3223] Filters.nearSphere lacks Nullable annotations Created: 10/Mar/19  Updated: 28/Oct/23  Resolved: 02/Apr/19

Status: Closed
Project: Java Driver
Component/s: Builders
Affects Version/s: 3.10.1
Fix Version/s: 3.11.0

Type: Improvement Priority: Minor - P4
Reporter: Marc Knaup Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible

 Description   

maxDistance and minDistance of Filters.nearSphere overloads are optional but not marked as @Nullable which makes it impossible to pass null values from Kotlin

Example:

public static Bson nearSphere(final String fieldName, final Bson geometry, final Double maxDistance, final Double minDistance)

should be

public static Bson nearSphere(final String fieldName, final Bson geometry, @Nullable final Double maxDistance, }}{{@Nullable }}{{final Double minDistance)



 Comments   
Comment by Githook User [ 02/Apr/19 ]

Author:

{'name': 'Jeff Yemin', 'username': 'jyemin', 'email': 'jeff.yemin@10gen.com'}

Message: Annotate minDistance/maxDistance parameters as Nullable in Filters class

JAVA-3223
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/dc0fc922a99cd1aec80b405521834e423e45e367

Generated at Thu Feb 08 08:59:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.