mirror of
https://github.com/samsonjs/media.git
synced 2026-04-15 12:55:46 +00:00
Make Track[Group|GroupArray|Selection] consistent.
- I don't think the length is useful in hashCode; if the length is different then Arrays.hashCode should account for that. - "this." just for consistency across these classes. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=116641142
This commit is contained in:
parent
00191848f7
commit
9c98c4bb10
2 changed files with 2 additions and 6 deletions
|
|
@ -58,7 +58,7 @@ public final class TrackGroup {
|
|||
Assertions.checkState(formats.length > 0);
|
||||
this.adaptive = adaptive;
|
||||
this.formats = formats;
|
||||
length = formats.length;
|
||||
this.length = formats.length;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -77,7 +77,6 @@ public final class TrackGroup {
|
|||
int result = 17;
|
||||
result = 31 * result + (adaptive ? 1231 : 1237);
|
||||
result = 31 * result + Arrays.hashCode(formats);
|
||||
result = 31 * result + length;
|
||||
hashCode = result;
|
||||
}
|
||||
return hashCode;
|
||||
|
|
|
|||
|
|
@ -53,10 +53,7 @@ public final class TrackGroupArray {
|
|||
@Override
|
||||
public int hashCode() {
|
||||
if (hashCode == 0) {
|
||||
int result = 17;
|
||||
result = 31 * result + Arrays.hashCode(trackGroups);
|
||||
result = 31 * result + length;
|
||||
hashCode = result;
|
||||
hashCode = Arrays.hashCode(trackGroups);
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue