Refactor ChannelTab.equals
This commit is contained in:
parent
d2b03afcf4
commit
14bbaccb9f
|
@ -446,9 +446,14 @@ public abstract class Tab {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(final Object obj) {
|
public boolean equals(final Object obj) {
|
||||||
return super.equals(obj) && channelServiceId == ((ChannelTab) obj).channelServiceId
|
if (!(obj instanceof ChannelTab)) {
|
||||||
&& Objects.equals(channelUrl, ((ChannelTab) obj).channelUrl)
|
return false;
|
||||||
&& Objects.equals(channelName, ((ChannelTab) obj).channelName);
|
}
|
||||||
|
final ChannelTab other = (ChannelTab) obj;
|
||||||
|
return super.equals(obj)
|
||||||
|
&& channelServiceId == other.channelServiceId
|
||||||
|
&& channelUrl.equals(other.channelName)
|
||||||
|
&& channelName.equals(other.channelName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getChannelServiceId() {
|
public int getChannelServiceId() {
|
||||||
|
|
Loading…
Reference in New Issue