diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/RedactOperation.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/RedactOperation.java index 0ef9914b1..2bc77d358 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/RedactOperation.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/RedactOperation.java @@ -23,7 +23,7 @@ import org.springframework.util.Assert; /** * {@link RedactOperation} allows to restrict the content of a {@link Document} based on information stored within * itself. - * + * *
* RedactOperation.builder() //
* .when(Criteria.where("level").is(5)) //
@@ -89,7 +89,7 @@ public class RedactOperation implements AggregationOperation {
/**
* Builder to create new instance of {@link RedactOperation}.
- *
+ *
* @author Christoph Strobl
*/
public static class RedactOperationBuilder {
@@ -98,9 +98,13 @@ public class RedactOperation implements AggregationOperation {
private Object then;
private Object otherwise;
+ private RedactOperationBuilder() {
+
+ }
+
/**
* Specify the evaluation condition.
- *
+ *
* @param criteria must not be {@literal null}.
* @return this.
*/
@@ -204,7 +208,7 @@ public class RedactOperation implements AggregationOperation {
/**
* Define the outcome (anything that resolves to {@literal $$DESCEND}, {@literal $$PRUNE}, or {@literal $$KEEP})
* when the condition is not met.
- *
+ *
* @param otherwise must not be {@literal null}.
* @return this.
*/
diff --git a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/RedactOperationUnitTests.java b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/RedactOperationUnitTests.java
index 93b422468..1e9946973 100644
--- a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/RedactOperationUnitTests.java
+++ b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/RedactOperationUnitTests.java
@@ -32,6 +32,8 @@ import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.lang.Nullable;
/**
+ * Unit tests for {@link RedactOperation}.
+ *
* @author Christoph Strobl
*/
class RedactOperationUnitTests {