Skip to content

Commit 31f640a

Browse files
Polishing.
Update java doc and add issue references to tests. Original Pull Request: #3858
1 parent 54f098a commit 31f640a

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

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

+9-7
Original file line numberDiff line numberDiff line change
@@ -799,12 +799,12 @@ public Cosh cosh() {
799799
public Cosh cosh(AngularUnit unit) {
800800
return usesFieldRef() ? Cosh.coshOf(fieldReference, unit) : Cosh.coshOf(expression, unit);
801801
}
802-
802+
803803
/**
804804
* Creates new {@link AggregationExpression} that calculates the inverse cosine of a numeric value.
805805
*
806806
* @return new instance of {@link ACos}.
807-
* @since 3.3
807+
* @since 3.4
808808
*/
809809
public ACos acos() {
810810
return usesFieldRef() ? ACos.acosOf(fieldReference) : ACos.acosOf(expression);
@@ -814,7 +814,7 @@ public ACos acos() {
814814
* Creates new {@link AggregationExpression} that calculates the inverse hyperbolic cosine of a numeric value.
815815
*
816816
* @return new instance of {@link ACosh}.
817-
* @since 3.3
817+
* @since 3.4
818818
*/
819819
public ACosh acosh() {
820820
return usesFieldRef() ? ACosh.acoshOf(fieldReference) : ACosh.acoshOf(expression);
@@ -2482,7 +2482,6 @@ protected String getMongoMethod() {
24822482
}
24832483
}
24842484

2485-
24862485
/**
24872486
* An {@link AggregationExpression expression} that calculates the cosine of a value that is measured in radians.
24882487
*
@@ -2684,10 +2683,12 @@ protected String getMongoMethod() {
26842683
return "$cosh";
26852684
}
26862685
}
2687-
2686+
26882687
/**
26892688
* An {@link AggregationExpression expression} that calculates the inverse cosine of a value.
26902689
*
2690+
* @author Divya Srivastava
2691+
* @since 3.4
26912692
*/
26922693
public static class ACos extends AbstractAggregationExpression {
26932694

@@ -2736,8 +2737,10 @@ protected String getMongoMethod() {
27362737
}
27372738

27382739
/**
2739-
* An {@link AggregationExpression expression} that calculates the inverse hyperbolic cosine of a value
2740+
* An {@link AggregationExpression expression} that calculates the inverse hyperbolic cosine of a value.
27402741
*
2742+
* @author Divya Srivastava
2743+
* @since 3.4
27412744
*/
27422745
public static class ACosh extends AbstractAggregationExpression {
27432746

@@ -2972,7 +2975,6 @@ public static ATan2 valueOf(AggregationExpression expression) {
29722975
return new ATan2((Collections.singletonList(expression)));
29732976
}
29742977

2975-
29762978
/**
29772979
* Creates a new {@link AggregationExpression} that calculates the inverse tangent of of y / x, where y and x are
29782980
* the first and second values passed to the expression respectively.

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,12 @@ void rendersCosh() {
139139
assertThat(valueOf("angle").cosh().toDocument(Aggregation.DEFAULT_CONTEXT)).isEqualTo("{ $cosh : \"$angle\" }");
140140
}
141141

142-
@Test
142+
@Test // GH-3707
143143
void rendersACos() {
144144
assertThat(valueOf("field").acos().toDocument(Aggregation.DEFAULT_CONTEXT)).isEqualTo("{ $acos : \"$field\" }");
145145
}
146146

147-
@Test
147+
@Test // GH-3707
148148
void rendersACosh() {
149149
assertThat(valueOf("field").acosh().toDocument(Aggregation.DEFAULT_CONTEXT)).isEqualTo("{ $acosh : \"$field\" }");
150150
}

src/main/asciidoc/reference/aggregation-framework.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ At the time of this writing, we provide support for the following Aggregation Op
8585
| `addToSet`, `covariancePop`, `covarianceSamp`, `expMovingAvg`, `first`, `last`, `max`, `min`, `avg`, `push`, `sum`, `count` (+++*+++), `stdDevPop`, `stdDevSamp`
8686

8787
| Arithmetic Aggregation Operators
88-
| `abs`, `add` (+++*+++ via `plus`), `asin`, `asin`, `atan`, `atan2`, `atanh`, `ceil`, `cos`, `cosh`, `derivative`, `divide`, `exp`, `floor`, `integral`, `ln`, `log`, `log10`, `mod`, `multiply`, `pow`, `round`, `sqrt`, `subtract` (+++*+++ via `minus`), `sin`, `sinh`, `tan`, `tanh`, `trunc`
88+
| `abs`, `acos`, `acosh`, `add` (+++*+++ via `plus`), `asin`, `asin`, `atan`, `atan2`, `atanh`, `ceil`, `cos`, `cosh`, `derivative`, `divide`, `exp`, `floor`, `integral`, `ln`, `log`, `log10`, `mod`, `multiply`, `pow`, `round`, `sqrt`, `subtract` (+++*+++ via `minus`), `sin`, `sinh`, `tan`, `tanh`, `trunc`
8989

9090
| String Aggregation Operators
9191
| `concat`, `substr`, `toLower`, `toUpper`, `strcasecmp`, `indexOfBytes`, `indexOfCP`, `regexFind`, `regexFindAll`, `regexMatch`, `split`, `strLenBytes`, `strLenCP`, `substrCP`, `trim`, `ltrim`, `rtim`

0 commit comments

Comments
 (0)