JAL-3048 check for headless
[jalview.git] / src / jalview / fts / core / FTSRestClient.java
index 076e212..f088a90 100644 (file)
@@ -68,7 +68,7 @@ public abstract class FTSRestClient implements FTSRestClientI
 
     InputStream in = getClass().getResourceAsStream(fileName);
 
-    try (BufferedReader br = new BufferedReader(new InputStreamReader(in)))
+    try (BufferedReader br = new BufferedReader(new InputStreamReader(in))) 
     {
       String line;
       while ((line = br.readLine()) != null)
@@ -284,7 +284,8 @@ public abstract class FTSRestClient implements FTSRestClientI
               public boolean equals(Object otherObject)
               {
                 FTSDataColumnI that = (FTSDataColumnI) otherObject;
-                return this.getCode().equals(that.getCode())
+                return otherObject == null ? false
+                        : this.getCode().equals(that.getCode())
                         && this.getName().equals(that.getName())
                         && this.getGroup().equals(that.getGroup());
               }