You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2020/01/19 16:16:12 UTC
[isis] 07/07: ISIS-2223: You cannot assume that any given stream
reading call will fill the byte[] passed in to the method
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
commit d1a888a6e611c0a92e3012de4a83dcae14e7dc88
Author: Andi Huber <ah...@apache.org>
AuthorDate: Sun Jan 19 17:15:54 2020 +0100
ISIS-2223: You cannot assume that any given stream reading call will
fill the byte[] passed in to the method
---
.../org/apache/isis/core/commons/internal/encoding/FieldType.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/core/commons/src/main/java/org/apache/isis/core/commons/internal/encoding/FieldType.java b/core/commons/src/main/java/org/apache/isis/core/commons/internal/encoding/FieldType.java
index ec152e2..9b4ef04 100644
--- a/core/commons/src/main/java/org/apache/isis/core/commons/internal/encoding/FieldType.java
+++ b/core/commons/src/main/java/org/apache/isis/core/commons/internal/encoding/FieldType.java
@@ -42,7 +42,7 @@ import lombok.extern.log4j.Log4j2;
* <p>
* The {@link #write(DataOutputExtended, Object)} writes out field type and then
* the data for that field type. The field type is represented by this
- * enumberation, with the {@link FieldType#getIdx() index} being what is written
+ * enumeration, with the {@link FieldType#getIdx() index} being what is written
* to the stream (hence of type <tt>byte</tt> to keep small).
*
* <p>
@@ -228,7 +228,7 @@ public abstract class FieldType<T> {
// rather than looping through the array,
// we take advantage of optimization built into DataInputStream
private void readBytes(final DataInputStream inputStream, final byte[] bytes) throws IOException {
- inputStream.read(bytes);
+ inputStream.readFully(bytes);
}
};