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 1717import static com .google .common .base .Preconditions .checkArgument ;
1818import static com .google .common .base .Preconditions .checkNotNull ;
1919import static com .google .common .base .Preconditions .checkPositionIndexes ;
20- import static java .lang .Math .min ;
2120
2221import com .google .common .annotations .GwtCompatible ;
2322import com .google .errorprone .annotations .CanIgnoreReturnValue ;
@@ -196,8 +195,10 @@ enum LexicographicalComparator implements Comparator<int[]> {
196195 INSTANCE ;
197196
198197 @ Override
198+ // A call to bare "min" or "max" would resolve to our varargs method, not to any static import.
199+ @ SuppressWarnings ("StaticImportPreferred" )
199200 public int compare (int [] left , int [] right ) {
200- int minLength = min (left .length , right .length );
201+ int minLength = Math . min (left .length , right .length );
201202 for (int i = 0 ; i < minLength ; i ++) {
202203 if (left [i ] != right [i ]) {
203204 return UnsignedInts .compare (left [i ], right [i ]);
Original file line number Diff line number Diff line change 1717import static com .google .common .base .Preconditions .checkArgument ;
1818import static com .google .common .base .Preconditions .checkNotNull ;
1919import static com .google .common .base .Preconditions .checkPositionIndexes ;
20- import static java .lang .Math .min ;
2120
2221import com .google .common .annotations .GwtCompatible ;
2322import com .google .errorprone .annotations .CanIgnoreReturnValue ;
@@ -196,8 +195,10 @@ enum LexicographicalComparator implements Comparator<int[]> {
196195 INSTANCE ;
197196
198197 @ Override
198+ // A call to bare "min" or "max" would resolve to our varargs method, not to any static import.
199+ @ SuppressWarnings ("StaticImportPreferred" )
199200 public int compare (int [] left , int [] right ) {
200- int minLength = min (left .length , right .length );
201+ int minLength = Math . min (left .length , right .length );
201202 for (int i = 0 ; i < minLength ; i ++) {
202203 if (left [i ] != right [i ]) {
203204 return UnsignedInts .compare (left [i ], right [i ]);
You can’t perform that action at this time.
0 commit comments