File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 11Generally when comparing arrays for equality, the programmer intends to check
22that the contents of the arrays are equal rather than that they are actually the
33same object. But many commonly used equals methods compare arrays for reference
4- equality rather than content equality. These include the instance .equals()
5- method, Guava's com.google.common.base.Objects#equal(), JDK's
6- java.util.Objects#equals(), and Android's
7- android.support.v4.util. ObjectsCompat#equals.
4+ equality rather than content equality. These include the instance ` .equals() `
5+ method, Guava's ` com.google.common.base.Objects#equal() ` , JDK's
6+ ` java.util.Objects#equals() ` , and Android's
7+ ` androidx.core. ObjectsCompat#equals() ` .
88
9- If reference equality is needed, == should be used instead for clarity.
10- Otherwise, use java.util.Arrays#equals() to compare the contents of the arrays.
9+ If reference equality is needed, ` == ` should be used instead for clarity.
10+ Otherwise, use ` java.util.Arrays#equals() ` to compare the contents of the
11+ arrays.
Original file line number Diff line number Diff line change 11API providers may annotate a method with an annotation like
2- ` android.support .annotation.CallSuper` or
2+ ` androidx .annotation.CallSuper` or
33` javax.annotation.OverridingMethodsMustInvokeSuper ` to require that overriding
44methods invoke the super method. This check enforces those annotations.
You can’t perform that action at this time.
0 commit comments