Skip to content

Commit

Permalink
Merge pull request #15654 from geoand/#15638
Browse files Browse the repository at this point in the history
Handle default values of @consumes and @produces
  • Loading branch information
gsmet authored Mar 12, 2021
2 parents e86d711 + 46f3705 commit b4cea41
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,15 @@ private static String[] extractProducesConsumesValues(AnnotationInstance annotat
if (annotation == null) {
return null;
}
String[] originalStrings = annotation.value().asStringArray();

String[] originalStrings;
AnnotationValue value = annotation.value();
if (value == null) {
originalStrings = new String[] { MediaType.WILDCARD };
} else {
originalStrings = value.asStringArray();
}

if (originalStrings.length > 0) {
List<String> result = new ArrayList<>(originalStrings.length);
for (String s : originalStrings) {
Expand Down

0 comments on commit b4cea41

Please sign in to comment.