File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
android/guava/src/com/google/common/primitives
guava/src/com/google/common/primitives Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 18
18
import static com .google .common .base .Preconditions .checkElementIndex ;
19
19
import static com .google .common .base .Preconditions .checkNotNull ;
20
20
import static com .google .common .base .Preconditions .checkPositionIndexes ;
21
- import static java .lang .Math .min ;
22
21
23
22
import com .google .common .annotations .GwtCompatible ;
24
23
import com .google .common .annotations .GwtIncompatible ;
@@ -321,7 +320,9 @@ private enum LexicographicalComparator implements Comparator<boolean[]> {
321
320
322
321
@ Override
323
322
public int compare (boolean [] left , boolean [] right ) {
324
- int minLength = min (left .length , right .length );
323
+ // do not static import Math.min due to https://bugs.openjdk.org/browse/JDK-8357219
324
+ @ SuppressWarnings ("StaticImportPreferred" )
325
+ int minLength = Math .min (left .length , right .length );
325
326
for (int i = 0 ; i < minLength ; i ++) {
326
327
int result = Boolean .compare (left [i ], right [i ]);
327
328
if (result != 0 ) {
Original file line number Diff line number Diff line change 18
18
import static com .google .common .base .Preconditions .checkElementIndex ;
19
19
import static com .google .common .base .Preconditions .checkNotNull ;
20
20
import static com .google .common .base .Preconditions .checkPositionIndexes ;
21
- import static java .lang .Math .min ;
22
21
23
22
import com .google .common .annotations .GwtCompatible ;
24
23
import com .google .common .annotations .GwtIncompatible ;
@@ -321,7 +320,9 @@ private enum LexicographicalComparator implements Comparator<boolean[]> {
321
320
322
321
@ Override
323
322
public int compare (boolean [] left , boolean [] right ) {
324
- int minLength = min (left .length , right .length );
323
+ // do not static import Math.min due to https://bugs.openjdk.org/browse/JDK-8357219
324
+ @ SuppressWarnings ("StaticImportPreferred" )
325
+ int minLength = Math .min (left .length , right .length );
325
326
for (int i = 0 ; i < minLength ; i ++) {
326
327
int result = Boolean .compare (left [i ], right [i ]);
327
328
if (result != 0 ) {
You can’t perform that action at this time.
0 commit comments