This is an automated email from the ASF dual-hosted git repository. iemejia pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/avro.git
commit fab3d4051c6bf5cacf6bd80895a72332ae5f362f Author: Ismaël Mejía <[email protected]> AuthorDate: Thu Dec 20 14:22:26 2018 +0100 AVRO-2288: Refactor OutputBuffer to not throw Exceptions It aligns this way with its parent class --- .../trevni/core/src/main/java/org/apache/trevni/OutputBuffer.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lang/java/trevni/core/src/main/java/org/apache/trevni/OutputBuffer.java b/lang/java/trevni/core/src/main/java/org/apache/trevni/OutputBuffer.java index 27e4f6a..e48dafd 100644 --- a/lang/java/trevni/core/src/main/java/org/apache/trevni/OutputBuffer.java +++ b/lang/java/trevni/core/src/main/java/org/apache/trevni/OutputBuffer.java @@ -92,18 +92,18 @@ class OutputBuffer extends ByteArrayOutputStream { write(bytes, 0, bytes.length); } - public void writeBytes(ByteBuffer bytes) throws IOException { + public void writeBytes(ByteBuffer bytes) { int pos = bytes.position(); int start = bytes.arrayOffset() + pos; int len = bytes.limit() - pos; writeBytes(bytes.array(), start, len); } - public void writeBytes(byte[] bytes) throws IOException { + public void writeBytes(byte[] bytes) { writeBytes(bytes, 0, bytes.length); } - public void writeBytes(byte[] bytes, int start, int len) throws IOException { + public void writeBytes(byte[] bytes, int start, int len) { writeInt(len); write(bytes, start, len); } @@ -140,7 +140,7 @@ class OutputBuffer extends ByteArrayOutputStream { count += 8; } - public void writeInt(int n) throws IOException { + public void writeInt(int n) { ensure(5); n = (n << 1) ^ (n >> 31); // move sign to low-order bit if ((n & ~0x7F) != 0) {
