From cef8dbc4cf7c8b47864b11aad36596901003639a Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 11 Oct 2017 12:12:11 +0100 Subject: [PATCH] JAL-2757 fix PDB also; suppress stack trace and compiler warnings --- src/jalview/fts/service/pdb/PDBFTSPanel.java | 13 +++++++------ src/jalview/fts/service/uniprot/UniprotFTSPanel.java | 13 ++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/jalview/fts/service/pdb/PDBFTSPanel.java b/src/jalview/fts/service/pdb/PDBFTSPanel.java index 2a53ab9..19f7db4 100644 --- a/src/jalview/fts/service/pdb/PDBFTSPanel.java +++ b/src/jalview/fts/service/pdb/PDBFTSPanel.java @@ -43,13 +43,13 @@ public class PDBFTSPanel extends GFTSPanel private static final String PDB_FTS_CACHE_KEY = "CACHE.PDB_FTS"; - public PDBFTSPanel(SequenceFetcher seqFetcher) + public PDBFTSPanel(SequenceFetcher fetcher) { super(); pageLimit = PDBFTSRestClient.getInstance().getDefaultResponsePageSize(); - this.seqFetcher = seqFetcher; - this.progressIndicator = (seqFetcher == null) ? null - : seqFetcher.getProgressIndicator(); + this.seqFetcher = fetcher; + this.progressIndicator = (fetcher == null) ? null + : fetcher.getProgressIndicator(); } @Override @@ -86,15 +86,16 @@ public class PDBFTSPanel extends GFTSPanel request.setSearchTerm(searchTerm + ")"); request.setOffSet(offSet); request.setWantedFields(wantedFields); - FTSRestClientI pdbRestCleint = PDBFTSRestClient.getInstance(); + FTSRestClientI pdbRestClient = PDBFTSRestClient.getInstance(); FTSRestResponse resultList; try { - resultList = pdbRestCleint.executeRequest(request); + resultList = pdbRestClient.executeRequest(request); } catch (Exception e) { setErrorMessage(e.getMessage()); checkForErrors(); + setSearchInProgress(false); return; } diff --git a/src/jalview/fts/service/uniprot/UniprotFTSPanel.java b/src/jalview/fts/service/uniprot/UniprotFTSPanel.java index 748088d..020331a 100644 --- a/src/jalview/fts/service/uniprot/UniprotFTSPanel.java +++ b/src/jalview/fts/service/uniprot/UniprotFTSPanel.java @@ -44,14 +44,14 @@ public class UniprotFTSPanel extends GFTSPanel private static final String UNIPROT_FTS_CACHE_KEY = "CACHE.UNIPROT_FTS"; - public UniprotFTSPanel(SequenceFetcher seqFetcher) + public UniprotFTSPanel(SequenceFetcher fetcher) { super(); pageLimit = UniProtFTSRestClient.getInstance() .getDefaultResponsePageSize(); - this.seqFetcher = seqFetcher; - this.progressIndicator = (seqFetcher == null) ? null - : seqFetcher.getProgressIndicator(); + this.seqFetcher = fetcher; + this.progressIndicator = (fetcher == null) ? null + : fetcher.getProgressIndicator(); } @Override @@ -85,15 +85,14 @@ public class UniprotFTSPanel extends GFTSPanel request.setSearchTerm(searchTerm); request.setOffSet(offSet); request.setWantedFields(wantedFields); - FTSRestClientI uniProtRestCleint = UniProtFTSRestClient + FTSRestClientI uniProtRestClient = UniProtFTSRestClient .getInstance(); FTSRestResponse resultList; try { - resultList = uniProtRestCleint.executeRequest(request); + resultList = uniProtRestClient.executeRequest(request); } catch (Exception e) { - e.printStackTrace(); setErrorMessage(e.getMessage()); checkForErrors(); setSearchInProgress(false); -- 1.7.10.2