Prevent possible NPE in AuthorRevision.equals
Add check for the given object being an instance of the expected class. This clears a warning from Findbugs. Change-Id: I097f8894239f04804a0038b504eccd8e2374b07a
This commit is contained in:
@@ -210,6 +210,9 @@ class History extends FlowPanel {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof AuthorRevision)) {
|
||||
return false;
|
||||
}
|
||||
AuthorRevision b = (AuthorRevision) o;
|
||||
return author == b.author && revision == b.revision;
|
||||
}
|
||||
|
Reference in New Issue
Block a user