From 0b81a1e5d3ce305fe5c56d60c40f28f81ae00ae8 Mon Sep 17 00:00:00 2001 From: hansonr Date: Tue, 16 Apr 2019 08:39:31 -0500 Subject: [PATCH] missing check for JavaScript in client response for String (Java) vs. Map (JavaScript) -- since JavaScript has already done the conversion to a Map and needs no further JSON parsing. --- src/jalview/fts/service/pdb/PDBFTSRestClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jalview/fts/service/pdb/PDBFTSRestClient.java b/src/jalview/fts/service/pdb/PDBFTSRestClient.java index 0e20338..cd3e5c9 100644 --- a/src/jalview/fts/service/pdb/PDBFTSRestClient.java +++ b/src/jalview/fts/service/pdb/PDBFTSRestClient.java @@ -175,7 +175,7 @@ public class PDBFTSRestClient extends FTSRestClient // Get the JSON string from the response object or directly from the // client (JavaScript) - Map jsonObj = (status == 200 + Map jsonObj = (Platform.isJS() && status == 200 ? clientResponse.getEntity(Map.class) : null); String responseString = (jsonObj == null -- 1.7.10.2