Jian Li
Committed by Gerrit Code Review

Change applicationId's equality checking and hashing method

Application id in applicationId class is transient.
So it would be better to use application name to check equality.

Change-Id: I5f6807054e9a882316ff0a88242cb752eb78bcb9
......@@ -58,7 +58,7 @@ public class DefaultApplicationId implements ApplicationId {
@Override
public int hashCode() {
return Short.hashCode(id);
return Objects.hash(name);
}
@Override
......@@ -68,7 +68,7 @@ public class DefaultApplicationId implements ApplicationId {
}
if (obj instanceof DefaultApplicationId) {
DefaultApplicationId other = (DefaultApplicationId) obj;
return Objects.equals(this.id, other.id);
return Objects.equals(this.name, other.name);
}
return false;
}
......