Skip to content

Commit 44cd8d1

Browse files
committed
Merged for javadoc
2 parents bc32cdd + 04c94bb commit 44cd8d1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mug/src/main/java/com/google/mu/annotations/ParametersMustMatchByName.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@
3232
* new Profile(currentUser.getId(), currentUser.getName())
3333
* }</pre>
3434
*
35-
* But if you changed the constructor signature to {@code
35+
* But if you change the constructor signature to {@code
3636
* record Profile(String userName, String userId)}. it will fail to compile because the parameter
37-
* name doesn't match the provided arguments.
37+
* names no longer match the provided argument expressions, in order.
3838
*
3939
* <p>The {@code currentUser.getId()} expression matches the {@code userId} parameter name
4040
* because the effective tokens of {@code currentUser.getId()} is {@code ["current", "user", "id"]}
4141
* ("get" and "is" prefixes are ignored). It includes as a subsequence the {@code ["user", "id"]}
4242
* tokens from {@code userId}.
4343
*
44-
* <p>If the argument expression is indeed as expected despite not matching the parameter name,
45-
* you can always add an explicit comment to tell the compiler <em>and the code readers</em> that:
46-
* "trust me, I know what I'm doing".
44+
* <p>Occasionally, if the argument expression is indeed as expected despite not matching the
45+
* parameter name, you can always add an explicit comment to tell the compiler
46+
* <em>and the code readers</em> that: "trust me, I know what I'm doing".
4747
*
4848
* <p>For example: <pre>
4949
* new Dimension(&#47;* width *&#47; list.get(0), &#47;* height *&#47; list.get(1));

0 commit comments

Comments
 (0)