diff options
author | Sven Gothel <[email protected]> | 2011-10-07 06:17:33 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-10-07 06:17:33 +0200 |
commit | 24eefae081d08920989f123976e6754dc6d0793b (patch) | |
tree | 3bbc18e212305aa72b0edb45e49be27a581d8dee | |
parent | e388426759e02e15ccc93b9df2e5c0400590d057 (diff) |
Add some warning supression tags
-rwxr-xr-x | src/java/com/jogamp/common/nio/Buffers.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/java/com/jogamp/common/nio/Buffers.java b/src/java/com/jogamp/common/nio/Buffers.java index 0d30026..c1bcffd 100755 --- a/src/java/com/jogamp/common/nio/Buffers.java +++ b/src/java/com/jogamp/common/nio/Buffers.java @@ -211,6 +211,7 @@ public class Buffers { * Calls slice on the specified buffer while maintaining the byteorder. * @see #slice(java.nio.Buffer, int, int) */ + @SuppressWarnings("unchecked") public static <B extends Buffer> B slice(B buffer) { if (buffer instanceof ByteBuffer) { final ByteBuffer bb = (ByteBuffer) buffer; @@ -603,6 +604,7 @@ public class Buffers { //---------------------------------------------------------------------- // Convenient put methods with generic target Buffer // + @SuppressWarnings("unchecked") public static <B extends Buffer> B put(B dest, Buffer src) { if ((dest instanceof ByteBuffer) && (src instanceof ByteBuffer)) { return (B) ((ByteBuffer) dest).put((ByteBuffer) src); @@ -622,6 +624,7 @@ public class Buffers { throw new IllegalArgumentException("Incompatible Buffer classes: dest = " + dest.getClass().getName() + ", src = " + src.getClass().getName()); } + @SuppressWarnings("unchecked") public static <B extends Buffer> B putb(B dest, byte v) { if (dest instanceof ByteBuffer) { return (B) ((ByteBuffer) dest).put(v); @@ -634,6 +637,7 @@ public class Buffers { } } + @SuppressWarnings("unchecked") public static <B extends Buffer> B puts(B dest, short v) { if (dest instanceof ShortBuffer) { return (B) ((ShortBuffer) dest).put(v); @@ -644,6 +648,7 @@ public class Buffers { } } + @SuppressWarnings("unchecked") public static <B extends Buffer> B puti(B dest, int v) { if (dest instanceof IntBuffer) { return (B) ((IntBuffer) dest).put(v); |