JAL-3253-applet JAL-3383
[jalview.git] / src / jalview / io / FeaturesFile.java
index 12ad0d4..aa21b0f 100755 (executable)
@@ -105,11 +105,11 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
   /**
    * Constructor which does not parse the file immediately
    * 
-   * @param file
+   * @param file File or String filename
    * @param paste
    * @throws IOException
    */
-  public FeaturesFile(String file, DataSourceType paste)
+  public FeaturesFile(Object file, DataSourceType paste)
           throws IOException
   {
     super(false, file, paste);
@@ -132,7 +132,7 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
    * @param type
    * @throws IOException
    */
-  public FeaturesFile(boolean parseImmediately, String file,
+  public FeaturesFile(boolean parseImmediately, Object file,
           DataSourceType type) throws IOException
   {
     super(parseImmediately, file, type);
@@ -829,14 +829,15 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
     AlignViewportI av = getViewport();
     if (av != null)
     {
-      if (av.getAlignment() != null)
+      AlignmentI a = av.getAlignment();
+      if (a != null)
       {
-        dataset = av.getAlignment().getDataset();
+        dataset = a.getDataset();
       }
       if (dataset == null)
       {
         // working in the applet context ?
-        dataset = av.getAlignment();
+        dataset = a;
       }
     }
     else
@@ -890,7 +891,8 @@ public class FeaturesFile extends AlignFile implements FeaturesSourceI
 
     StringBuilder out = new StringBuilder(256);
 
-    out.append(String.format("%s %d\n", GFF_VERSION, gffVersion == 0 ? 2 : gffVersion));
+    out.append(String.format("%s %d" + newline, GFF_VERSION,
+            gffVersion == 0 ? 2 : gffVersion));
 
     if (!includeNonPositionalFeatures
             && (visibleColours == null || visibleColours.isEmpty()))