Skip to content

Commit

Permalink
Revert some usages of advanced APIs to preserve compatibility with ja…
Browse files Browse the repository at this point in the history
…va 1.6.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=109833207
  • Loading branch information
cgruber committed Dec 9, 2015
1 parent f04d622 commit 5fa1f3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
*/
package com.google.common.truth;

import com.google.common.base.Objects;

import java.util.Arrays;
import java.util.List;
import java.util.Objects;

import javax.annotation.Nullable;

Expand Down Expand Up @@ -84,7 +85,7 @@ public void isEqualTo(Object expected) {
expectedArray.length);
} else {
for (int i = 0; i < actual.length; i++) {
if (!Objects.equals(actual[i], expectedArray[i])) {
if (!Objects.equal(actual[i], expectedArray[i])) {
failWithBadResults("is equal to", Arrays.asList(expectedArray), "differs at index", i);
}
}
Expand Down
3 changes: 2 additions & 1 deletion core/src/test/java/com/google/common/truth/IterableTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import com.google.common.primitives.Ints;

import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down Expand Up @@ -906,7 +907,7 @@ private Bar(int x) {
new Comparator<Foo>() {
@Override
public int compare(Foo a, Foo b) {
return Integer.compare(a.x, b.x);
return Ints.compare(a.x, b.x);
}
};

Expand Down

0 comments on commit 5fa1f3c

Please sign in to comment.