From 3744608398a521d2e23cf5ef3b8def4c719598e3 Mon Sep 17 00:00:00 2001 From: arnaudlabourel <arnaud.labourel@univ-amu.fr> Date: Tue, 6 Sep 2022 10:45:48 +0200 Subject: [PATCH] ByteGrayColor : equals using greaylevel --- src/main/java/ByteGrayColor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ByteGrayColor.java b/src/main/java/ByteGrayColor.java index 2090de7..70e3b97 100644 --- a/src/main/java/ByteGrayColor.java +++ b/src/main/java/ByteGrayColor.java @@ -51,7 +51,7 @@ public class ByteGrayColor implements GrayColor { if (this == o) return true; if (this.getClass() != o.getClass()) return false; ByteGrayColor color = (ByteGrayColor) o; - return this.compareTo(color) == 0; + return grayLevel == color.grayLevel; } } -- GitLab