Skip to content

Commit 17d06f2

Browse files
fixing build issues
1 parent 9a65f52 commit 17d06f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private Object[] invocationArgs(DataFetchingEnvironment environment, ProcessingE
134134
@SuppressWarnings("ConstantConditions")
135135
private Object buildArg(Type p, GraphQLType graphQLType, Object arg) {
136136
Optional<Object> optionalArg = Optional.ofNullable(arg);
137-
if (optionalArg.isEmpty()) {
137+
if (!optionalArg.isPresent()) {
138138
return null;
139139
}
140140
if (graphQLType instanceof graphql.schema.GraphQLNonNull) {
@@ -167,7 +167,7 @@ private Object buildArg(Type p, GraphQLType graphQLType, Object arg) {
167167
}
168168
} else if (p instanceof ParameterizedType && graphQLType instanceof GraphQLList) {
169169
if (((ParameterizedType) p).getRawType() == Optional.class) {
170-
if (optionalArg.isEmpty()) {
170+
if (!optionalArg.isPresent()) {
171171
return null;
172172
} else {
173173
Type subType = ((ParameterizedType) p).getActualTypeArguments()[0];

0 commit comments

Comments
 (0)