JAL-1270 more fix for failing Functional test
[jalview.git] / src / jalview / ws / uimodel / PDBRestResponse.java
index 2a38b39..3471fab 100644 (file)
@@ -198,7 +198,8 @@ public class PDBRestResponse
               summaryRowData[colCounter++] = 0.0;
             }
           }else{
-            summaryRowData[colCounter++] = fieldData;
+            summaryRowData[colCounter++] = (fieldData == null || fieldData
+                    .isEmpty()) ? null : fieldData;
           }
         }
       }
@@ -268,8 +269,18 @@ public class PDBRestResponse
   public static void configureTableColumn(JTable tbl_summary,
           Collection<PDBDocField> wantedFields)
   {
+    try
+    {
+      // wait for table model initialisation to complete
+      Thread.sleep(1200);
+    } catch (InterruptedException e1)
+    {
+      e1.printStackTrace();
+    }
     for (PDBDocField wantedField : wantedFields)
     {
+      try
+      {
       if (wantedField.equals(PDBDocField.PDB_ID))
       {
         tbl_summary.getColumn(wantedField.getName()).setMinWidth(40);
@@ -294,6 +305,10 @@ public class PDBRestResponse
         tbl_summary.getColumn(wantedField.getName()).setMaxWidth(400);
         tbl_summary.getColumn(wantedField.getName()).setPreferredWidth(95);
       }
+      } catch (Exception e)
+      {
+        e.printStackTrace();
+      }
     }
   }
 }