summaryrefslogtreecommitdiffstats
path: root/src/java/jogamp/common/util/Int32ArrayBitfield.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-07-30 02:53:59 +0200
committerSven Gothel <[email protected]>2015-07-30 02:53:59 +0200
commit0caa9474833a224060b9e4deefb7e0b171a8f273 (patch)
tree3af8546c959d51306d4efe320cdaa29c0fd03ba8 /src/java/jogamp/common/util/Int32ArrayBitfield.java
parente241034942725b7a189cb6186fd331d9defde7bc (diff)
Bitfield: Use IndexOutOfBoundsException instead of ArrayIndexOutOfBoundsException
Diffstat (limited to 'src/java/jogamp/common/util/Int32ArrayBitfield.java')
-rw-r--r--src/java/jogamp/common/util/Int32ArrayBitfield.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/java/jogamp/common/util/Int32ArrayBitfield.java b/src/java/jogamp/common/util/Int32ArrayBitfield.java
index d0ce669..954680c 100644
--- a/src/java/jogamp/common/util/Int32ArrayBitfield.java
+++ b/src/java/jogamp/common/util/Int32ArrayBitfield.java
@@ -54,14 +54,14 @@ public class Int32ArrayBitfield implements Bitfield {
return bitSize;
}
- private final void check(final int limit, final int bitnum) throws ArrayIndexOutOfBoundsException {
+ private final void check(final int limit, final int bitnum) throws IndexOutOfBoundsException {
if( 0 > bitnum || bitnum >= limit ) {
- throw new ArrayIndexOutOfBoundsException("Bitnum should be within [0.."+(limit-1)+"], but is "+bitnum);
+ throw new IndexOutOfBoundsException("Bitnum should be within [0.."+(limit-1)+"], but is "+bitnum);
}
}
@Override
- public final int getInt32(final int rightBitnum) throws ArrayIndexOutOfBoundsException {
+ public final int getInt32(final int rightBitnum) throws IndexOutOfBoundsException {
check(bitSize-31, rightBitnum);
if( 0 == rightBitnum % 32 ) {
// fast path
@@ -73,7 +73,7 @@ public class Int32ArrayBitfield implements Bitfield {
}
@Override
- public final void putInt32(final int rightBitnum, final int mask) throws ArrayIndexOutOfBoundsException {
+ public final void putInt32(final int rightBitnum, final int mask) throws IndexOutOfBoundsException {
check(bitSize-31, rightBitnum);
if( 0 == rightBitnum % 32 ) {
// fast path
@@ -85,7 +85,7 @@ public class Int32ArrayBitfield implements Bitfield {
}
@Override
- public final boolean get(final int bitnum) throws ArrayIndexOutOfBoundsException {
+ public final boolean get(final int bitnum) throws IndexOutOfBoundsException {
check(bitSize, bitnum);
final int u = bitnum >>> UNIT_SHIFT;
final int b = bitnum - ( u << UNIT_SHIFT );
@@ -93,7 +93,7 @@ public class Int32ArrayBitfield implements Bitfield {
}
@Override
- public final boolean put(final int bitnum, final boolean bit) throws ArrayIndexOutOfBoundsException {
+ public final boolean put(final int bitnum, final boolean bit) throws IndexOutOfBoundsException {
check(bitSize, bitnum);
final int u = bitnum >>> UNIT_SHIFT;
final int b = bitnum - ( u << UNIT_SHIFT );
@@ -109,7 +109,7 @@ public class Int32ArrayBitfield implements Bitfield {
return prev;
}
@Override
- public final void set(final int bitnum) throws ArrayIndexOutOfBoundsException {
+ public final void set(final int bitnum) throws IndexOutOfBoundsException {
check(bitSize, bitnum);
final int u = bitnum >>> UNIT_SHIFT;
final int b = bitnum - ( u << UNIT_SHIFT );
@@ -117,7 +117,7 @@ public class Int32ArrayBitfield implements Bitfield {
storage[u] |= m;
}
@Override
- public final void clear (final int bitnum) throws ArrayIndexOutOfBoundsException {
+ public final void clear (final int bitnum) throws IndexOutOfBoundsException {
check(bitSize, bitnum);
final int u = bitnum >>> UNIT_SHIFT;
final int b = bitnum - ( u << UNIT_SHIFT );