From ca8d94517a9edab7bc448201fca26a0489135204 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 29 Apr 2023 21:39:19 +0200 Subject: [PATCH] =?utf8?q?=F0=9F=90=9B=20Serialize=20the=20success=20value?= =?utf8?q?,=20remove=20equals=20override?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../java/net/pterodactylus/rhynodge/states/AbstractState.java | 1 + .../net/pterodactylus/rhynodge/states/StateManagerTest.java | 11 ----------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/main/java/net/pterodactylus/rhynodge/states/AbstractState.java b/src/main/java/net/pterodactylus/rhynodge/states/AbstractState.java index 8828fe4..f3b37e5 100644 --- a/src/main/java/net/pterodactylus/rhynodge/states/AbstractState.java +++ b/src/main/java/net/pterodactylus/rhynodge/states/AbstractState.java @@ -46,6 +46,7 @@ public abstract class AbstractState implements State { private final long time; /** Whether the state was successfully retrieved. */ + @JsonProperty private final boolean success; private final boolean empty; diff --git a/src/test/java/net/pterodactylus/rhynodge/states/StateManagerTest.java b/src/test/java/net/pterodactylus/rhynodge/states/StateManagerTest.java index 8f250ab..da1bb90 100644 --- a/src/test/java/net/pterodactylus/rhynodge/states/StateManagerTest.java +++ b/src/test/java/net/pterodactylus/rhynodge/states/StateManagerTest.java @@ -97,17 +97,6 @@ public class StateManagerTest { 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() { -- 2.7.4