Commit 981017fe authored by Piotr Gawron's avatar Piotr Gawron
Browse files

Merge branch 'fix-empty-mirna-searchresults' into 'devel_11.0.x'

fixed IndexOutOfBoundsException when miRNA search result is empty

See merge request piotr.gawron/minerva!148
parents d55e47f4 af2a371f
......@@ -110,11 +110,14 @@ public class MiRNAService extends DbSearchService implements IMiRNAService {
List<String> names = new ArrayList<>();
names.add(name);
List<MiRNA> miRNAs = miRNAParser.getMiRnasByNames(names);
return miRNAs.get(0);
if (miRNAs.size() > 0) {
return miRNAs.get(0);
}
return null;
// return miRNAViewFactory.create(miRNAs.get(0),
// searchCriteria.getModel(), searchCriteria.getColorSet());
} catch (MiRNASearchException e) {
logger.error("Probleml with accessing mirna database", e);
logger.error("Problem with accessing mirna database", e);
return null;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment