From 7434a5c8bf464bf806a6e88a17bae3f217a5ec68 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 31 Oct 2018 15:10:22 +0000 Subject: [PATCH] JAL-3026 skip unsupported HttpURLConnection methods in JS --- src/jalview/ext/ensembl/EnsemblRestClient.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/jalview/ext/ensembl/EnsemblRestClient.java b/src/jalview/ext/ensembl/EnsemblRestClient.java index f36e111..e3d695f 100644 --- a/src/jalview/ext/ensembl/EnsemblRestClient.java +++ b/src/jalview/ext/ensembl/EnsemblRestClient.java @@ -20,6 +20,7 @@ */ package jalview.ext.ensembl; +import jalview.bin.Jalview; import jalview.io.DataSourceType; import jalview.io.FileParse; import jalview.util.StringUtils; @@ -336,12 +337,15 @@ abstract class EnsemblRestClient extends EnsemblSequenceFetcher getRequestMimeType(multipleIds)); connection.setRequestProperty("Accept", getResponseMimeType()); - connection.setUseCaches(false); connection.setDoInput(true); connection.setDoOutput(multipleIds); - connection.setConnectTimeout(CONNECT_TIMEOUT_MS); - connection.setReadTimeout(readTimeout); + if (!Jalview.isJS()) + { + connection.setUseCaches(false); + connection.setConnectTimeout(CONNECT_TIMEOUT_MS); + connection.setReadTimeout(readTimeout); + } if (multipleIds) { -- 1.7.10.2