Skip to content

Commit 5b992a8

Browse files
committed
code review
1 parent 963db04 commit 5b992a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

springdoc-openapi-data-rest/src/main/java/org/springdoc/data/rest/utils/SpringDocDataRestUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@ private List<String> getIgnoredFields(ResourceMetadata
405405
* @param content the content
406406
*/
407407
public void buildTextUriContent(Content content) {
408-
if (content.containsKey(RestMediaTypes.TEXT_URI_LIST_VALUE))
409-
content.put(RestMediaTypes.TEXT_URI_LIST_VALUE, new MediaType().schema(new StringSchema()));
408+
content.computeIfPresent(RestMediaTypes.TEXT_URI_LIST_VALUE,
409+
(key, value) -> new MediaType().schema(new StringSchema()));
410410
}
411411

412412
}

0 commit comments

Comments
 (0)