Skip to content

Commit

Permalink
Add null check to vModelId
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Geada <[email protected]>
  • Loading branch information
RobGeada authored Oct 17, 2023
1 parent b475614 commit bc1c6ec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/java/com/ibm/watson/modelmesh/ModelMeshApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -766,8 +766,9 @@ public void onHalfClose() {
}
} finally {
if (payloadProcessor != null) {
String payloadModelID = vModelId == null ? resolvedModelId : vModelId;
processPayload(reqMessage.readerIndex(reqReaderIndex),
requestId, vModelId, methodName, headers, null, true);
requestId, payloadModelId, methodName, headers, null, true);
} else {
releaseReqMessage();
}
Expand Down Expand Up @@ -803,7 +804,8 @@ public void onHalfClose() {
data = response.data.readerIndex(respReaderIndex);
metadata = response.metadata;
}
processPayload(data, requestId, vModelId, methodName, metadata, status, releaseResponse);
String payloadModelID = vModelId == null ? resolvedModelId : vModelId;
processPayload(data, requestId, payloadModelId, methodName, metadata, status, releaseResponse);
} else if (releaseResponse && response != null) {
response.release();
}
Expand Down

0 comments on commit bc1c6ec

Please sign in to comment.