diff options
author | Michael Bien <[email protected]> | 2009-11-30 14:18:47 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2009-11-30 14:18:47 +0100 |
commit | 0a5bc7f5a379b52cf5fe6bb9ea22f59fdec1fff0 (patch) | |
tree | 7d6d92d144a92b06ea5fe075b332b5f1fde6a557 /src | |
parent | 8d92b2e1fa285f10e9f8703a8686e607dcc0f08b (diff) |
temporary workaround in BufferFactory.isDirect(). Changed behavior to return false with null as parameter
to workaround buffer/array mixing bug. Should be revisited to improve performance.
Diffstat (limited to 'src')
-rwxr-xr-x | src/java/com/sun/gluegen/runtime/BufferFactory.java.javame_cdc_fp | 4 | ||||
-rwxr-xr-x | src/java/com/sun/gluegen/runtime/BufferFactory.java.javase | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/java/com/sun/gluegen/runtime/BufferFactory.java.javame_cdc_fp b/src/java/com/sun/gluegen/runtime/BufferFactory.java.javame_cdc_fp index 5f32b0e..dacdd03 100755 --- a/src/java/com/sun/gluegen/runtime/BufferFactory.java.javame_cdc_fp +++ b/src/java/com/sun/gluegen/runtime/BufferFactory.java.javame_cdc_fp @@ -78,11 +78,11 @@ public class BufferFactory { } /** Helper routine to tell whether a buffer is direct or not. Null - pointers are considered direct. isDirect() should really be + pointers are considered NOT direct. isDirect() should really be public in Buffer and not replicated in all subclasses. */ public static boolean isDirect(Object buf) { if (buf == null) { - return true; + return false; } if (buf instanceof ByteBuffer) { return ((ByteBuffer) buf).isDirect(); diff --git a/src/java/com/sun/gluegen/runtime/BufferFactory.java.javase b/src/java/com/sun/gluegen/runtime/BufferFactory.java.javase index 472733f..1e660c1 100755 --- a/src/java/com/sun/gluegen/runtime/BufferFactory.java.javase +++ b/src/java/com/sun/gluegen/runtime/BufferFactory.java.javase @@ -77,11 +77,11 @@ public class BufferFactory { } /** Helper routine to tell whether a buffer is direct or not. Null - pointers are considered direct. isDirect() should really be + pointers are considered NOT direct. isDirect() should really be public in Buffer and not replicated in all subclasses. */ public static boolean isDirect(Object buf) { if (buf == null) { - return true; + return false; } if (buf instanceof ByteBuffer) { return ((ByteBuffer) buf).isDirect(); |