Skip to content

Commit

Permalink
Avoid potential NPE when collecting RESTEasy Providers on Resource me…
Browse files Browse the repository at this point in the history
…thods

Fixes: quarkusio#14418
  • Loading branch information
geoand committed Jan 20, 2021
1 parent 500af4d commit 9d3a9a2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,12 @@ private static boolean collectDeclaredProvidersForMethodAndMediaTypeAnnotation(S
return true;
}
}
String[] mediaTypes = { MediaType.WILDCARD };
if (mediaTypeMethodAnnotationInstance.value() != null) {
mediaTypes = mediaTypeMethodAnnotationInstance.value().asStringArray();
}
if (collectDeclaredProvidersForMediaTypeAnnotationInstance(providersToRegister, categorizedProviders,
mediaTypeMethodAnnotationInstance.value().asStringArray(), methodTarget)) {
mediaTypes, methodTarget)) {
return true;
}

Expand Down

0 comments on commit 9d3a9a2

Please sign in to comment.