PacifistMC / Forgix

A Gradle plugin/an Architectury addon to merge mod-loaders into one jar! 𝘸𝘒𝘩𝘩 𝘡𝘦𝘀𝘩𝘯𝘰𝘭𝘰𝘨𝘺

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build failing due to NPE in FileUtils

zbx1425 opened this issue Β· comments

Caused by: java.lang.NullPointerException: Cannot invoke "String.startsWith(String)" because "type" is null
	at io.github.pacifistmc.forgix.utils.FileUtils.isMagicCharacter(FileUtils.java:311)

https://github.com/PacifistMC/Forgix/blame/7393708293d724613ab141aa2e5b69ffe6c4f646/src/main/java/io/github/pacifistmc/forgix/utils/FileUtils.java#L311

Turns out somehow Files.probeContentType can return null...

Have to say, I can confirm that behavior. I ran across it in a discord bot of mine before.

@Ran-Mewo I'll submit the fix I did in modfusioner (which seems to work well) tonight :)

commented

@hypherionmc did you submit it yet?

Ah shoot no. Sorry, will do it first thing after work. Please just remind me