🐛 Serialize the success value, remove equals override
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 29 Apr 2023 19:39:19 +0000 (21:39 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 29 Apr 2023 19:39:19 +0000 (21:39 +0200)
src/main/java/net/pterodactylus/rhynodge/states/AbstractState.java
src/test/java/net/pterodactylus/rhynodge/states/StateManagerTest.java

index 8828fe4..f3b37e5 100644 (file)
@@ -46,6 +46,7 @@ public abstract class AbstractState implements State {
        private final long time;
 
        /** Whether the state was successfully retrieved. */
        private final long time;
 
        /** Whether the state was successfully retrieved. */
+       @JsonProperty
        private final boolean success;
        private final boolean empty;
 
        private final boolean success;
        private final boolean empty;
 
index 8f250ab..da1bb90 100644 (file)
@@ -97,17 +97,6 @@ public class StateManagerTest {
                        super(success);
                }
 
                        super(success);
                }
 
-               @Override
-               public boolean equals(Object object) {
-                       if (!(object instanceof TestState)) {
-                               return false;
-                       }
-                       TestState testState = (TestState) object;
-                       return equal(exception(), testState.exception())
-                                       && (failCount() == testState.failCount())
-                                       && (time() == testState.time());
-               }
-
                @Nonnull
                @Override
                protected String plainText() {
                @Nonnull
                @Override
                protected String plainText() {