From 8a3b4f2194c6c3789e6dc4212beade7457382677 Mon Sep 17 00:00:00 2001 From: JP Martin Date: Fri, 11 Mar 2016 10:31:29 -0800 Subject: [PATCH] Remove final from Blob So we can mock it in test classes. Also make equals and hashCode final. --- .../src/main/java/com/google/gcloud/storage/Blob.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Blob.java b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Blob.java index 4c8e935f7071..0c92a1f50594 100644 --- a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Blob.java +++ b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Blob.java @@ -49,7 +49,7 @@ * {@link BlobInfo}. *

*/ -public final class Blob extends BlobInfo { +public class Blob extends BlobInfo { private static final long serialVersionUID = -6806832496717441434L; @@ -482,13 +482,13 @@ public Builder toBuilder() { } @Override - public boolean equals(Object obj) { + public final boolean equals(Object obj) { return obj instanceof Blob && Objects.equals(toPb(), ((Blob) obj).toPb()) && Objects.equals(options, ((Blob) obj).options); } @Override - public int hashCode() { + public final int hashCode() { return Objects.hash(super.hashCode(), options); }