mirror of
https://github.com/apache/jclouds.git
synced 2025-03-02 14:29:05 +00:00
JCLOUDS-653: Address Guava 18 deprecations
Mostly renaming Objects.toStringHelper to MoreObjects.toStringHelper.
This commit is contained in:
parent
e20afb8e99
commit
a0a165eaa3
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package org.jclouds.docker.compute.options;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
@ -109,7 +110,7 @@ public class DockerTemplateOptions extends TemplateOptions implements Cloneable
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper(this)
|
||||
return MoreObjects.toStringHelper(this)
|
||||
.add("dns", dns)
|
||||
.add("hostname", hostname)
|
||||
.add("memory", memory)
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package org.jclouds.docker.domain;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
@ -245,7 +246,7 @@ public class Config {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper(this)
|
||||
return MoreObjects.toStringHelper(this)
|
||||
.add("hostname", hostname)
|
||||
.add("domainName", domainName)
|
||||
.add("user", user)
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package org.jclouds.docker.domain;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
@ -210,7 +211,7 @@ public class Container {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper(this)
|
||||
return MoreObjects.toStringHelper(this)
|
||||
.add("id", id)
|
||||
.add("name", name)
|
||||
.add("created", created)
|
||||
|
@ -22,6 +22,7 @@ import java.util.Set;
|
||||
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
@ -65,7 +66,7 @@ public class ExposedPorts {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper(this)
|
||||
return MoreObjects.toStringHelper(this)
|
||||
.add("portAndProtocol", portAndProtocol)
|
||||
.add("hostPorts", hostPorts)
|
||||
.toString();
|
||||
|
@ -23,6 +23,7 @@ import java.util.Map;
|
||||
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
@ -135,7 +136,7 @@ public class HostConfig {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper(this)
|
||||
return MoreObjects.toStringHelper(this)
|
||||
.add("containerIDFile", containerIDFile)
|
||||
.add("binds", binds)
|
||||
.add("lxcConf", lxcConf)
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package org.jclouds.docker.domain;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
@ -132,7 +133,7 @@ public class Image {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper(this)
|
||||
return MoreObjects.toStringHelper(this)
|
||||
.add("id", id)
|
||||
.add("parent", parent)
|
||||
.add("created", created)
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package org.jclouds.docker.domain;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
@ -99,7 +100,7 @@ public class NetworkSettings {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper(this)
|
||||
return MoreObjects.toStringHelper(this)
|
||||
.add("ipAddress", ipAddress)
|
||||
.add("ipPrefixLen", ipPrefixLen)
|
||||
.add("gateway", gateway)
|
||||
|
@ -16,6 +16,7 @@
|
||||
*/
|
||||
package org.jclouds.docker.domain;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
@ -78,7 +79,7 @@ public class Port {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper(this)
|
||||
return MoreObjects.toStringHelper(this)
|
||||
.add("privatePort", privatePort)
|
||||
.add("publicPort", publicPort)
|
||||
.add("type", type)
|
||||
|
@ -19,6 +19,7 @@ package org.jclouds.docker.domain;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import java.beans.ConstructorProperties;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
@ -92,7 +93,7 @@ public class State {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper(this)
|
||||
return MoreObjects.toStringHelper(this)
|
||||
.add("pid", pid)
|
||||
.add("running", running)
|
||||
.add("exitCode", exitCode)
|
||||
|
@ -19,6 +19,7 @@ package org.jclouds.docker.domain;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import java.beans.ConstructorProperties;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
@ -92,7 +93,7 @@ public class Version {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Objects.toStringHelper(this)
|
||||
return MoreObjects.toStringHelper(this)
|
||||
.add("arch", arch)
|
||||
.add("gitCommit", gitCommit)
|
||||
.add("goVersion", goVersion)
|
||||
|
@ -16,7 +16,7 @@
|
||||
*/
|
||||
package org.jclouds.docker.internal;
|
||||
|
||||
import static com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor;
|
||||
import static com.google.common.util.concurrent.MoreExecutors.newDirectExecutorService;
|
||||
import static org.jclouds.http.utils.Queries.encodeQueryLine;
|
||||
import static org.jclouds.util.Strings2.toStringAndClose;
|
||||
import static org.testng.Assert.assertEquals;
|
||||
@ -45,8 +45,8 @@ import com.squareup.okhttp.mockwebserver.RecordedRequest;
|
||||
* Base class for all Docker mock tests.
|
||||
*/
|
||||
public class BaseDockerMockTest {
|
||||
private final Set<Module> modules = ImmutableSet.<Module> of(new ExecutorServiceModule(sameThreadExecutor(),
|
||||
sameThreadExecutor()));
|
||||
private final Set<Module> modules = ImmutableSet.<Module> of(new ExecutorServiceModule(newDirectExecutorService(),
|
||||
newDirectExecutorService()));
|
||||
|
||||
protected String provider;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user