JAL-4090 JAL-1551 spotlessApply
[jalview.git] / test / jalview / ws / PDBSequenceFetcherTest.java
index 9efcef2..e7f9ff1 100644 (file)
@@ -62,7 +62,7 @@ public class PDBSequenceFetcherTest
     Cache.applicationProperties.setProperty("ADD_SS_ANN",
             Boolean.TRUE.toString());
 
-    sf = new SequenceFetcher(false);
+    sf = new SequenceFetcher();
   }
 
   /**
@@ -132,6 +132,7 @@ public class PDBSequenceFetcherTest
   private void testRetrieveProteinSeqFromPDB() throws Exception
   {
     List<DbSourceProxy> sps = sf.getSourceProxy("PDB");
+    StringBuilder errors = new StringBuilder();
     for (TestRetrieveObject str : toRetrieve)
     {
       AlignmentI response = sps.get(0).getSequenceRecords(str.id);
@@ -153,13 +154,10 @@ public class PDBSequenceFetcherTest
           List<SequenceFeature> sf = sq.findFeatures(col, col, "RESNUM");
           if (sf.size() != 1)
           {
-            errors.append(
-                    str.id + ": " +
-                            "Expected one feature at column (position): "
-                            + (col - 1)
-                            + " (" + sq.findPosition(col - 1) + ")"
-                            + ": saw "
-                            + sf.size());
+            errors.append(str.id + ": "
+                    + "Expected one feature at column (position): "
+                    + (col - 1) + " (" + sq.findPosition(col - 1) + ")"
+                    + ": saw " + sf.size());
             errors.append("\n");
             if (prev != null)
             {
@@ -174,11 +172,11 @@ public class PDBSequenceFetcherTest
             lastp = sq.findPosition(col - 1);
           }
         }
-        if (errors.length() > 0)
-        {
-          Assert.fail(errors.toString());
-        }
       }
     }
+    if (errors.length() > 0)
+    {
+      Assert.fail(errors.toString());
+    }
   }
 }