Commit af2a371f authored by Nils Christian's avatar Nils Christian
Browse files

fixed IndexOutOfBoundsException when miRNA search result is empty

Closes #241.
parent d55e47f4
......@@ -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