Browse Source

Polishing.

See #3720
Original pull request: #3745.
pull/3765/head
Mark Paluch 4 years ago
parent
commit
fd0a402c99
No known key found for this signature in database
GPG Key ID: 4406B84C1661DCD1
  1. 9
      spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ConditionalOperators.java
  2. 4
      spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/ConditionalOperatorsUnitTests.java

9
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ConditionalOperators.java

@ -252,7 +252,8 @@ public class ConditionalOperators {
/** /**
* Creates new {@link IfNull}. * Creates new {@link IfNull}.
* *
* @param fieldReference the field to check for a {@literal null} value, field reference must not be {@literal null}. * @param fieldReference the field to check for a {@literal null} value, field reference must not be
* {@literal null}.
* @return never {@literal null}. * @return never {@literal null}.
*/ */
public static ThenBuilder ifNull(String fieldReference) { public static ThenBuilder ifNull(String fieldReference) {
@ -346,7 +347,8 @@ public class ConditionalOperators {
public interface OrBuilder { public interface OrBuilder {
/** /**
* @param fieldReference the field to check for a {@literal null} value, field reference must not be {@literal null}. * @param fieldReference the field to check for a {@literal null} value, field reference must not be
* {@literal null}.
* @return the {@link ThenBuilder} * @return the {@link ThenBuilder}
*/ */
ThenBuilder orIfNull(String fieldReference); ThenBuilder orIfNull(String fieldReference);
@ -902,8 +904,7 @@ public class ConditionalOperators {
private @Nullable Object condition; private @Nullable Object condition;
private @Nullable Object thenValue; private @Nullable Object thenValue;
private ConditionalExpressionBuilder() { private ConditionalExpressionBuilder() {}
}
/** /**
* Creates a new builder for {@link Cond}. * Creates a new builder for {@link Cond}.

4
spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/ConditionalOperatorsUnitTests.java

@ -22,9 +22,11 @@ import org.bson.Document;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
/** /**
* Unit tests for {@link ConditionalOperators}.
*
* @author Christoph Strobl * @author Christoph Strobl
*/ */
public class ConditionalOperatorsUnitTests { class ConditionalOperatorsUnitTests {
@Test // GH-3720 @Test // GH-3720
void rendersIfNullWithMultipleConditionalValuesCorrectly() { void rendersIfNullWithMultipleConditionalValuesCorrectly() {

Loading…
Cancel
Save