Skip to content

Commit 04396ad

Browse files
committed
HHH-19464 Do not assume that EOF is reached if InputStream.read(byte[]) returns less bytes than buffer length
1 parent de77c0d commit 04396ad

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
@@ -220,10 +220,6 @@ public static byte[] extractBytes(InputStream inputStream, long start, int lengt
220220
break;
221221
}
222222
outputStream.write( buffer, 0, amountRead );
223-
if ( amountRead < buffer.length ) {
224-
// we have read up to the end of stream
225-
break;
226-
}
227223
bytesRead += amountRead;
228224
if ( bytesRead >= length ) {
229225
break;

0 commit comments

Comments
 (0)