Skip to content

GH Issue 1887: Fix NPE when publishing a study with specimens - #8327

Merged
labkey-adam merged 1 commit into
release26.3-SNAPSHOTfrom
26.3_fb_specimen_import_npe
Nov 11, 2026
Merged

labkey-adam merged 1 commit into
release26.3-SNAPSHOTfrom
26.3_fb_specimen_import_npe

Conversation

@labkey-adam

@labkey-adam labkey-adam commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Rationale

A FileLike refactor caused doImport() to pass null to a FileType.isType() method that doesn't handle nulls

Related Pull Requests

@labkey-jeckels labkey-jeckels left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need an automated test for this?

@labkey-adam

Copy link
Copy Markdown
Contributor Author

Do we need an automated test for this?

I think I can adjust StudyPublishTest to hit the repro. Will do that after merging this PR.

@labkey-adam
labkey-adam merged commit c1b9a04 into release26.3-SNAPSHOT Nov 11, 2026
11 checks passed
@labkey-adam
labkey-adam deleted the 26.3_fb_specimen_import_npe branch November 11, 2026 21:14
@labkey-adam

Copy link
Copy Markdown
Contributor Author

Do we need an automated test for this?

I think I can adjust StudyPublishTest to hit the repro. Will do that after merging this PR.

Actually, I confirmed that the StudyPublishTest on 26.7 exercises this code and would flag a regression: https://teamcity.labkey.org/buildConfiguration/LabKey_267Release_Community_DailySuites_DailyEPostgres/4260133

That test didn't flag the problem (and won't flag a regression) in 26.3 because, in that release, the QueryBasedSpecimenTransform was dependent on the Professional module being present, and these tests always run on community builds. The refactor I did in 26.7 added the null check and removed the Professional module check. I'm not going to bother adding a 26.3 regression test.

labkey-adam added a commit that referenced this pull request Nov 12, 2026
## Rationale
Make all `FileType.isType()` handle `null` values, for consistency.
Document this with `@Nullable` annotation.

## Related Pull Requests
- #8327
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