From 24eefae081d08920989f123976e6754dc6d0793b Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 7 Oct 2011 06:17:33 +0200 Subject: Add some warning supression tags --- src/java/com/jogamp/common/nio/Buffers.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/java/com/jogamp/common/nio') 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 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 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 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 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 puti(B dest, int v) { if (dest instanceof IntBuffer) { return (B) ((IntBuffer) dest).put(v); -- cgit v1.2.3