Skip to content

Commit

Permalink
Merge pull request #67 from ao508/handle-npe
Browse files Browse the repository at this point in the history
Handle NPE in getNextSampleIncrement()
  • Loading branch information
ao508 authored Jul 31, 2023
2 parents 51d4da2 + 542a5b6 commit 5b7081d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,10 @@ private Integer getNextSampleIncrement(List<SampleMetadata> samples) {
// to prevent accidentally giving samples the same counter
Integer maxIncrement = 0;
for (SampleMetadata sample : samples) {
// skip samples without a defined cmo sample label
if (StringUtils.isBlank(sample.getCmoSampleName())) {
continue;
}
// skip cell line samples
if (CMO_CELLLINE_ID_REGEX.matcher(sample.getCmoSampleName()).find()) {
continue;
Expand Down

0 comments on commit 5b7081d

Please sign in to comment.