mirror of https://github.com/grpc/grpc-java.git
Avoid MoreObjects for "old guava" compatibility
Some early grpc users on Android are using a very old Guava. They are working on upgrading, but it will take time. This alone is not enough for "old guava" compilibility; expect more to come.
This commit is contained in:
parent
44574944b9
commit
e26608fe91
|
|
@ -15,7 +15,7 @@ subprojects {
|
|||
}
|
||||
|
||||
compileJava {
|
||||
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
|
||||
options.compilerArgs << "-Xlint:unchecked"
|
||||
}
|
||||
|
||||
// External dependency management
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
package io.grpc;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.base.Throwables;
|
||||
|
|
@ -376,7 +375,7 @@ public final class Status {
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
return MoreObjects.toStringHelper(this)
|
||||
return Objects.toStringHelper(this)
|
||||
.add("code", code.name())
|
||||
.add("description", description)
|
||||
.add("cause", cause)
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
package io.grpc.transport;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import io.grpc.Metadata;
|
||||
|
|
@ -272,8 +272,8 @@ public abstract class AbstractClientStream<IdT> extends AbstractStream<IdT>
|
|||
protected abstract void sendCancel();
|
||||
|
||||
@Override
|
||||
protected MoreObjects.ToStringHelper toStringHelper() {
|
||||
MoreObjects.ToStringHelper toStringHelper = super.toStringHelper();
|
||||
protected Objects.ToStringHelper toStringHelper() {
|
||||
Objects.ToStringHelper toStringHelper = super.toStringHelper();
|
||||
if (status != null) {
|
||||
toStringHelper.add("status", status);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
package io.grpc.transport;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
|
@ -295,8 +295,8 @@ public abstract class AbstractStream<IdT> implements Stream {
|
|||
return toStringHelper().toString();
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper toStringHelper() {
|
||||
return MoreObjects.toStringHelper(this)
|
||||
protected Objects.ToStringHelper toStringHelper() {
|
||||
return Objects.toStringHelper(this)
|
||||
.add("id", id())
|
||||
.add("inboundPhase", inboundPhase().name())
|
||||
.add("outboundPhase", outboundPhase().name());
|
||||
|
|
|
|||
Loading…
Reference in New Issue