From: gmungoc Date: Wed, 11 Oct 2017 11:12:11 +0000 (+0100) Subject: JAL-2757 fix PDB also; suppress stack trace and compiler warnings X-Git-Tag: Release_2_10_3b1~113^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fbug%2FJAL-2757_uniprotftsbadquery;p=jalview.git JAL-2757 fix PDB also; suppress stack trace and compiler warnings --- 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);