From 60200f6302a4de773eab592caf9a7646f5416c80 Mon Sep 17 00:00:00 2001 From: Maarten Billemont Date: Mon, 18 May 2020 12:14:44 -0400 Subject: [PATCH] Fix all versions advertising themselves as V0. --- .../src/main/java/com/lyndir/masterpassword/MPAlgorithm.java | 4 ++-- .../src/main/java/com/lyndir/masterpassword/MPMasterKey.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/platform-independent/java/algorithm/src/main/java/com/lyndir/masterpassword/MPAlgorithm.java b/platform-independent/java/algorithm/src/main/java/com/lyndir/masterpassword/MPAlgorithm.java index 43b1f9eb..075a0e2a 100644 --- a/platform-independent/java/algorithm/src/main/java/com/lyndir/masterpassword/MPAlgorithm.java +++ b/platform-independent/java/algorithm/src/main/java/com/lyndir/masterpassword/MPAlgorithm.java @@ -151,7 +151,7 @@ public interface MPAlgorithm { /** * The algorithm iterations. */ - enum Version implements MPAlgorithm { + enum Version implements MPAlgorithm { /** * bugs: @@ -346,7 +346,7 @@ public interface MPAlgorithm { @Nonnull @Override public Version version() { - return MPAlgorithm.Version.V0; + return this; } @Nonnull diff --git a/platform-independent/java/algorithm/src/main/java/com/lyndir/masterpassword/MPMasterKey.java b/platform-independent/java/algorithm/src/main/java/com/lyndir/masterpassword/MPMasterKey.java index 48b78de8..1a8d602e 100644 --- a/platform-independent/java/algorithm/src/main/java/com/lyndir/masterpassword/MPMasterKey.java +++ b/platform-independent/java/algorithm/src/main/java/com/lyndir/masterpassword/MPMasterKey.java @@ -20,7 +20,6 @@ package com.lyndir.masterpassword; import com.google.common.base.Preconditions; import com.google.common.primitives.UnsignedInteger; -import com.lyndir.lhunath.opal.system.CodeUtils; import com.lyndir.lhunath.opal.system.logging.Logger; import java.util.Arrays; import java.util.EnumMap; @@ -56,6 +55,7 @@ public class MPMasterKey { } @Override + @SuppressWarnings("deprecation") protected void finalize() throws Throwable {