diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/File.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/File.java index b9e455dcb0..47b0015cdd 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/File.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/File.java @@ -31,6 +31,7 @@ import javax.xml.bind.annotation.adapters.NormalizedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import com.google.common.base.Objects; +import com.google.common.base.Objects.ToStringHelper; import com.google.common.collect.Sets; @@ -228,24 +229,26 @@ public class File extends EntityType { if (o == null || getClass() != o.getClass()) return false; File that = File.class.cast(o); - return equal(size, that.size) && + return super.equals(that) && + equal(size, that.size) && equal(bytesTransferred, that.bytesTransferred) && equal(checksum, that.checksum); } @Override public int hashCode() { - return Objects.hashCode(size, + return Objects.hashCode(super.hashCode(), + size, bytesTransferred, checksum); } @Override - public String toString() { - return Objects.toStringHelper("") + public ToStringHelper string() { + return super.string() .add("size", size) .add("bytesTransferred", bytesTransferred) - .add("checksum", checksum).toString(); + .add("checksum", checksum); } }