From c0e78bebf4b15dd73884190ff514fad1d3f0ab54 Mon Sep 17 00:00:00 2001 From: sk89q Date: Sun, 3 Oct 2010 17:29:17 -0700 Subject: [PATCH] Fixed a bug where Point was not returning accurate results with .equals(), breaking undo code. Temporarily using org.apache.commons.lang3.builder.EqualsBuilder to fix the problem. --- src/com/sk89q/worldedit/Point.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/com/sk89q/worldedit/Point.java b/src/com/sk89q/worldedit/Point.java index 29d6d5360..13a2c8580 100644 --- a/src/com/sk89q/worldedit/Point.java +++ b/src/com/sk89q/worldedit/Point.java @@ -20,6 +20,7 @@ package com.sk89q.worldedit; import org.apache.commons.lang3.builder.HashCodeBuilder; +import org.apache.commons.lang3.builder.EqualsBuilder; /** * @@ -75,7 +76,12 @@ public final class Point { return false; } Point other = (Point)obj; - return other.x == x && other.y == y && other.z == z; + return new EqualsBuilder() + .append(x, other.x) + .append(y, other.y) + .append(z, other.z) + .isEquals(); + } /**