Skip to content

Commit 0fa5d2e

Browse files
author
ehennum
committed
check for null content #1055
1 parent 9633151 commit 0fa5d2e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

marklogic-client-api/src/main/java/com/marklogic/client/io/ReaderHandle.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,10 @@ protected ReaderHandle sendContent() {
226226

227227
@Override
228228
public void write(OutputStream out) throws IOException {
229+
if (content == null) {
230+
throw new IllegalStateException("No character stream to send as output");
231+
}
232+
229233
Utilities.write(content, out);
230234
}
231235

0 commit comments

Comments
 (0)