From 33e5d6b51712e71d71b0ca0ab085645e6945f538 Mon Sep 17 00:00:00 2001 From: Anandakumar Natarajan Date: Fri, 19 Jul 2024 10:46:26 +0530 Subject: [PATCH] Removed static scope from the _TAG member variable in UnknownAttestation. ``` UnknownAttestation(byte[] tag, byte[] payload) { super(); this._TAG = tag; this.payload = payload; } ``` In constructor, for each instance it is getting overrided. ``` if (!Arrays.equals(this._TAG(), ((UnknownAttestation) obj)._TAG())) { return false; } ``` Since _TAG is declared static always this if statement will be false. --- .../com/eternitywall/ots/attestation/UnknownAttestation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/eternitywall/ots/attestation/UnknownAttestation.java b/src/main/java/com/eternitywall/ots/attestation/UnknownAttestation.java index 5bfb019..ce3132e 100644 --- a/src/main/java/com/eternitywall/ots/attestation/UnknownAttestation.java +++ b/src/main/java/com/eternitywall/ots/attestation/UnknownAttestation.java @@ -19,7 +19,7 @@ public class UnknownAttestation extends TimeAttestation { byte[] payload; - public static byte[] _TAG = new byte[]{}; + public byte[] _TAG = new byte[]{}; @Override public byte[] _TAG() {