Skip to content

Conversation

@labkey-tchad
Copy link
Member

Rationale

Java 25 fixes an inconsistency in the behavior of File.exists where new File("") refers to the working directory in most cases but new File("").exists erroneously returns false. SpectrumImporter depended on the old behavior to determine which file to import.

java.lang.NullPointerException: Cannot invoke "java.io.File.toURI()" because "f" is null
	at org.labkey.vfs.FileSystemLike$Builder.<init>(FileSystemLike.java:135)
	at org.labkey.vfs.FileSystemLike.wrapFile(FileSystemLike.java:257)
	at org.labkey.ms2.SpectrumImporter.<init>(SpectrumImporter.java:77)
	at org.labkey.ms2.PepXmlImporter.processSpectrumFile(PepXmlImporter.java:263)
	at org.labkey.ms2.PepXmlImporter.importRun(PepXmlImporter.java:150)
	at org.labkey.ms2.MS2Importer.upload(MS2Importer.java:201)
	at org.labkey.ms2.MS2Manager.importRun(MS2Manager.java:619)
	at org.labkey.ms2.pipeline.MS2ImportPipelineJob.run(MS2ImportPipelineJob.java:110)

While investigating this issue, I noticed that PepXmlImporter.processSpectrumFile won't ever upload the file returned by getMzXMLFile. This seems to be a regression caused by the latest FileLike changes.

Using FileLike a little more, with null representing non-existent files (instead of empty Strings) fixes both of these issues.

Related Pull Requests

Changes

  • Update MS2 SpectrumImporter to work with Java 25
  • Restore mzXmlFile import behavior in PepXmlImporter.processSpectrumFile

@labkey-tchad labkey-tchad self-assigned this Dec 12, 2025
@labkey-tchad labkey-tchad merged commit 9e14e16 into develop Dec 15, 2025
4 checks passed
@labkey-tchad labkey-tchad deleted the fb_fileLikeFix branch December 15, 2025 16:18
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