diff --git a/core/runtime/src/main/java/io/quarkus/runtime/configuration/MemorySize.java b/core/runtime/src/main/java/io/quarkus/runtime/configuration/MemorySize.java index d1120f11da580..ebacf8020b948 100644 --- a/core/runtime/src/main/java/io/quarkus/runtime/configuration/MemorySize.java +++ b/core/runtime/src/main/java/io/quarkus/runtime/configuration/MemorySize.java @@ -1,6 +1,7 @@ package io.quarkus.runtime.configuration; import java.math.BigInteger; +import java.util.Objects; /** * A type representing data sizes. @@ -25,4 +26,19 @@ public long asLongValue() { public BigInteger asBigInteger() { return value; } + + @Override + public boolean equals(Object object) { + if (this == object) + return true; + if (object == null || getClass() != object.getClass()) + return false; + MemorySize that = (MemorySize) object; + return Objects.equals(value, that.value); + } + + @Override + public int hashCode() { + return Objects.hashCode(value); + } }