From 2275af0342e52e8e6071b3358219c5f0dc9221d8 Mon Sep 17 00:00:00 2001 From: zml Date: Sat, 14 Oct 2023 11:43:06 -0700 Subject: [PATCH] chore(build): Fix new Checkstyle failures --- .../objectmapping/ObjectMapperTest.java | 14 +++++++------- .../serialize/NumericSerializersTest.java | 2 +- .../configurate/serialize/TypeSerializersTest.java | 2 +- .../objectmapping/guice/GuiceObjectMapperTest.java | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/src/test/java/org/spongepowered/configurate/objectmapping/ObjectMapperTest.java b/core/src/test/java/org/spongepowered/configurate/objectmapping/ObjectMapperTest.java index 83c7fd377..269d765e0 100644 --- a/core/src/test/java/org/spongepowered/configurate/objectmapping/ObjectMapperTest.java +++ b/core/src/test/java/org/spongepowered/configurate/objectmapping/ObjectMapperTest.java @@ -109,7 +109,7 @@ void testDefaultsApplied() throws SerializationException { } @ConfigSerializable - private static class CommentedObject { + private static final class CommentedObject { @Setting("commented-key") @Comment("You look nice today") private String color; @@ -150,7 +150,7 @@ void testNoArglessConstructor() { } @ConfigSerializable - private static class TestObjectChild extends TestObject { + private static final class TestObjectChild extends TestObject { @Setting("child-setting") private boolean childSetting; } @@ -167,7 +167,7 @@ void testSuperclassFieldsIncluded() throws SerializationException { } @ConfigSerializable - private static class FieldNameObject { + private static final class FieldNameObject { @Setting private boolean loads; } @@ -181,12 +181,12 @@ void testKeyFromFieldName() throws SerializationException { assertTrue(obj.loads); } - private static class ParentObject { + private static final class ParentObject { @Comment("Comment on parent") private InnerObject inner = new InnerObject(); } @ConfigSerializable - private static class InnerObject { + private static final class InnerObject { @Comment("Something") private String test = "Default value"; } @@ -206,7 +206,7 @@ private interface ParentInterface { String test(); } - private static class ChildObject implements ParentInterface { + private static final class ChildObject implements ParentInterface { @Comment("Something") private String test = "Default value"; @Override public String test() { @@ -215,7 +215,7 @@ private static class ChildObject implements ParentInterface { } @ConfigSerializable - private static class ContainingObject { + private static final class ContainingObject { @Setting ParentInterface inner = new ChildObject(); @Setting List list = new ArrayList<>(); } diff --git a/core/src/test/java/org/spongepowered/configurate/serialize/NumericSerializersTest.java b/core/src/test/java/org/spongepowered/configurate/serialize/NumericSerializersTest.java index fa7af991e..7584685e6 100644 --- a/core/src/test/java/org/spongepowered/configurate/serialize/NumericSerializersTest.java +++ b/core/src/test/java/org/spongepowered/configurate/serialize/NumericSerializersTest.java @@ -47,7 +47,7 @@ void testSerializeCustomNumber() { assertNull(serializer, "Type serializer for custom number class should be null!"); } - private static class CustomNumber extends Number { + private static final class CustomNumber extends Number { public static final long serialVersionUID = 4647727438607023527L; @Override diff --git a/core/src/test/java/org/spongepowered/configurate/serialize/TypeSerializersTest.java b/core/src/test/java/org/spongepowered/configurate/serialize/TypeSerializersTest.java index 4424da23a..2a281d40d 100644 --- a/core/src/test/java/org/spongepowered/configurate/serialize/TypeSerializersTest.java +++ b/core/src/test/java/org/spongepowered/configurate/serialize/TypeSerializersTest.java @@ -309,7 +309,7 @@ void testMapSerializerPreservesChildComments() throws SerializationException { } @ConfigSerializable - private static class TestObject { + private static final class TestObject { @Setting("int") private int value; @Setting private String name; } diff --git a/extra/guice/src/test/java/org/spongepowered/configurate/objectmapping/guice/GuiceObjectMapperTest.java b/extra/guice/src/test/java/org/spongepowered/configurate/objectmapping/guice/GuiceObjectMapperTest.java index 5e79b8aea..6a4cd405a 100644 --- a/extra/guice/src/test/java/org/spongepowered/configurate/objectmapping/guice/GuiceObjectMapperTest.java +++ b/extra/guice/src/test/java/org/spongepowered/configurate/objectmapping/guice/GuiceObjectMapperTest.java @@ -31,7 +31,7 @@ class GuiceObjectMapperTest { - private static class TestModule extends AbstractModule { + private static final class TestModule extends AbstractModule { @Override protected void configure() { this.bind(String.class).toInstance("test value");