public inbox for frysk-cvs@sourceware.org help / color / mirror / Atom feed
From: cagney@sourceware.org To: frysk-cvs@sourceware.org Subject: [SCM] master: frysk-sys/inua/ChangeLog Date: Fri, 04 Jul 2008 16:19:00 -0000 [thread overview] Message-ID: <20080704161938.29861.qmail@sourceware.org> (raw) The branch, master has been updated via 6a0ea520d3eaebb371820f312c3bb40666c60265 (commit) from fbcdfd6bd19693304caf613b79fd1d69fa1eca67 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 6a0ea520d3eaebb371820f312c3bb40666c60265 Author: Andrew Cagney <cagney@redhat.com> Date: Fri Jul 4 11:24:41 2008 -0400 frysk-sys/inua/ChangeLog 2008-07-04 Andrew Cagney <cagney@redhat.com> * eio/ByteBuffer.java: Throw InternalException. * eio/BufferUnderflowException.java: Extend UserException. ----------------------------------------------------------------------- Summary of changes: frysk-sys/inua/ChangeLog | 5 ++ frysk-sys/inua/eio/BufferUnderflowException.java | 10 ++- frysk-sys/inua/eio/ByteBuffer.java | 74 ++++++++++------------ 3 files changed, 45 insertions(+), 44 deletions(-) First 500 lines of diff: diff --git a/frysk-sys/inua/ChangeLog b/frysk-sys/inua/ChangeLog index 1827bf2..16ae59b 100644 --- a/frysk-sys/inua/ChangeLog +++ b/frysk-sys/inua/ChangeLog @@ -1,3 +1,8 @@ +2008-07-04 Andrew Cagney <cagney@redhat.com> + + * eio/ByteBuffer.java: Throw InternalException. + * eio/BufferUnderflowException.java: Extend UserException. + 2008-06-05 Andrew Cagney <cagney@redhat.com> * eio/ByteBuffer.java: Add missing indexed word get/put methods. diff --git a/frysk-sys/inua/eio/BufferUnderflowException.java b/frysk-sys/inua/eio/BufferUnderflowException.java index a17063d..2f9f7ed 100644 --- a/frysk-sys/inua/eio/BufferUnderflowException.java +++ b/frysk-sys/inua/eio/BufferUnderflowException.java @@ -34,10 +34,14 @@ // modification, you must delete this exception statement from your // version and license this file solely under the GPL without // exception. + package inua.eio; -public class BufferUnderflowException - extends java.nio.BufferUnderflowException -{ +import frysk.UserException; + +public class BufferUnderflowException extends UserException { private static final long serialVersionUID = 1L; + BufferUnderflowException(long address) { + super("Address 0x" + Long.toHexString(address) + " out of bounds"); + } } diff --git a/frysk-sys/inua/eio/ByteBuffer.java b/frysk-sys/inua/eio/ByteBuffer.java index 6549a58..873e481 100644 --- a/frysk-sys/inua/eio/ByteBuffer.java +++ b/frysk-sys/inua/eio/ByteBuffer.java @@ -40,9 +40,10 @@ * A ByteBuffer. Just like {@link java.nio.ByteBuffer} only 64-bit. */ - package inua.eio; +import frysk.InternalException; + public abstract class ByteBuffer extends Buffer { @@ -293,9 +294,8 @@ public abstract class ByteBuffer * Given BUFFER, return a new subBuffer. Used by {@link #slice}. */ protected ByteBuffer subBuffer (ByteBuffer buffer, long lowerExtreem, - long upperExtreem) - { - throw new RuntimeException("not implemented"); + long upperExtreem) { + throw new InternalException("not implemented"); } public ByteBuffer slice (long off, long len) @@ -321,14 +321,12 @@ public abstract class ByteBuffer return (byte) peek(lowWater + index); } - public ByteBuffer get (long index, byte[] dst, int off, int len) - throws BufferUnderflowException - { - if (ULong.GT(index + len, limit())) - throw new BufferUnderflowException(); - peekFully(lowWater + index,dst,off,len); - return this; - } + public ByteBuffer get(long index, byte[] dst, int off, int len) { + if (ULong.GT(index + len, limit())) + throw new BufferUnderflowException(index + len); + peekFully(lowWater + index,dst,off,len); + return this; + } public int safeGet (long index, byte[] dst, int off, int len) { @@ -339,35 +337,29 @@ public abstract class ByteBuffer return maxLen; } - public ByteBuffer get (byte[] dst, int off, int len) - throws BufferUnderflowException - { - if (ULong.GT(len, remaining())) - throw new BufferUnderflowException(); - peek(cursor, dst, off, len); - cursor += len; - return this; - } + public ByteBuffer get(byte[] dst, int off, int len) { + if (ULong.GT(len, remaining())) + throw new BufferUnderflowException(len); + peek(cursor, dst, off, len); + cursor += len; + return this; + } - public final ByteBuffer get (byte[] dst) throws BufferUnderflowException - { - return get(dst, 0, dst.length); - } + public final ByteBuffer get (byte[] dst) { + return get(dst, 0, dst.length); + } - public ByteBuffer put (byte[] src, int off, int len) - throws BufferUnderflowException - { - if (ULong.GT(len, remaining())) - throw new BufferUnderflowException(); - poke(cursor, src, off, len); - cursor += len; - return this; - } + public ByteBuffer put (byte[] src, int off, int len) { + if (ULong.GT(len, remaining())) + throw new BufferUnderflowException(len); + poke(cursor, src, off, len); + cursor += len; + return this; + } - public final ByteBuffer put (byte[] src) throws BufferUnderflowException - { - return put(src, 0, src.length); - } + public final ByteBuffer put (byte[] src) { + return put(src, 0, src.length); + } protected ByteOrdered byteOrdered; hooks/post-receive -- frysk system monitor/debugger
reply other threads:[~2008-07-04 16:19 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080704161938.29861.qmail@sourceware.org \ --to=cagney@sourceware.org \ --cc=frysk-cvs@sourceware.org \ --cc=frysk@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).