From f438955285d7144abcadfb81603f6540773a1605 Mon Sep 17 00:00:00 2001 From: olly Date: Mon, 19 Apr 2021 10:44:12 +0100 Subject: [PATCH] Fix 1 ErrorProneFragileCode finding, REQUIRING THOROUGH REVIEW: * Prefer instanceof to getClass when implementing Object#equals. (see http://go/bugpattern/EqualsGetClass) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This CL looks good? Just LGTM and Approve it! This CL doesn’t look good? This is what you can do: * Suggest a fix on the CL (go/how-to-suggest-fix). * Revert this CL, by replying "REVERT: " * File a bug under go/error-prone-bug for category ErrorProneFragileCode if the change looks generally problematic. * Revert this CL and not get a CL that cleans up these paths in the future by replying "BLOCKLIST: ". This is not reversible! We recommend to opt out the respective paths in your CL Robot configuration instead: go/clrobot-opt-out. This CL was generated by CL Robot - a tool that cleans up code findings (go/clrobot). The affected code paths have been enabled for CL Robot in //depot/google3/java/com/google/android/libraries/exoplayer/METADATA which is reachable following include_presubmits from //depot/google3/third_party/java_src/android_libs/exoplayer/METADATA. Anything wrong with the signup? File a bug at go/clrobot-bug. #codehealth PiperOrigin-RevId: 369180513 --- .../exoplayer2/source/dash/manifest/ProgramInformation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/ProgramInformation.java b/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/ProgramInformation.java index ac264bd2b1..ebfafec999 100644 --- a/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/ProgramInformation.java +++ b/library/dash/src/main/java/com/google/android/exoplayer2/source/dash/manifest/ProgramInformation.java @@ -53,7 +53,7 @@ public class ProgramInformation { if (this == obj) { return true; } - if (obj == null || getClass() != obj.getClass()) { + if (!(obj instanceof ProgramInformation)) { return false; } ProgramInformation other = (ProgramInformation) obj;