Author: mturk Date: Sun Jun 21 10:01:17 2009 New Revision: 786980 URL: http://svn.apache.org/viewvc?rev=786980&view=rev Log: Rename unalignment exception
Added: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/exception/UnalignedMemoryException.java - copied, changed from r786958, commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/exception/UnalignedParameterException.java Removed: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/exception/UnalignedParameterException.java Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Structure.java commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Structure32.java commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Structure64.java commons/sandbox/runtime/trunk/src/main/native/include/acr_error.h commons/sandbox/runtime/trunk/src/main/native/shared/error.c commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestMemory.java Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Structure.java URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Structure.java?rev=786980&r1=786979&r2=786980&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Structure.java (original) +++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Structure.java Sun Jun 21 10:01:17 2009 @@ -15,7 +15,7 @@ */ package org.apache.commons.runtime; -import org.apache.commons.runtime.exception.UnalignedParameterException; +import org.apache.commons.runtime.exception.UnalignedMemoryException; /** Represents the Operating System C/C++ Structure pointer. * <p> @@ -49,11 +49,11 @@ * @throws IndexOutOfBoundsException if {...@code index} would cause access * outside the structure address space. * @throws NullPointerException if structure pointer is {...@code null}. - * @throws UnalignedParameterException if attempt is made to access the + * @throws UnalignedMemoryException if attempt is made to access the * address that is aligned to the {...@code value} primitive type. */ public abstract Pointer get(int index) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException; /** @@ -76,11 +76,11 @@ * @throws IndexOutOfBoundsException if {...@code index} would cause access * outside the structure address space. * @throws NullPointerException if structure pointer is {...@code null}. - * @throws UnalignedParameterException if attempt is made to access the + * @throws UnalignedMemoryException if attempt is made to access the * address that is aligned to the {...@code value} primitive type. */ public abstract int peek16(int index) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException; /** @@ -91,11 +91,11 @@ * @throws IndexOutOfBoundsException if {...@code index} would cause access * outside the structure address space. * @throws NullPointerException if structure pointer is {...@code null}. - * @throws UnalignedParameterException if attempt is made to access the + * @throws UnalignedMemoryException if attempt is made to access the * address that is aligned to the {...@code value} primitive type. */ public abstract int peek32(int index) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException; /** @@ -106,11 +106,11 @@ * @throws IndexOutOfBoundsException if {...@code index} would cause access * outside the structure address space. * @throws NullPointerException if structure pointer is {...@code null}. - * @throws UnalignedParameterException if attempt is made to access the + * @throws UnalignedMemoryException if attempt is made to access the * address that is aligned to the {...@code value} primitive type. */ public abstract long peek64(int index) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException; /** @@ -121,11 +121,11 @@ * @throws IndexOutOfBoundsException if {...@code index} would cause access * outside the structure address space. * @throws NullPointerException if structure pointer is {...@code null}. - * @throws UnalignedParameterException if attempt is made to access the + * @throws UnalignedMemoryException if attempt is made to access the * address that is aligned to the {...@code value} primitive type. */ public abstract float peek32f(int index) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException; /** @@ -136,11 +136,11 @@ * @throws IndexOutOfBoundsException if {...@code index} would cause access * outside the structure address space. * @throws NullPointerException if structure pointer is {...@code null}. - * @throws UnalignedParameterException if attempt is made to access the + * @throws UnalignedMemoryException if attempt is made to access the * address that is aligned to the {...@code value} primitive type. */ public abstract double peek64f(int index) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException; /** @@ -153,11 +153,11 @@ * @throws IndexOutOfBoundsException if {...@code index} would cause access * outside the structure address space. * @throws NullPointerException if structure pointer is {...@code null}. - * @throws UnalignedParameterException if attempt is made to access the + * @throws UnalignedMemoryException if attempt is made to access the * address that is aligned to the {...@code value} primitive type. */ public abstract void poke(int index, Pointer v) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException; /** @@ -170,7 +170,7 @@ * @throws NullPointerException if pointer is {...@code null}. */ public abstract void poke(int index, int value) - throws IndexOutOfBoundsException, UnalignedParameterException; + throws IndexOutOfBoundsException, UnalignedMemoryException; /** * Set a {...@code short} value to this {...@code structure} at the @@ -180,11 +180,11 @@ * @throws IndexOutOfBoundsException if {...@code index} would cause access * outside the structure address space. * @throws NullPointerException if pointer is {...@code null}. - * @throws UnalignedParameterException if attempt is made to access the + * @throws UnalignedMemoryException if attempt is made to access the * address that is aligned to the {...@code value} primitive type. */ public abstract void poke16(int index, int value) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException; /** @@ -195,11 +195,11 @@ * @throws IndexOutOfBoundsException if {...@code index} would cause access * outside the structure address space. * @throws NullPointerException if pointer is {...@code null}. - * @throws UnalignedParameterException if attempt is made to access the + * @throws UnalignedMemoryException if attempt is made to access the * address that is aligned to the {...@code value} primitive type. */ public abstract void poke32(int index, int value) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException; /** @@ -210,11 +210,11 @@ * @throws IndexOutOfBoundsException if {...@code index} would cause access * outside the structure address space. * @throws NullPointerException if pointer is {...@code null}. - * @throws UnalignedParameterException if attempt is made to access the + * @throws UnalignedMemoryException if attempt is made to access the * address that is aligned to the {...@code value} primitive type. */ public abstract void poke32(int index, float value) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException; /** @@ -225,11 +225,11 @@ * @throws IndexOutOfBoundsException if {...@code index} would cause access * outside the structure address space. * @throws NullPointerException if pointer is {...@code null}. - * @throws UnalignedParameterException if attempt is made to access the + * @throws UnalignedMemoryException if attempt is made to access the * address that is aligned to the {...@code value} primitive type. */ public abstract void poke64(int index, long value) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException; /** @@ -240,11 +240,11 @@ * @throws IndexOutOfBoundsException if {...@code index} would cause access * outside the structure address space. * @throws NullPointerException if pointer is {...@code null}. - * @throws UnalignedParameterException if attempt is made to access the + * @throws UnalignedMemoryException if attempt is made to access the * address that is aligned to the {...@code value} primitive type. */ public abstract void poke64(int index, double value) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException; /** Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Structure32.java URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Structure32.java?rev=786980&r1=786979&r2=786980&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Structure32.java (original) +++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Structure32.java Sun Jun 21 10:01:17 2009 @@ -15,7 +15,7 @@ */ package org.apache.commons.runtime; -import org.apache.commons.runtime.exception.UnalignedParameterException; +import org.apache.commons.runtime.exception.UnalignedMemoryException; /** Represents the Operating System 32-bit C/C++ Structure pointer. * <p> @@ -65,7 +65,7 @@ } public Pointer get(int index) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0) @@ -73,12 +73,12 @@ else if (index < 0 || (index + 4) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x03) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); return get0(POINTER.POINTER + index); } public void poke(int index, Pointer v) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0) @@ -86,7 +86,7 @@ else if (index < 0 || (index + 4) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x03) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); poke2(POINTER.POINTER + index, ((Pointer32)v).POINTER); } @@ -101,7 +101,7 @@ } public int peek16(int index) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0) @@ -109,12 +109,12 @@ else if (index < 0 || (index + 2) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x01) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); return peek1(POINTER.POINTER + index); } public int peek32(int index) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0) @@ -122,12 +122,12 @@ else if (index < 0 || (index + 4) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x03) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); return peek2(POINTER.POINTER + index); } public long peek64(int index) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0) @@ -135,12 +135,12 @@ else if (index < 0 || (index + 8) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x07) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); return peek3(POINTER.POINTER + index); } public float peek32f(int index) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0) @@ -148,12 +148,12 @@ else if (index < 0 || (index + 4) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x03) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); return peek4(POINTER.POINTER + index); } public double peek64f(int index) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0) @@ -161,7 +161,7 @@ else if (index < 0 || (index + 8) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x07) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); return peek5(POINTER.POINTER + index); } @@ -176,7 +176,7 @@ } public void poke16(int index, int value) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0) @@ -184,12 +184,12 @@ else if (index < 0 || (index + 2) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x01) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); poke1(POINTER.POINTER + index, value); } public void poke32(int index, int value) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0) @@ -197,12 +197,12 @@ else if (index < 0 || (index + 4) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x03) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); poke2(POINTER.POINTER + index, value); } public void poke32(int index, float value) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0) @@ -210,12 +210,12 @@ else if (index < 0 || (index + 4) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x03) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); poke4(POINTER.POINTER + index, value); } public void poke64(int index, long value) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0) @@ -223,12 +223,12 @@ else if (index < 0 || (index + 8) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x07) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); poke3(POINTER.POINTER + index, value); } public void poke64(int index, double value) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0) @@ -236,7 +236,7 @@ else if (index < 0 || (index + 8) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x07) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); poke5(POINTER.POINTER + index, value); } Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Structure64.java URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Structure64.java?rev=786980&r1=786979&r2=786980&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Structure64.java (original) +++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Structure64.java Sun Jun 21 10:01:17 2009 @@ -15,7 +15,7 @@ */ package org.apache.commons.runtime; -import org.apache.commons.runtime.exception.UnalignedParameterException; +import org.apache.commons.runtime.exception.UnalignedMemoryException; /** Represents the Operating System 64-bit C/C++ Structure pointer. * <p> @@ -65,7 +65,7 @@ } public Pointer get(int index) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0L) @@ -73,12 +73,12 @@ else if (index < 0L || (index + 8) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x07) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); return get0(POINTER.POINTER + index); } public void poke(int index, Pointer v) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0L) @@ -86,12 +86,12 @@ else if (index < 0L || (index + 8) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x07) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); poke3(POINTER.POINTER + index, ((Pointer64)v).POINTER); } public int peek(int index) - throws IndexOutOfBoundsException, UnalignedParameterException + throws IndexOutOfBoundsException, UnalignedMemoryException { if (POINTER.POINTER == 0L) throw new NullPointerException(); @@ -101,7 +101,7 @@ } public int peek16(int index) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0L) @@ -109,12 +109,12 @@ else if (index < 0L || (index + 2) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x01) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); return peek1(POINTER.POINTER + index); } public int peek32(int index) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0L) @@ -122,12 +122,12 @@ else if (index < 0L || (index + 4) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x03) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); return peek2(POINTER.POINTER + index); } public long peek64(int index) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0L) @@ -135,12 +135,12 @@ else if (index < 0L || (index + 8) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x07) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); return peek3(POINTER.POINTER + index); } public float peek32f(int index) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0L) @@ -148,12 +148,12 @@ else if (index < 0L || (index + 4) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x03) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); return peek4(POINTER.POINTER + index); } public double peek64f(int index) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0L) @@ -161,7 +161,7 @@ else if (index < 0L || (index + 8) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x07) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); return peek5(POINTER.POINTER + index); } @@ -176,7 +176,7 @@ } public void poke16(int index, int value) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0L) @@ -184,12 +184,12 @@ else if (index < 0L || (index + 2) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x01) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); poke1(POINTER.POINTER + index, value); } public void poke32(int index, int value) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0L) @@ -197,12 +197,12 @@ else if (index < 0L || (index + 4) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x03) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); poke2(POINTER.POINTER + index, value); } public void poke32(int index, float value) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0L) @@ -210,12 +210,12 @@ else if (index < 0L || (index + 4) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x03) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); poke4(POINTER.POINTER + index, value); } public void poke64(int index, long value) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0L) @@ -223,12 +223,12 @@ else if (index < 0L || (index + 8) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x07) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); poke3(POINTER.POINTER + index, value); } public void poke64(int index, double value) - throws IndexOutOfBoundsException, UnalignedParameterException, + throws IndexOutOfBoundsException, UnalignedMemoryException, NullPointerException { if (POINTER.POINTER == 0L) @@ -236,7 +236,7 @@ else if (index < 0L || (index + 8) > POINTER.PLENGTH) throw new IndexOutOfBoundsException(); else if ((index & 0x07) != 0) - throw new UnalignedParameterException(); + throw new UnalignedMemoryException(); poke5(POINTER.POINTER + index, value); } Copied: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/exception/UnalignedMemoryException.java (from r786958, commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/exception/UnalignedParameterException.java) URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/exception/UnalignedMemoryException.java?p2=commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/exception/UnalignedMemoryException.java&p1=commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/exception/UnalignedParameterException.java&r1=786958&r2=786980&rev=786980&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/exception/UnalignedParameterException.java (original) +++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/exception/UnalignedMemoryException.java Sun Jun 21 10:01:17 2009 @@ -17,21 +17,21 @@ package org.apache.commons.runtime.exception; /** - * UnalignedParameterException thrown when an attempt is made to + * UnalignedMemoryException thrown when an attempt is made to * invoke an operation on unaligned memory location. * * @since Runtime 1.0 */ -public class UnalignedParameterException extends IllegalArgumentException +public class UnalignedMemoryException extends IllegalArgumentException { - public UnalignedParameterException() + public UnalignedMemoryException() { super(); } - public UnalignedParameterException(String msg) + public UnalignedMemoryException(String msg) { super(msg); } Modified: commons/sandbox/runtime/trunk/src/main/native/include/acr_error.h URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/include/acr_error.h?rev=786980&r1=786979&r2=786980&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/include/acr_error.h (original) +++ commons/sandbox/runtime/trunk/src/main/native/include/acr_error.h Sun Jun 21 10:01:17 2009 @@ -51,10 +51,11 @@ ACR_EX_EIO, /* java/io/IOException */ ACR_EX_ESYNC, /* java/io/SyncFailedException */ ACR_EX_ESOCK, /* java/net/SocketException */ - ACR_EX_CLSOSED_DESC, /* exception/ClosedDescriptorException.java */ - ACR_EX_ENOENT, /* exception/NoSuchObjectException.java */ - ACR_EX_OSERR, /* exception/OperatingSystemException.java */ - ACR_EX_UNSUPPORTED, /* exception/UnsupportedOperatingSystemException.java */ + ACR_EX_CLSOSED_DESC, /* exception/ClosedDescriptorException */ + ACR_EX_ENOENT, /* exception/NoSuchObjectException */ + ACR_EX_OSERR, /* exception/OperatingSystemException */ + ACR_EX_UNALIGNED, /* exception/UnalignedMemoryException */ + ACR_EX_UNSUPPORTED, /* exception/UnsupportedOperatingSystemException */ ACR_EX_LEN } acr_trowclass_e; Modified: commons/sandbox/runtime/trunk/src/main/native/shared/error.c URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/error.c?rev=786980&r1=786979&r2=786980&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/shared/error.c (original) +++ commons/sandbox/runtime/trunk/src/main/native/shared/error.c Sun Jun 21 10:01:17 2009 @@ -37,10 +37,11 @@ "java/io/IOException", "java/io/SyncFailedException", "java/net/SocketException", - ACR_EXCEPTION_CLASS_PATH "ClosedDescriptorException.java", - ACR_EXCEPTION_CLASS_PATH "NoSuchObjectException.java", - ACR_EXCEPTION_CLASS_PATH "OperatingSystemException.java", - ACR_EXCEPTION_CLASS_PATH "UnsupportedOperatingSystemException.java", + ACR_EXCEPTION_CLASS_PATH "ClosedDescriptorException", + ACR_EXCEPTION_CLASS_PATH "NoSuchObjectException", + ACR_EXCEPTION_CLASS_PATH "OperatingSystemException", + ACR_EXCEPTION_CLASS_PATH "UnalignedMemoryException", + ACR_EXCEPTION_CLASS_PATH "UnsupportedOperatingSystemException", NULL }; Modified: commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestMemory.java URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestMemory.java?rev=786980&r1=786979&r2=786980&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestMemory.java (original) +++ commons/sandbox/runtime/trunk/src/test/org/apache/commons/runtime/TestMemory.java Sun Jun 21 10:01:17 2009 @@ -338,9 +338,9 @@ Structure s = p.asStructure(); try { s.poke16(997, 2303); - fail("UnalignedParameterException not thrown"); + fail("UnalignedMemoryException not thrown"); } - catch (UnalignedParameterException u) + catch (UnalignedMemoryException u) { // success }