summaryrefslogtreecommitdiffstats
path: root/src/java/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-10-07 06:17:33 +0200
committerSven Gothel <[email protected]>2011-10-07 06:17:33 +0200
commit24eefae081d08920989f123976e6754dc6d0793b (patch)
tree3bbc18e212305aa72b0edb45e49be27a581d8dee /src/java/com
parente388426759e02e15ccc93b9df2e5c0400590d057 (diff)
Add some warning supression tags
Diffstat (limited to 'src/java/com')
-rwxr-xr-xsrc/java/com/jogamp/common/nio/Buffers.java5
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);