From 8ca7fa95c05ae0f1a3e2ede52010486715c90181 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Thu, 8 Jun 2023 06:50:41 -0700 Subject: [PATCH] fix defaulting join-classpath to true for plugin deps --- patches/server/Paper-Plugins.patch | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/patches/server/Paper-Plugins.patch b/patches/server/Paper-Plugins.patch index d88d66a8d3..3ca74c4a16 100644 --- a/patches/server/Paper-Plugins.patch +++ b/patches/server/Paper-Plugins.patch @@ -5286,25 +5286,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 @@ -0,0 +0,0 @@ +package io.papermc.paper.plugin.provider.configuration.type; + ++import org.checkerframework.checker.nullness.qual.NonNull; ++import org.checkerframework.framework.qual.DefaultQualifier; +import org.spongepowered.configurate.objectmapping.ConfigSerializable; + ++import static java.util.Objects.requireNonNullElse; ++ ++@DefaultQualifier(NonNull.class) +@ConfigSerializable +public record DependencyConfiguration( + LoadOrder load, -+ boolean required, -+ boolean joinClasspath ++ Boolean required, ++ Boolean joinClasspath +) { -+ -+ public DependencyConfiguration(boolean required, boolean joinClasspath) { -+ this(LoadOrder.OMIT, required, joinClasspath); -+ } -+ -+ public DependencyConfiguration(boolean required) { -+ this(required, true); -+ } -+ -+ public DependencyConfiguration() { -+ this(true); ++ @SuppressWarnings("DataFlowIssue") // incorrect intellij inspections ++ public DependencyConfiguration { ++ required = requireNonNullElse(required, true); ++ joinClasspath = requireNonNullElse(joinClasspath, true); + } + + @ConfigSerializable