Skip to content

Commit 78fce1c

Browse files
Merge pull request #2 from JuuZoop/main
Added an additional null check to prevent java.lang.NullPointerExcept…
2 parents b102926 + eef07a8 commit 78fce1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/apiaddicts/apitools/openapi2soapui/model/SoapUIProject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ private void setRequestMediaType(RestRequest restRequest, Operation operation) {
593593
Set<String> successResponsesCodes = operation.getResponses().keySet().stream().filter(s -> s.startsWith("2")).collect(Collectors.toSet());
594594
if (!successResponsesCodes.isEmpty()) {
595595
ApiResponse succesResponse = operation.getResponses().get(successResponsesCodes.iterator().next());
596-
if (succesResponse.getContent().entrySet() != null && !succesResponse.getContent().entrySet().isEmpty()) {
596+
if (succesResponse.getContent() != null && succesResponse.getContent().entrySet() != null && !succesResponse.getContent().entrySet().isEmpty()) {
597597
String mediaTypeStr = succesResponse.getContent().entrySet().iterator().next().getKey();
598598
restRequest.setMediaType(mediaTypeStr);
599599
}

0 commit comments

Comments
 (0)