We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 880ab90 commit 4ee8738Copy full SHA for 4ee8738
1 file changed
compiler/src/main/java/net/jbock/convert/match/OptionalMatcher.java
@@ -32,6 +32,9 @@ public class OptionalMatcher implements Matcher {
32
public <M extends AnnotatedMethod>
33
Optional<Match<M>> tryMatch(
34
M sourceMethod) {
35
+ if (sourceMethod.isVarargsParameter()) {
36
+ return Optional.empty(); // A VarargsParameter cannot match as an Optional.
37
+ }
38
TypeMirror returnType = sourceMethod.returnType();
39
return getOptionalPrimitive(sourceMethod, returnType)
40
.or(() -> matchOptional(sourceMethod, returnType));
0 commit comments