Skip to content

Commit

Permalink
Add varargs changes to ArgumentMatchers#any() JavaDoc (#3003)
Browse files Browse the repository at this point in the history
Fixes #2998
  • Loading branch information
TimvdLippe committed May 8, 2023
1 parent 7d53c57 commit e90aa5e
Showing 1 changed file with 5 additions and 3 deletions.
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

0 comments on commit e90aa5e

Please sign in to comment.