BUGFIX: when float and double swaping, use floatToRawIntBits instead of floatToIntBit...
authorJuYoung Kim <j0.kim@samsung.com>
Thu, 14 Aug 2014 01:41:55 +0000 (10:41 +0900)
committerJuYoung Kim <j0.kim@samsung.com>
Thu, 14 Aug 2014 01:44:16 +0000 (10:44 +0900)
Change-Id: I33f24b4d5f71c59b0bf9a66e408c8cbcbf28e423
Signed-off-by: JuYoung Kim <j0.kim@samsung.com>
org.tizen.dynamicanalyzer.common/src/org/tizen/dynamicanalyzer/util/ByteSwapper.java

index 46a83fb..42cb449 100644 (file)
@@ -85,7 +85,7 @@ public class ByteSwapper {
         * @return Byte swapped representation.
         */
        public static float swap(float value) {
-               int intValue = Float.floatToIntBits(value);
+               int intValue = Float.floatToRawIntBits(value);
                intValue = swap(intValue);
                return Float.intBitsToFloat(intValue);
        }
@@ -98,7 +98,7 @@ public class ByteSwapper {
         * @return Byte swapped representation.
         */
        public static double swap(double value) {
-               long longValue = Double.doubleToLongBits(value);
+               long longValue = Double.doubleToRawLongBits(value);
                longValue = swap(longValue);
                return Double.longBitsToDouble(longValue);
        }