missing check for JavaScript in client response for String (Java) vs.
[jalview.git] / src / jalview / fts / service / pdb / PDBFTSRestClient.java
index 0b5d431..cd3e5c9 100644 (file)
@@ -175,7 +175,7 @@ public class PDBFTSRestClient extends FTSRestClient
 
       // Get the JSON string from the response object or directly from the
       // client (JavaScript)
-      Map<String, Object> jsonObj = (status == 200
+      Map<String, Object> jsonObj = (Platform.isJS() && status == 200
               ? clientResponse.getEntity(Map.class)
               : null);
       String responseString = (jsonObj == null
@@ -482,32 +482,5 @@ public static String parseJsonExceptionString(String jsonErrorResponse)
     return allDefaultDisplayedStructureDataColumns;
   }
   
-  @SuppressWarnings("unchecked")
-public static void main(String[] args) {
-    
-    
-    // check for transpiler fix associated with JSONParser yylex.java use of charAt()
-    // instead of codePointAt()
-
-    String s = "e";
-    char c = 'c';
-    char f = 'f';
-    s += c | f; 
-    int x = c&f;
-    int y = 2 & c;
-    int z = c ^ 5;
-    String result = s +x + y + z;
-    assert (result == "e103982102");
-    try
-    {
-      Map<String, Object> jsonObj = (Map<String, Object>) JSONUtils.parse("{\"a\":3}");
-      System.out.println(jsonObj);
-    } catch (ParseException e)
-    {
-      e.printStackTrace();
-    }
-    
-  }
-  
   
 }