diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ArithmeticOperators.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ArithmeticOperators.java index 40f28d94c..fa21ccb95 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ArithmeticOperators.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/aggregation/ArithmeticOperators.java @@ -516,7 +516,7 @@ public class ArithmeticOperators { * place. * * @return new instance of {@link Round}. - * @since 3.0 + * @since 2.3 */ public Round round() { return usesFieldRef() ? Round.roundValueOf(fieldReference) : Round.roundValueOf(expression); @@ -526,7 +526,7 @@ public class ArithmeticOperators { * Creates new {@link AggregationExpression} that rounds a number to a specified decimal place. * * @return new instance of {@link Round}. - * @since 3.0 + * @since 2.3 */ public Round roundToPlace(int place) { return round().place(place); @@ -1445,7 +1445,7 @@ public class ArithmeticOperators { } /** - * {@link Round} rounds a number to a whole integer or to a specified decimal place.
+ * {@link Round} rounds a number to a whole integer or to a specified decimal place. * * - * @since 3.0 + * @since 2.3 */ public static class Round extends AbstractAggregationExpression { diff --git a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/ArithmeticOperatorsUnitTests.java b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/ArithmeticOperatorsUnitTests.java index 4fd7a226a..8c11222a3 100644 --- a/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/ArithmeticOperatorsUnitTests.java +++ b/spring-data-mongodb/src/test/java/org/springframework/data/mongodb/core/aggregation/ArithmeticOperatorsUnitTests.java @@ -25,9 +25,10 @@ import org.bson.Document; import org.junit.jupiter.api.Test; /** + * Unit tests for {@link Round}. + * * @author Christoph Strobl */ - public class ArithmeticOperatorsUnitTests { @Test // DATAMONGO-2370 @@ -41,7 +42,7 @@ public class ArithmeticOperatorsUnitTests { void roundShouldWithPlace() { assertThat(valueOf("field").roundToPlace(3).toDocument(Aggregation.DEFAULT_CONTEXT)) - .isEqualTo(new Document("$round", Arrays.asList("$field", Integer.valueOf(3)))); + .isEqualTo(new Document("$round", Arrays.asList("$field", 3))); } @Test // DATAMONGO-2370 diff --git a/src/main/asciidoc/reference/mongodb.adoc b/src/main/asciidoc/reference/mongodb.adoc index f4a9a1985..fe5d0f8ff 100644 --- a/src/main/asciidoc/reference/mongodb.adoc +++ b/src/main/asciidoc/reference/mongodb.adoc @@ -2516,7 +2516,7 @@ At the time of this writing, we provide support for the following Aggregation Op | `addToSet`, `first`, `last`, `max`, `min`, `avg`, `push`, `sum`, `(*count)`, `stdDevPop`, `stdDevSamp` | Arithmetic Aggregation Operators -| `abs`, `add` (*via `plus`), `ceil`, `divide`, `exp`, `floor`, `ln`, `log`, `log10`, `mod`, `multiply`, `pow`, `sqrt`, `subtract` (*via `minus`), `trunc`, `round` +| `abs`, `add` (*via `plus`), `ceil`, `divide`, `exp`, `floor`, `ln`, `log`, `log10`, `mod`, `multiply`, `pow`, `round`, `sqrt`, `subtract` (*via `minus`), `trunc` | String Aggregation Operators | `concat`, `substr`, `toLower`, `toUpper`, `stcasecmp`, `indexOfBytes`, `indexOfCP`, `split`, `strLenBytes`, `strLenCP`, `substrCP`, `trim`, `ltrim`, `rtim`