Skip to content

Commit

Permalink
Merge pull request #515 from project-tsurugi/amend
Browse files Browse the repository at this point in the history
address corner cases in blob/clob processing
  • Loading branch information
t-horikawa authored Jan 30, 2025
2 parents cc7b9db + 87a1550 commit ab2cdd9
Showing 1 changed file with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,13 @@ public InputStream openSubResponse(String id) throws NoSuchElementException, IOE
waitForResultSetOrMainResponse();
return relationChannel();
} else {
var path = blobs.get(id).getLeft();
if (path != null) {
return new FileInputStream(path);
waitForMainResponse();
var entry = blobs.get(id);
if (entry != null) {
var path = entry.getLeft();
if (path != null) {
return new FileInputStream(path);
}
}
}
throw new NoSuchElementException("illegal SubResponse id");
Expand All @@ -174,9 +178,13 @@ public InputStream openSubResponse(String id, long timeout, TimeUnit unit) throw
waitForResultSetOrMainResponse(timeout, unit);
return relationChannel();
} else {
var path = blobs.get(id).getLeft();
if (path != null) {
return new FileInputStream(path);
waitForMainResponse(timeout, unit);
var entry = blobs.get(id);
if (entry != null) {
var path = entry.getLeft();
if (path != null) {
return new FileInputStream(path);
}
}
}
throw new NoSuchElementException("illegal SubResponse id");
Expand Down

0 comments on commit ab2cdd9

Please sign in to comment.