JAL-629 fix a PAEMatrix casting error
[jalview.git] / 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;