From acfc20b73b4d4dedda44bf638ee516d49beece47 Mon Sep 17 00:00:00 2001 From: soumyaPrakashB <107208234+soumyaPrakashB@users.noreply.github.com> Date: Tue, 20 Dec 2022 19:07:20 +0530 Subject: [PATCH] Add missing Nullable annotation. For one of constructor arguments of the AggregationOptions the Nullable annotation for the cursor argument is missing. Closes: #4256 --- .../data/mongodb/core/aggregation/AggregationOptions.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationOptions.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationOptions.java index cf3a82438..5e032a874 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationOptions.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/AggregationOptions.java @@ -33,6 +33,7 @@ import org.springframework.util.Assert; * @author Christoph Strobl * @author Mark Paluch * @author Yadhukrishna S Pai + * @author Soumya Prakash Behera * @see Aggregation#withOptions(AggregationOptions) * @see TypedAggregation#withOptions(AggregationOptions) * @since 1.6 @@ -65,7 +66,7 @@ public class AggregationOptions { * @param explain whether to get the execution plan for the aggregation instead of the actual results. * @param cursor can be {@literal null}, used to pass additional options to the aggregation. */ - public AggregationOptions(boolean allowDiskUse, boolean explain, Document cursor) { + public AggregationOptions(boolean allowDiskUse, boolean explain, @Nullable Document cursor) { this(allowDiskUse, explain, cursor, null); }