Objects deprecated, use MoreObjects.
This commit is contained in:
@@ -38,7 +38,8 @@ import java.util.Map;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import com.google.common.base.Defaults;
|
import com.google.common.base.Defaults;
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.MoreObjects.ToStringHelper;
|
||||||
|
import com.google.common.base.MoreObjects;
|
||||||
import com.google.common.base.Predicate;
|
import com.google.common.base.Predicate;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.Iterables;
|
import com.google.common.collect.Iterables;
|
||||||
@@ -209,10 +210,10 @@ public abstract class Streamer
|
|||||||
/**
|
/**
|
||||||
* Overrideable to add more information to this class' toString() representation.
|
* Overrideable to add more information to this class' toString() representation.
|
||||||
*/
|
*/
|
||||||
protected Objects.ToStringHelper toStringHelper ()
|
protected ToStringHelper toStringHelper ()
|
||||||
{
|
{
|
||||||
// no extra details in the base class
|
// no extra details in the base class
|
||||||
return Objects.toStringHelper(this);
|
return MoreObjects.toStringHelper(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -487,7 +488,7 @@ public abstract class Streamer
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Objects.ToStringHelper toStringHelper ()
|
protected ToStringHelper toStringHelper ()
|
||||||
{
|
{
|
||||||
return super.toStringHelper()
|
return super.toStringHelper()
|
||||||
.add("target", _target.getName())
|
.add("target", _target.getName())
|
||||||
@@ -609,7 +610,7 @@ public abstract class Streamer
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Objects.ToStringHelper toStringHelper ()
|
protected ToStringHelper toStringHelper ()
|
||||||
{
|
{
|
||||||
return super.toStringHelper()
|
return super.toStringHelper()
|
||||||
.add("reader", _reader)
|
.add("reader", _reader)
|
||||||
@@ -673,7 +674,7 @@ public abstract class Streamer
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Objects.ToStringHelper toStringHelper ()
|
protected ToStringHelper toStringHelper ()
|
||||||
{
|
{
|
||||||
return super.toStringHelper()
|
return super.toStringHelper()
|
||||||
.add("componentType", _componentType.getName());
|
.add("componentType", _componentType.getName());
|
||||||
@@ -748,7 +749,7 @@ public abstract class Streamer
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Objects.ToStringHelper toStringHelper ()
|
protected ToStringHelper toStringHelper ()
|
||||||
{
|
{
|
||||||
return super.toStringHelper()
|
return super.toStringHelper()
|
||||||
.add("delegate", _delegate);
|
.add("delegate", _delegate);
|
||||||
@@ -779,7 +780,7 @@ public abstract class Streamer
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Objects.ToStringHelper toStringHelper ()
|
public ToStringHelper toStringHelper ()
|
||||||
{
|
{
|
||||||
return super.toStringHelper()
|
return super.toStringHelper()
|
||||||
.add("eclass", _eclass.getName());
|
.add("eclass", _eclass.getName());
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
package com.threerings.util;
|
package com.threerings.util;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
import com.google.common.base.Objects;
|
import com.google.common.base.MoreObjects;
|
||||||
|
|
||||||
import com.samskivert.util.ArrayUtil;
|
import com.samskivert.util.ArrayUtil;
|
||||||
import com.samskivert.util.IntResultListener;
|
import com.samskivert.util.IntResultListener;
|
||||||
@@ -219,7 +219,7 @@ public class Resulting<T> extends Invoker.Unit
|
|||||||
: InvocationCodes.INTERNAL_ERROR);
|
: InvocationCodes.INTERNAL_ERROR);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Object[] logArgs = Objects.firstNonNull(_logArgs, ArrayUtil.EMPTY_OBJECT);
|
Object[] logArgs = MoreObjects.firstNonNull(_logArgs, ArrayUtil.EMPTY_OBJECT);
|
||||||
Object[] args;
|
Object[] args;
|
||||||
if (cause instanceof InvocationException) {
|
if (cause instanceof InvocationException) {
|
||||||
args = new Object[logArgs.length + 4];
|
args = new Object[logArgs.length + 4];
|
||||||
@@ -233,7 +233,7 @@ public class Resulting<T> extends Invoker.Unit
|
|||||||
args[0] = "Resulting";
|
args[0] = "Resulting";
|
||||||
args[1] = this;
|
args[1] = this;
|
||||||
System.arraycopy(logArgs, 0, args, 2, logArgs.length);
|
System.arraycopy(logArgs, 0, args, 2, logArgs.length);
|
||||||
Objects.firstNonNull(_log, log).warning("Request failed", args);
|
MoreObjects.firstNonNull(_log, log).warning("Request failed", args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user