Skip to content

Commit

Permalink
Mark element matcher interface as unknown null as the parameter might…
Browse files Browse the repository at this point in the history
… contextually be nullable or nonnullable.
  • Loading branch information
raphw committed Dec 17, 2021
1 parent 2e5cddc commit e7b730e
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -17,6 +17,7 @@

import net.bytebuddy.build.HashCodeAndEqualsPlugin;
import net.bytebuddy.utility.nullability.MaybeNull;
import net.bytebuddy.utility.nullability.UnknownNull;

import java.util.ArrayList;
import java.util.Arrays;
Expand All @@ -38,7 +39,7 @@ public interface ElementMatcher<T> {
* @param target The instance to be matched or {@code null}.
* @return {@code true} if the given element is matched by this matcher or {@code false} otherwise.
*/
boolean matches(@MaybeNull T target);
boolean matches(@UnknownNull T target);

/**
* A junctions allows to chain different {@link net.bytebuddy.matcher.ElementMatcher}s in a readable manner.
Expand Down

0 comments on commit e7b730e

Please sign in to comment.