From ad446837678d7f1ebd75e0d9ec8d70c04cd1b437 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 14 Sep 2021 12:36:01 +0100 Subject: [PATCH] JAL-3829 avoid sending rubbish to PDBe search api --- .../gui/structurechooser/ThreeDBStructureChooserQuerySource.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 1.7.10.2