Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BugFixes #129

Merged
merged 3 commits into from
Aug 22, 2019
Merged

BugFixes #129

merged 3 commits into from
Aug 22, 2019

Conversation

junaidnz97
Copy link
Contributor

The purpose of this PR is to perform bug fixes for v2 APIs

@junaidnz97 junaidnz97 changed the title Added check for empty geneId BugFixes Aug 22, 2019
private void checkParameters(String species, String assembly, Integer bufferValue) throws IllegalArgumentException {
private void checkParameters(List<String> geneIds, String species, String assembly, Integer bufferValue)
throws IllegalArgumentException {
long emptyGeneIdCount = geneIds.stream().map(String::isEmpty).filter(value -> value == true).count();
Copy link
Contributor

@jmmut jmmut Aug 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what this is checking is if any element is an empty string. I didn't think about this but it would be nice to search only non-empty strings, but my comment was that the endpoint allows to search by an empty list, which this method will allow right now.

so use this line to filter out empty elements, and fail only if the resulting list is empty.

Copy link
Contributor

@jmmut jmmut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please disallow empty lists

…2.java

Co-Authored-By: andresfsilva <afsilva04@gmail.com>
@jmmut jmmut merged commit c731601 into EBIvariation:master Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants