Skip to content

Commit dd3430e

Browse files
anttipdgriffon
andauthored
Apply suggestion from @dgriffon
Co-authored-by: David Griffon <[email protected]>
1 parent 5df34f2 commit dd3430e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/graphql/annotations/dataFetchers/MethodDataFetcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ private Object buildArg(Type p, GraphQLType graphQLType, Object arg) {
119119
if (arg == null) {
120120
// for Optional parameters null should be returned as Optional.empty() to show a request for a null value
121121
// and not including the parameter in the query at all should be returned as null to show "undefined" value / not set
122-
if ((p instanceof ParameterizedType && ((ParameterizedType) p).getRawType() == Optional.class)) {
122+
if (p instanceof ParameterizedType && ((ParameterizedType) p).getRawType() == Optional.class) {
123123
return Optional.empty();
124124
}
125125
return null;

0 commit comments

Comments
 (0)