Skip to content

Commit

Permalink
Merge pull request quarkusio#43791 from michalvavrik/feature/fix-keyc…
Browse files Browse the repository at this point in the history
…loak-dev-svc-reload-on-code-change

Add equals and hashcode method to MemorySize configuration class to fix unnecessary Keycloak Dev Service reloading
  • Loading branch information
gsmet authored Oct 10, 2024
2 parents 60f4210 + 44e1b14 commit 7f22ff2
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.quarkus.runtime.configuration;

import java.math.BigInteger;
import java.util.Objects;

/**
* A type representing data sizes.
Expand All @@ -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);
}
}

0 comments on commit 7f22ff2

Please sign in to comment.