Fix equals() method to work with all objects

This commit is contained in:
cketti 2015-01-03 04:10:15 +01:00
parent 6804ee04e3
commit b6315b15b0

View file

@ -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