JAL-3026 fixes MigLayout, JSON parser
[jalview.git] / src / jalview / javascript / web / ClientResponse.java
index e33dd98..66a1b19 100644 (file)
@@ -6,9 +6,9 @@ public class ClientResponse
 {
   
   private String response;
-  private String encoding;
+  private String[] encoding;
 
-  public ClientResponse(String response, String encoding) 
+  public ClientResponse(String response, String... encoding) 
   {
     this.response = response;
     this.encoding = encoding;
@@ -47,7 +47,7 @@ public class ClientResponse
   public int getStatus()
   {
     // note, we could get the actual response. I am just assuming it is 200 or 400
-    return (response != null && (response.startsWith("{") == encoding.equals("application/json"))
+    return (response != null && (response.startsWith("{") == encoding[0].equals("application/json"))
             ? 200 : 400);
   }