fix: add additional null check to hook and update commons
ci/woodpecker/push/docs Pipeline was successful Details
ci/woodpecker/push/jfmod Pipeline was successful Details
ci/woodpecker/tag/jfmod Pipeline is pending Details
ci/woodpecker/tag/docs Pipeline failed Details

This commit is contained in:
Johannes Frohnmeyer 2024-05-05 13:09:02 +02:00
parent 83d85abb17
commit 41364257fb
Signed by: Johannes
GPG Key ID: E76429612C2929F4
1 changed files with 2 additions and 1 deletions

View File

@ -18,7 +18,8 @@ public class ResourcePackHook {
public static final ScopedValue<Boolean> DISABLED = new ScopedValue<>();
private static boolean isDisabled() {
return DISABLED.orElse(false);
Boolean b = DISABLED.orElse(false);
return b != null && b; // this null check should not be needed, but it's here just in case
}
public static InputSupplier<InputStream> hookOpenRoot(InputSupplier<InputStream> value, ResourcePack pack, String[] fileName) {