harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjanu...@apache.org
Subject svn commit: r642986 - /harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java
Date Mon, 31 Mar 2008 13:24:43 GMT
Author: sjanuary
Date: Mon Mar 31 06:24:41 2008
New Revision: 642986

URL: http://svn.apache.org/viewvc?rev=642986&view=rev
Log:
Fix for HARMONY-5657 ([classlib][pack200] Some doubles decode incorrectly)

Modified:
    harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java

Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java?rev=642986&r1=642985&r2=642986&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/CpBands.java
Mon Mar 31 06:24:41 2008
@@ -136,14 +136,12 @@
     private void parseCpDouble(InputStream in) throws IOException,
             Pack200Exception {
         int cpDoubleCount = header.getCpDoubleCount();
-        cpDouble = new double[cpDoubleCount];
-        long[] hiBits = decodeBandLong("cp_Double_hi", in, Codec.UDELTA5,
-                cpDoubleCount);
-        long[] loBits = decodeBandLong("cp_Double_lo", in, Codec.DELTA5,
-                cpDoubleCount);
-        for (int i = 0; i < cpDoubleCount; i++) {
-            cpDouble[i] = Double.longBitsToDouble(hiBits[i] << 32 | loBits[i]);
-        }
+        long[] band = parseFlags("cp_Double", in, cpDoubleCount,
+                Codec.UDELTA5, Codec.DELTA5);
+        cpDouble = new double[band.length];
+        for (int i = 0; i < band.length; i++) {
+			cpDouble[i] = Double.longBitsToDouble(band[i]);
+		}
     }
 
     /**



Mime
View raw message