diff --git a/core/src/main/java/org/spongepowered/configurate/ConfigValue.java b/core/src/main/java/org/spongepowered/configurate/ConfigValue.java index 2cd9835ad..36f5aa9fa 100644 --- a/core/src/main/java/org/spongepowered/configurate/ConfigValue.java +++ b/core/src/main/java/org/spongepowered/configurate/ConfigValue.java @@ -20,6 +20,8 @@ /** * The value in a {@link ConfigurationNode}. + * + * @since 4.0.0 */ interface ConfigValue, A extends AbstractConfigurationNode> { diff --git a/core/src/main/java/org/spongepowered/configurate/ListConfigValue.java b/core/src/main/java/org/spongepowered/configurate/ListConfigValue.java index b42004186..c46457fe8 100644 --- a/core/src/main/java/org/spongepowered/configurate/ListConfigValue.java +++ b/core/src/main/java/org/spongepowered/configurate/ListConfigValue.java @@ -124,7 +124,7 @@ public void set(@Nullable Object value) { if (!(value instanceof Collection)) { value = Collections.singleton(value); } - final Collection<@Nullable ?> valueAsList = (Collection<@Nullable ?>) value; + final Collection valueAsList = (Collection) value; final List newValue = new ArrayList<>(valueAsList.size()); int count = 0; diff --git a/core/src/main/java/org/spongepowered/configurate/loader/AbstractConfigurationFormat.java b/core/src/main/java/org/spongepowered/configurate/loader/AbstractConfigurationFormat.java index d8eaf5da5..fc67226d2 100644 --- a/core/src/main/java/org/spongepowered/configurate/loader/AbstractConfigurationFormat.java +++ b/core/src/main/java/org/spongepowered/configurate/loader/AbstractConfigurationFormat.java @@ -79,14 +79,14 @@ public Set supportedExtensions() { } @Override - public ConfigurationLoader<@NonNull ?> create(final Path file) { + public ConfigurationLoader create(final Path file) { return this.builderMaker.get() .path(file) .build(); } @Override - public ConfigurationLoader<@NonNull ?> create(final Path file, final ConfigurationNode options) { + public ConfigurationLoader create(final Path file, final ConfigurationNode options) { return this.builderMaker.get() .from(LoaderOptionSource.node(options)) .path(file) @@ -94,14 +94,14 @@ public Set supportedExtensions() { } @Override - public ConfigurationLoader<@NonNull ?> create(final URL url) { + public ConfigurationLoader create(final URL url) { return this.builderMaker.get() .url(url) .build(); } @Override - public ConfigurationLoader<@NonNull ?> create(final URL url, final ConfigurationNode options) { + public ConfigurationLoader create(final URL url, final ConfigurationNode options) { return this.builderMaker.get() .from(LoaderOptionSource.node(options)) .url(url) diff --git a/core/src/main/java/org/spongepowered/configurate/loader/ConfigurationFormat.java b/core/src/main/java/org/spongepowered/configurate/loader/ConfigurationFormat.java index bef1c10af..b86b59d1f 100644 --- a/core/src/main/java/org/spongepowered/configurate/loader/ConfigurationFormat.java +++ b/core/src/main/java/org/spongepowered/configurate/loader/ConfigurationFormat.java @@ -93,7 +93,7 @@ static Set supportedFormats() { * @return a newly configured loader * @since 4.2.0 */ - default ConfigurationLoader<@NonNull ?> create(Path file) { + default ConfigurationLoader create(Path file) { return create(file, BasicConfigurationNode.factory().createNode()); } @@ -105,7 +105,7 @@ static Set supportedFormats() { * @return a newly configured loader * @since 4.2.0 */ - ConfigurationLoader<@NonNull ?> create(Path file, ConfigurationNode options); + ConfigurationLoader create(Path file, ConfigurationNode options); /** * Create a new loader configured to load from the provided URL, @@ -117,7 +117,7 @@ static Set supportedFormats() { * @return a newly configured loader * @since 4.2.0 */ - default ConfigurationLoader<@NonNull ?> create(URL url) { + default ConfigurationLoader create(URL url) { return create(url, BasicConfigurationNode.factory().createNode()); } @@ -131,6 +131,6 @@ static Set supportedFormats() { * @return a newly configured loader * @since 4.2.0 */ - ConfigurationLoader<@NonNull?> create(URL url, ConfigurationNode options); + ConfigurationLoader create(URL url, ConfigurationNode options); } diff --git a/core/src/main/java/org/spongepowered/configurate/reactive/TransactionalRegistration.java b/core/src/main/java/org/spongepowered/configurate/reactive/TransactionalRegistration.java index f445a6d94..bc08d8f1d 100644 --- a/core/src/main/java/org/spongepowered/configurate/reactive/TransactionalRegistration.java +++ b/core/src/main/java/org/spongepowered/configurate/reactive/TransactionalRegistration.java @@ -24,6 +24,7 @@ * A registration that is transaction-aware. * * @param value type + * @since 4.0.0 */ interface TransactionalRegistration extends AbstractProcessor.Registration { diff --git a/core/src/main/java/org/spongepowered/configurate/reference/ValueReferenceImpl.java b/core/src/main/java/org/spongepowered/configurate/reference/ValueReferenceImpl.java index f644b79c7..c1543900a 100644 --- a/core/src/main/java/org/spongepowered/configurate/reference/ValueReferenceImpl.java +++ b/core/src/main/java/org/spongepowered/configurate/reference/ValueReferenceImpl.java @@ -33,7 +33,7 @@ import java.util.concurrent.Executor; import java.util.function.Function; -class ValueReferenceImpl<@Nullable T, N extends ScopedConfigurationNode> implements ValueReference, Publisher { +class ValueReferenceImpl> implements ValueReference, Publisher { // Information about the reference private final ManualConfigurationReference root; diff --git a/core/src/main/java/org/spongepowered/configurate/serialize/OptionalSerializer.java b/core/src/main/java/org/spongepowered/configurate/serialize/OptionalSerializer.java index 4d2fd8feb..91ea4909b 100644 --- a/core/src/main/java/org/spongepowered/configurate/serialize/OptionalSerializer.java +++ b/core/src/main/java/org/spongepowered/configurate/serialize/OptionalSerializer.java @@ -55,6 +55,7 @@ public Optional deserialize(final AnnotatedType type, final ConfigurationNode } @Override + @SuppressWarnings("NullableOptional") // needed for type signature public void serialize(final AnnotatedType type, final @Nullable Optional obj, final ConfigurationNode node) throws SerializationException { if (obj == null || !obj.isPresent()) { node.set(null); diff --git a/core/src/main/java/org/spongepowered/configurate/serialize/TypeSerializerCollection.java b/core/src/main/java/org/spongepowered/configurate/serialize/TypeSerializerCollection.java index 874dffd29..bb1bd78bb 100644 --- a/core/src/main/java/org/spongepowered/configurate/serialize/TypeSerializerCollection.java +++ b/core/src/main/java/org/spongepowered/configurate/serialize/TypeSerializerCollection.java @@ -501,6 +501,11 @@ public TypeSerializerCollection build() { } } + /** + * A serializer registration. + * + * @since 4.2.0 + */ interface RegisteredSerializer { boolean matches(Type test); diff --git a/format/jackson/src/main/java/org/spongepowered/configurate/jackson/JacksonVisitor.java b/format/jackson/src/main/java/org/spongepowered/configurate/jackson/JacksonVisitor.java index 7f2494fdd..d2787fe0d 100644 --- a/format/jackson/src/main/java/org/spongepowered/configurate/jackson/JacksonVisitor.java +++ b/format/jackson/src/main/java/org/spongepowered/configurate/jackson/JacksonVisitor.java @@ -24,6 +24,7 @@ import java.io.IOException; +@SuppressWarnings("AlmostJavadoc") final class JacksonVisitor implements ConfigurationVisitor { static final ThreadLocal INSTANCE = ThreadLocal.withInitial(JacksonVisitor::new); diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index ddac8f13c..a4492c984 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ assertj="3.25.1" autoValue="1.10.4" checkerQual="3.42.0" -checkstyle="10.12.5" +checkstyle="10.12.7" geantyref = "1.3.14" errorprone="2.24.1" indra = "3.1.3" @@ -10,7 +10,7 @@ junit="5.10.1" ktlint="0.49.1" ktfmt="0.46" pmd = "6.55.0" -spotless = "6.23.2" +spotless = "6.23.3" [libraries] # Shared @@ -47,7 +47,7 @@ guice-runtime = "com.google.inject:guice:5.0.1" # Formats gson = "com.google.code.gson:gson:2.8.0" # Fixed version, to avoid using API not present in older MC -jackson = "com.fasterxml.jackson.core:jackson-core:2.16.0" +jackson = "com.fasterxml.jackson.core:jackson-core:2.16.1" # Tool clikt = "com.github.ajalt:clikt:2.8.0" @@ -55,7 +55,7 @@ jansi = "org.fusesource.jansi:jansi:2.4.1" # Build build-codenarc = { module = "org.codenarc:CodeNarc", version = "3.3.0-groovy-4.0" } -build-codenarcGroovy = { module = "org.apache.groovy:groovy-all", version = "4.0.16" } +build-codenarcGroovy = { module = "org.apache.groovy:groovy-all", version = "4.0.17" } build-errorprone = "net.ltgt.gradle:gradle-errorprone-plugin:3.1.0" build-forbiddenApis = "de.thetaphi:forbiddenapis:3.6" build-goomph = "com.diffplug.gradle:goomph:3.44.0"