diff options
author | Jake Potrebic <[email protected]> | 2023-06-08 07:08:58 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2023-06-08 07:08:58 -0700 |
commit | 483368e480eb2ec060d8e68b30e14ec96aba6c4e (patch) | |
tree | cbac20bbcfe3e3cd94fad66337d02e134bf6e957 | |
parent | 38b2754b2872c5b2fce13624ddd996336351a327 (diff) | |
download | Paper-483368e480eb2ec060d8e68b30e14ec96aba6c4e.tar.gz Paper-483368e480eb2ec060d8e68b30e14ec96aba6c4e.zip |
correct default to join-classpath: true for dependencies (#9279)
-rw-r--r-- | patches/server/0013-Paper-Plugins.patch | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/patches/server/0013-Paper-Plugins.patch b/patches/server/0013-Paper-Plugins.patch index b3e48e233f..56e367fe49 100644 --- a/patches/server/0013-Paper-Plugins.patch +++ b/patches/server/0013-Paper-Plugins.patch @@ -5280,31 +5280,29 @@ index 0000000000000000000000000000000000000000..a0109a388188b0808900405d334a4031 +} diff --git a/src/main/java/io/papermc/paper/plugin/provider/configuration/type/DependencyConfiguration.java b/src/main/java/io/papermc/paper/plugin/provider/configuration/type/DependencyConfiguration.java new file mode 100644 -index 0000000000000000000000000000000000000000..594357f65813bd6287e982af12e4e5eaf443240e +index 0000000000000000000000000000000000000000..957fb5e60ba6bd8760e8f6016d7bb6e8a405e163 --- /dev/null +++ b/src/main/java/io/papermc/paper/plugin/provider/configuration/type/DependencyConfiguration.java -@@ -0,0 +1,32 @@ +@@ -0,0 +1,30 @@ +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 |