Skip to content

Commit 9596881

Browse files
committed
(Unneeded change) Revert "FileSignature now supports .equals and .hashCode without serialization."
This reverts commit 84101b9.
1 parent 4af94ec commit 9596881

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

lib/src/main/java/com/diffplug/spotless/FileSignature.java

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -174,20 +174,6 @@ synchronized Sig sign(File fileInput) throws IOException {
174174
}
175175
}
176176

177-
@Override
178-
public boolean equals(Object other) {
179-
if (other instanceof FileSignature) {
180-
return Arrays.equals(signatures, ((FileSignature) other).signatures);
181-
} else {
182-
return false;
183-
}
184-
}
185-
186-
@Override
187-
public int hashCode() {
188-
return Arrays.hashCode(signatures);
189-
}
190-
191177
@SuppressFBWarnings("SE_TRANSIENT_FIELD_NOT_RESTORED")
192178
private static final class Sig implements Serializable {
193179
private static final long serialVersionUID = 6727302747168655222L;
@@ -207,21 +193,6 @@ private static final class Sig implements Serializable {
207193
this.hash = hash;
208194
this.lastModified = lastModified;
209195
}
210-
211-
@Override
212-
public boolean equals(Object other) {
213-
if (other instanceof Sig) {
214-
Sig o = (Sig) other;
215-
return name.equals(o.name) && size == o.size && Arrays.equals(hash, o.hash);
216-
} else {
217-
return false;
218-
}
219-
}
220-
221-
@Override
222-
public int hashCode() {
223-
return Arrays.hashCode(hash) | name.hashCode();
224-
}
225196
}
226197

227198
/** Asserts that child is a subpath of root. and returns the subpath. */

0 commit comments

Comments
 (0)