[Patch] java.nio.ByteBufferHelper

Michael Koch konqueror@gmx.de
Mon Oct 18 14:43:00 GMT 2004


Hi list,


I just commited the attached patch to merge a fix from GNU classpath.


Michael


2004-10-18  Sven de Marothy  <sven@physto.se>

	* java/nio/ByteBufferHelper.java
	(putDouble): Use Double.toRawLongBits instead.

-------------- next part --------------
Index: java/nio/ByteBufferHelper.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/nio/ByteBufferHelper.java,v
retrieving revision 1.5
diff -u -r1.5 ByteBufferHelper.java
--- java/nio/ByteBufferHelper.java	9 Jul 2004 13:40:28 -0000	1.5
+++ java/nio/ByteBufferHelper.java	18 Oct 2004 14:40:31 -0000
@@ -327,7 +327,7 @@
 
   public static void putDouble (ByteBuffer buffer, double value, ByteOrder order)
   {
-    putLong (buffer, Double.doubleToLongBits (value), order);
+    putLong (buffer, Double.doubleToRawLongBits (value), order);
   }
   
   public static double getDouble (ByteBuffer buffer, int index, ByteOrder order)
@@ -338,6 +338,7 @@
   public static void putDouble (ByteBuffer buffer, int index,
 				double value, ByteOrder order)
   {
-    putLong (buffer, index, Double.doubleToLongBits (value), order);
+    putLong (buffer, index, Double.doubleToRawLongBits (value), order);
   }
 } // ByteBufferHelper
+


More information about the Java-patches mailing list