From: Jim Procter Date: Tue, 14 Sep 2021 11:36:01 +0000 (+0100) Subject: JAL-3829 avoid sending rubbish to PDBe search api X-Git-Tag: Release_2_11_2_0~37^2^2~8 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=ad446837678d7f1ebd75e0d9ec8d70c04cd1b437;p=jalview.git JAL-3829 avoid sending rubbish to PDBe search api --- diff --git a/src/jalview/gui/structurechooser/ThreeDBStructureChooserQuerySource.java b/src/jalview/gui/structurechooser/ThreeDBStructureChooserQuerySource.java index d465e23..78dca3f 100644 --- a/src/jalview/gui/structurechooser/ThreeDBStructureChooserQuerySource.java +++ b/src/jalview/gui/structurechooser/ThreeDBStructureChooserQuerySource.java @@ -440,7 +440,10 @@ public class ThreeDBStructureChooserQuerySource { String pdb_Query = buildPDBFTSQueryFor(upResponse); - + if (pdb_Query.length()==0) + { + return null; + } FTSRestResponse resultList; FTSRestRequest pdbRequest = new FTSRestRequest(); pdbRequest.setAllowEmptySeq(false); @@ -450,6 +453,7 @@ public class ThreeDBStructureChooserQuerySource pdbRequest.setWantedFields( pdbquery.getDocFieldPrefs().getStructureSummaryFields()); pdbRequest.setSearchTerm(pdb_Query + ")"); + resultList = pdbquery.executePDBFTSRestRequest(pdbRequest); lastPdbRequest = pdbRequest;