Skip to content

Commit 73a396b

Browse files
cigalybeikov
authored andcommitted
HHH-19464 Do not assume that EOF is reached if InputStream.read(byte[]) returns less bytes than buffer length
1 parent b342a62 commit 73a396b

File tree

1 file changed

+0
-4
lines changed
  • hibernate-core/src/main/java/org/hibernate/type/descriptor/java

1 file changed

+0
-4
lines changed

hibernate-core/src/main/java/org/hibernate/type/descriptor/java/DataHelper.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,10 +222,6 @@ public static byte[] extractBytes(InputStream inputStream, long start, int lengt
222222
break;
223223
}
224224
outputStream.write( buffer, 0, amountRead );
225-
if ( amountRead < buffer.length ) {
226-
// we have read up to the end of stream
227-
break;
228-
}
229225
bytesRead += amountRead;
230226
if ( bytesRead >= length ) {
231227
break;

0 commit comments

Comments
 (0)