File tree 2 files changed +8
-7
lines changed
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 1
1
Generally when comparing arrays for equality, the programmer intends to check
2
2
that the contents of the arrays are equal rather than that they are actually the
3
3
same 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() ` .
8
8
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 1
1
API providers may annotate a method with an annotation like
2
- ` android.support .annotation.CallSuper` or
2
+ ` androidx .annotation.CallSuper` or
3
3
` javax.annotation.OverridingMethodsMustInvokeSuper ` to require that overriding
4
4
methods invoke the super method. This check enforces those annotations.
You can’t perform that action at this time.
0 commit comments