From 8479d86d490c841168c9eed1ac80960ce4191c78 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Thu, 23 Feb 2023 16:18:40 +0000 Subject: [PATCH] JAL-629 fix a PAEMatrix casting error --- src/jalview/ws/datamodel/alphafold/PAEContactMatrix.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/jalview/ws/datamodel/alphafold/PAEContactMatrix.java b/src/jalview/ws/datamodel/alphafold/PAEContactMatrix.java index 272d21d..f282b9f 100644 --- a/src/jalview/ws/datamodel/alphafold/PAEContactMatrix.java +++ b/src/jalview/ws/datamodel/alphafold/PAEContactMatrix.java @@ -71,7 +71,11 @@ public class PAEContactMatrix implements ContactMatrixI Iterator 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; -- 1.7.10.2