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 1818import static com .google .common .base .Preconditions .checkElementIndex ;
1919import static com .google .common .base .Preconditions .checkNotNull ;
2020import static com .google .common .base .Preconditions .checkPositionIndexes ;
21- import static java .lang .Math .min ;
2221
2322import com .google .common .annotations .GwtCompatible ;
2423import com .google .common .annotations .GwtIncompatible ;
@@ -321,7 +320,9 @@ private enum LexicographicalComparator implements Comparator<boolean[]> {
321320
322321 @ Override
323322 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 );
325326 for (int i = 0 ; i < minLength ; i ++) {
326327 int result = Boolean .compare (left [i ], right [i ]);
327328 if (result != 0 ) {
Original file line number Diff line number Diff line change 1818import static com .google .common .base .Preconditions .checkElementIndex ;
1919import static com .google .common .base .Preconditions .checkNotNull ;
2020import static com .google .common .base .Preconditions .checkPositionIndexes ;
21- import static java .lang .Math .min ;
2221
2322import com .google .common .annotations .GwtCompatible ;
2423import com .google .common .annotations .GwtIncompatible ;
@@ -321,7 +320,9 @@ private enum LexicographicalComparator implements Comparator<boolean[]> {
321320
322321 @ Override
323322 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 );
325326 for (int i = 0 ; i < minLength ; i ++) {
326327 int result = Boolean .compare (left [i ], right [i ]);
327328 if (result != 0 ) {
You can’t perform that action at this time.
0 commit comments