JAL-629 fix a PAEMatrix casting error
authorBen Soares <b.soares@dundee.ac.uk>
Thu, 23 Feb 2023 16:18:40 +0000 (16:18 +0000)
committerBen Soares <b.soares@dundee.ac.uk>
Thu, 23 Feb 2023 16:18:40 +0000 (16:18 +0000)
src/jalview/ws/datamodel/alphafold/PAEContactMatrix.java

index 272d21d..f282b9f 100644 (file)
@@ -71,7 +71,11 @@ public class PAEContactMatrix implements ContactMatrixI
       Iterator<Long> scores = scoreRows.next().iterator();
       while (scores.hasNext())
       {
-        elements[row][col++] = scores.next();
+        Object d = scores.next();
+        if (d instanceof Double)
+          elements[row][col++] = ((Double) d).longValue();
+        else
+          elements[row][col++] = (float) d;
       }
       row++;
       col = 0;