Fix LinkProperties's equals() method.
LinkProperties's equals() method was broken by the addition of stacked interfaces. The reason was that equals() was checking the equality of mStackedInterfaces.keys(), which is just an enumeration, instead of mStackedInterfaces.keySet(), which actually contains the keys. The test was failing, but I didn't notice. Fix the bug and make the test check the objects more in depth so it can give more detailed error messages when equals() fails. Bug: 8276725 Change-Id: Ie990bd75f641c28e63e54d953dcd0f4de13f7c9f
This commit is contained in:
parent
d40130abbe
commit
c3787faa2a
1 changed files with 33 additions and 9 deletions
|
|
@ -378,7 +378,7 @@ public class LinkProperties implements Parcelable {
|
|||
* @return {@code true} if both are identical, {@code false} otherwise.
|
||||
*/
|
||||
public boolean isIdenticalStackedLinks(LinkProperties target) {
|
||||
if (!mStackedLinks.keys().equals(target.mStackedLinks.keys())) {
|
||||
if (!mStackedLinks.keySet().equals(target.mStackedLinks.keySet())) {
|
||||
return false;
|
||||
}
|
||||
for (LinkProperties stacked : mStackedLinks.values()) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue