Skip to content

Commit af140d6

Browse files
hpa16Google Java Core Libraries
authored andcommitted
Fix grammar in Javadoc comments.
Fixes #1022 COPYBARA_INTEGRATE_REVIEW=#1022 from hpa16:fix-docs b3619e9 PiperOrigin-RevId: 647376732
1 parent afda443 commit af140d6

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

core/src/main/java/com/google/common/truth/IterableSubject.java

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ protected IterableSubject(FailureMetadata metadata, @Nullable Iterable<?> iterab
115115
protected String actualCustomStringRepresentation() {
116116
if (actual != null) {
117117
// Check the value of iterable.toString() against the default Object.toString() implementation
118-
// so we can avoid things like "com.google.common.graph.Traverser$GraphTraverser$1@5e316c74"
118+
// so that we can avoid things like
119+
// "com.google.common.graph.Traverser$GraphTraverser$1@5e316c74"
119120
String objectToString =
120121
actual.getClass().getName() + '@' + Integer.toHexString(System.identityHashCode(actual));
121122
if (actual.toString().equals(objectToString)) {
@@ -256,7 +257,7 @@ public final void containsAnyIn(@Nullable Object[] expected) {
256257
}
257258

258259
/**
259-
* Checks that the actual iterable contains at least all of the expected elements or fails. If an
260+
* Checks that the actual iterable contains at least all the expected elements or fails. If an
260261
* element appears more than once in the expected elements to this call then it must appear at
261262
* least that number of times in the actual elements.
262263
*
@@ -273,7 +274,7 @@ public final Ordered containsAtLeast(
273274
}
274275

275276
/**
276-
* Checks that the actual iterable contains at least all of the expected elements or fails. If an
277+
* Checks that the actual iterable contains at least all the expected elements or fails. If an
277278
* element appears more than once in the expected elements then it must appear at least that
278279
* number of times in the actual elements.
279280
*
@@ -333,7 +334,7 @@ public void inOrder() {
333334
}
334335

335336
/**
336-
* Checks that the actual iterable contains at least all of the expected elements or fails. If an
337+
* Checks that the actual iterable contains at least all the expected elements or fails. If an
337338
* element appears more than once in the expected elements then it must appear at least that
338339
* number of times in the actual elements.
339340
*
@@ -711,7 +712,7 @@ enum ElementFactGrouping {
711712
}
712713

713714
/**
714-
* Checks that a actual iterable contains none of the excluded objects or fails. (Duplicates are
715+
* Checks that an actual iterable contains none of the excluded objects or fails. (Duplicates are
715716
* irrelevant to this test, which fails if any of the actual elements equal any of the excluded.)
716717
*/
717718
public final void containsNoneOf(
@@ -1043,7 +1044,7 @@ public final String toString() {
10431044
*
10441045
* <p>On assertions where it makes sense to do so, the elements are paired as follows: they are
10451046
* keyed by {@code keyFunction}, and if an unexpected element and a missing element have the
1046-
* same non-null key then the they are paired up. (Elements with null keys are not paired.) The
1047+
* same non-null key then they are paired up. (Elements with null keys are not paired.) The
10471048
* failure message will show paired elements together, and a diff will be shown if the {@link
10481049
* Correspondence#formatDiff} method returns non-null.
10491050
*
@@ -1085,8 +1086,8 @@ public UsingCorrespondence<A, E> displayingDiffsPairedBy(Function<? super E, ?>
10851086
* <p>On assertions where it makes sense to do so, the elements are paired as follows: the
10861087
* unexpected elements are keyed by {@code actualKeyFunction}, the missing elements are keyed by
10871088
* {@code expectedKeyFunction}, and if an unexpected element and a missing element have the same
1088-
* non-null key then the they are paired up. (Elements with null keys are not paired.) The
1089-
* failure message will show paired elements together, and a diff will be shown if the {@link
1089+
* non-null key then they are paired up. (Elements with null keys are not paired.) The failure
1090+
* message will show paired elements together, and a diff will be shown if the {@link
10901091
* Correspondence#formatDiff} method returns non-null.
10911092
*
10921093
* <p>The expected elements given in the assertion should be uniquely keyed by {@code
@@ -1561,8 +1562,8 @@ private boolean failIfOneToOneMappingHasMissingOrExtra(
15611562
}
15621563

15631564
/**
1564-
* Checks that the subject contains elements that corresponds to all of the expected elements,
1565-
* i.e. that there is a 1:1 mapping between any subset of the actual elements and the expected
1565+
* Checks that the subject contains elements that correspond to all the expected elements, i.e.
1566+
* that there is a 1:1 mapping between any subset of the actual elements and the expected
15661567
* elements where each pair of elements correspond.
15671568
*
15681569
* <p>To also test that the contents appear in the given order, make a call to {@code inOrder()}
@@ -1576,8 +1577,8 @@ public final Ordered containsAtLeast(E first, E second, E @Nullable ... rest) {
15761577
}
15771578

15781579
/**
1579-
* Checks that the subject contains elements that corresponds to all of the expected elements,
1580-
* i.e. that there is a 1:1 mapping between any subset of the actual elements and the expected
1580+
* Checks that the subject contains elements that correspond to all the expected elements, i.e.
1581+
* that there is a 1:1 mapping between any subset of the actual elements and the expected
15811582
* elements where each pair of elements correspond.
15821583
*
15831584
* <p>To also test that the contents appear in the given order, make a call to {@code inOrder()}
@@ -1642,8 +1643,8 @@ public void inOrder() {
16421643
}
16431644

16441645
/**
1645-
* Checks that the subject contains elements that corresponds to all of the expected elements,
1646-
* i.e. that there is a 1:1 mapping between any subset of the actual elements and the expected
1646+
* Checks that the subject contains elements that correspond to all the expected elements, i.e.
1647+
* that there is a 1:1 mapping between any subset of the actual elements and the expected
16471648
* elements where each pair of elements correspond.
16481649
*
16491650
* <p>To also test that the contents appear in the given order, make a call to {@code inOrder()}

core/src/main/java/com/google/common/truth/Platform.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static boolean containsMatch(String actual, String regex) {
5858
}
5959

6060
/**
61-
* Returns an array containing all of the exceptions that were suppressed to deliver the given
61+
* Returns an array containing all the exceptions that were suppressed to deliver the given
6262
* exception. If suppressed exceptions are not supported (pre-Java 1.7), an empty array will be
6363
* returned.
6464
*/

core/src/main/java/com/google/common/truth/super/com/google/common/truth/Platform.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static boolean containsMatch(String subject, String regex) {
6060
}
6161

6262
/**
63-
* Returns an array containing all of the exceptions that were suppressed to deliver the given
63+
* Returns an array containing all the exceptions that were suppressed to deliver the given
6464
* exception. Delegates to the getSuppressed() method on Throwable that is available in Java 1.7+
6565
*/
6666
static Throwable[] getSuppressed(Throwable throwable) {

0 commit comments

Comments
 (0)