Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add varargs changes to ArgumentMatchers#any() JavaDoc #3003

Merged
merged 1 commit into from May 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/main/java/org/mockito/ArgumentMatchers.java
Expand Up @@ -115,7 +115,7 @@
public class ArgumentMatchers {

/**
* Matches <strong>anything</strong>, including nulls and varargs.
* Matches <strong>anything</strong>, including nulls.
*
* <p>
* See examples in javadoc for {@link ArgumentMatchers} class
Expand All @@ -125,7 +125,8 @@ public class ArgumentMatchers {
* <strong>Notes : </strong><br/>
* <ul>
* <li>For primitive types use {@link #anyChar()} family or {@link #isA(Class)} or {@link #any(Class)}.</li>
* <li>Since mockito 2.1.0 {@link #any(Class)} is not anymore an alias of this method.</li>
* <li>Since Mockito 2.1.0 {@link #any(Class)} is not anymore an alias of this method.</li>
* <li>Since Mockito 5.0.0 this no longer matches varargs. Use {@link #any(Class)} instead.</li>
* </ul>
* </p>
*
Expand Down Expand Up @@ -162,7 +163,8 @@ public static <T> T any() {
* <ul>
* <li>For primitive types use {@link #anyChar()} family.</li>
* <li>Since Mockito 2.1.0 this method will perform a type check thus <code>null</code> values are not authorized.</li>
* <li>Since mockito 2.1.0 {@link #any()} is no longer an alias of this method.</li>
* <li>Since Mockito 2.1.0 {@link #any()} is no longer an alias of this method.</li>
* <li>Since Mockito 5.0.0 this method can match varargs if the array type is specified, for example <code>any(String[].class)</code>.</li>
* </ul>
* </p>
*
Expand Down