diff --git a/images/src/org/intellij/images/util/ImageInfoReader.java b/images/src/org/intellij/images/util/ImageInfoReader.java index 7dd764faa328..c84d13ab6d05 100644 --- a/images/src/org/intellij/images/util/ImageInfoReader.java +++ b/images/src/org/intellij/images/util/ImageInfoReader.java @@ -20,7 +20,10 @@ import com.intellij.util.io.UnsyncByteArrayInputStream; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.io.*; +import java.io.DataInput; +import java.io.DataInputStream; +import java.io.IOException; +import java.io.RandomAccessFile; /** * @author spleaner @@ -243,6 +246,28 @@ public class ImageInfoReader { this.height = height; this.bpp = bpp; } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (!(o instanceof Info)) return false; + + Info info = (Info)o; + + if (width != info.width) return false; + if (height != info.height) return false; + if (bpp != info.bpp) return false; + + return true; + } + + @Override + public int hashCode() { + int result = width; + result = 31 * result + height; + result = 31 * result + bpp; + return result; + } } }