Fix equals() method to work with all objects
This commit is contained in:
parent
6804ee04e3
commit
b6315b15b0
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ public class FolderInfoHolder implements Comparable<FolderInfoHolder> {
|
|||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return this.name.equals(((FolderInfoHolder)o).name);
|
||||
return o instanceof FolderInfoHolder && name.equals(((FolderInfoHolder) o).name);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue