Skip to content

Conversation

@heathdutton
Copy link

@heathdutton heathdutton commented Dec 18, 2025

Fix #11206

Describe changes proposed in this pull request:

  • Add null/empty validation for genomicDataFilters in fetchGenomicDataCounts and fetchMutationDataCounts endpoints
  • Return empty list instead of propagating IndexOutOfBoundsException from MyBatis mapper
  • Add unit tests covering empty and null filter scenarios

Checks

Any screenshots or GIFs?

NA

Notify

@alisman @inodb

@dippindots dippindots requested a review from onursumer December 23, 2025 16:22
// If genomicDataFilters is null or empty, return an empty result list
// This prevents IndexOutOfBoundsException in the MyBatis mapper
if (genomicDataFilters == null || genomicDataFilters.isEmpty()) {
return new ResponseEntity<>(Collections.emptyList(), HttpStatus.OK);
Copy link
Member

Choose a reason for hiding this comment

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

Might be better to use the ok method here as well for consistency.

Suggested change
return new ResponseEntity<>(Collections.emptyList(), HttpStatus.OK);
return ResponseEntity.ok(Collections.emptyList());


/**
* Test that fetchGenomicDataCounts returns empty list when genomicDataFilters is empty.
* This verifies the fix for Issue #11206.
Copy link
Member

Choose a reason for hiding this comment

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

we probably don't need this line of comment with issue reference. same applies to the other tests below.

@heathdutton heathdutton force-pushed the fix-genomic-data-filter-validation branch 2 times, most recently from 63792bb to ee7d375 Compare December 24, 2025 21:06
When genomicDataFilters is null or empty, return an empty list
instead of throwing IndexOutOfBoundsException.
@alisman alisman force-pushed the fix-genomic-data-filter-validation branch from ee7d375 to 54774f4 Compare January 5, 2026 20:39
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.

500 error evaluating genomicDataFilter

3 participants