JCLOUDS-653: Address Guava 18 deprecations

Mostly renaming Objects.toStringHelper to MoreObjects.toStringHelper.
This commit is contained in:
Andrew Gaul 2014-08-08 11:49:42 -07:00
parent a4204a168b
commit 80d0723c15
17 changed files with 47 additions and 34 deletions

View File

@ -35,7 +35,7 @@ import org.jclouds.googlecloudstorage.domain.internal.Website;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableSet;
/**
@ -151,7 +151,7 @@ public class Bucket extends Resource {
}
protected Objects.ToStringHelper string() {
protected MoreObjects.ToStringHelper string() {
return super.string().omitNullValues().add("name", name).add("timeCreated", timeCreated)
.add("projectNumber", projectNumber).add("metageneration", metageneration).add("acl", acl)
.add("defaultObjectAcl", defaultObjectAcl).add("owner", owner).add("location", location)

View File

@ -25,6 +25,7 @@ import org.jclouds.googlecloudstorage.domain.DomainResourceRefferences.Role;
import org.jclouds.googlecloudstorage.domain.internal.ProjectTeam;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
/**
@ -94,7 +95,7 @@ public class BucketAccessControls extends Resource {
return equal(this.kind, that.kind) && equal(this.bucket, that.bucket) && equal(this.entity, that.entity);
}
protected Objects.ToStringHelper string() {
protected MoreObjects.ToStringHelper string() {
return super.string().omitNullValues().add("bucket", bucket).add("entity", entity).add("entityId", entityId)
.add("role", role).add("email", email).add("domain", domain);
}

View File

@ -25,6 +25,7 @@ import org.jclouds.googlecloudstorage.domain.DomainResourceRefferences.ObjectRol
import org.jclouds.googlecloudstorage.domain.internal.ProjectTeam;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
/**
@ -94,7 +95,7 @@ public class DefaultObjectAccessControls extends Resource {
return equal(this.kind, that.kind) && equal(this.entity, that.entity) && equal(this.role, that.role);
}
protected Objects.ToStringHelper string() {
protected MoreObjects.ToStringHelper string() {
return super.string().omitNullValues().add("bucket", bucket).add("entity", entity).add("entityId", entityId)
.add("role", role).add("email", email).add("domain", domain);
}

View File

@ -22,15 +22,15 @@ package org.jclouds.googlecloudstorage.domain;
* @see <a href= "https://developers.google.com/storage/docs/json_api/v1/bucketAccessControls/list"/>
*/
import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Objects.equal;
import static com.google.common.base.Objects.toStringHelper;
import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Set;
import org.jclouds.googlecloudstorage.domain.Resource.Kind;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableSet;
public class ListBucketAccessControls {
@ -63,7 +63,7 @@ public class ListBucketAccessControls {
}
protected Objects.ToStringHelper string() {
protected MoreObjects.ToStringHelper string() {
return toStringHelper(this).omitNullValues().add("kind", kind).add("items", items);
}

View File

@ -22,15 +22,15 @@ package org.jclouds.googlecloudstorage.domain;
* @see <a href= "https://developers.google.com/storage/docs/json_api/v1/defaultObjectAccessControls/list"/>
*/
import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Objects.equal;
import static com.google.common.base.Objects.toStringHelper;
import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Set;
import org.jclouds.googlecloudstorage.domain.Resource.Kind;
import com.google.common.base.Objects;
import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableSet;
public class ListDefaultObjectAccessControls {
@ -63,7 +63,7 @@ public class ListDefaultObjectAccessControls {
}
protected Objects.ToStringHelper string() {
protected MoreObjects.ToStringHelper string() {
return toStringHelper(this).omitNullValues().add("kind", kind).add("items", items);
}

View File

@ -16,8 +16,8 @@
*/
package org.jclouds.googlecloudstorage.domain;
import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Objects.equal;
import static com.google.common.base.Objects.toStringHelper;
import static com.google.common.base.Preconditions.checkNotNull;
import java.beans.ConstructorProperties;
@ -26,6 +26,7 @@ import java.util.Iterator;
import org.jclouds.collect.IterableWithMarker;
import org.jclouds.googlecloudstorage.domain.Resource.Kind;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.base.Optional;
import com.google.common.collect.ImmutableSet;
@ -76,7 +77,7 @@ public class ListPage<T> extends IterableWithMarker<T> {
return equal(this.kind, that.kind) && equal(this.items, that.items);
}
protected Objects.ToStringHelper string() {
protected MoreObjects.ToStringHelper string() {
return toStringHelper(this).omitNullValues().add("kind", kind).add("nextPageToken", nextPageToken)
.add("items", items);
}

View File

@ -16,9 +16,9 @@
*/
package org.jclouds.googlecloudstorage.domain;
import static com.google.common.base.Objects.ToStringHelper;
import static com.google.common.base.MoreObjects.ToStringHelper;
import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Objects.equal;
import static com.google.common.base.Objects.toStringHelper;
import static com.google.common.base.Preconditions.checkNotNull;
import java.beans.ConstructorProperties;

View File

@ -16,8 +16,9 @@
*/
package org.jclouds.googlecloudstorage.domain.internal;
import static com.google.common.base.Objects.toStringHelper;
import static com.google.common.base.MoreObjects.toStringHelper;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
/**
@ -57,7 +58,7 @@ public class Action {
return true;
}
protected Objects.ToStringHelper string() {
protected MoreObjects.ToStringHelper string() {
return toStringHelper(this).add("type", type);
}

View File

@ -16,11 +16,12 @@
*/
package org.jclouds.googlecloudstorage.domain.internal;
import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Objects.equal;
import static com.google.common.base.Objects.toStringHelper;
import java.util.Set;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableSet;
@ -76,7 +77,7 @@ public class BucketCors {
&& equal(this.responseHeader, that.responseHeader) && equal(this.maxAgeSeconds, that.maxAgeSeconds);
}
protected Objects.ToStringHelper string() {
protected MoreObjects.ToStringHelper string() {
return toStringHelper(this).omitNullValues().add("origin", origin).add("method", method).add("responseHeader", responseHeader)
.add("maxAgeSeconds", maxAgeSeconds);
}

View File

@ -16,10 +16,11 @@
*/
package org.jclouds.googlecloudstorage.domain.internal;
import static com.google.common.base.Objects.toStringHelper;
import static com.google.common.base.MoreObjects.toStringHelper;
import java.util.Set;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
import com.google.common.collect.ImmutableSet;
@ -63,7 +64,7 @@ public class BucketLifeCycle {
return true;
}
protected Objects.ToStringHelper string() {
protected MoreObjects.ToStringHelper string() {
return toStringHelper(this).add("rule", rules);
}

View File

@ -16,12 +16,13 @@
*/
package org.jclouds.googlecloudstorage.domain.internal;
import static com.google.common.base.Objects.toStringHelper;
import static com.google.common.base.MoreObjects.toStringHelper;
import java.util.Date;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
/**
@ -95,7 +96,7 @@ public class Condition {
return true;
}
protected Objects.ToStringHelper string() {
protected MoreObjects.ToStringHelper string() {
return toStringHelper(this).add("age", age).add("createdBefore", createdBefore).add("isLive", isLive)
.add("numNewerVersions", numNewerVersions);
}

View File

@ -16,10 +16,11 @@
*/
package org.jclouds.googlecloudstorage.domain.internal;
import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Objects.equal;
import static com.google.common.base.Objects.toStringHelper;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
/**
@ -62,7 +63,7 @@ public class Logging {
return equal(this.logBucket, that.logBucket) && equal(this.logObjectPrefix, that.logObjectPrefix);
}
protected Objects.ToStringHelper string() {
protected MoreObjects.ToStringHelper string() {
return toStringHelper(this).add("logBucket", logBucket).add("logObjectPrefix", logObjectPrefix);
}

View File

@ -16,12 +16,13 @@
*/
package org.jclouds.googlecloudstorage.domain.internal;
import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Objects.equal;
import static com.google.common.base.Objects.toStringHelper;
import static com.google.common.base.Preconditions.checkNotNull;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
/**
@ -60,7 +61,7 @@ public class Owner {
return equal(this.entity, that.entity);
}
protected Objects.ToStringHelper string() {
protected MoreObjects.ToStringHelper string() {
return toStringHelper(this).omitNullValues().add("entity", entity).add("entityId", entityId);
}

View File

@ -16,9 +16,10 @@
*/
package org.jclouds.googlecloudstorage.domain.internal;
import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Objects.equal;
import static com.google.common.base.Objects.toStringHelper;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
/**
@ -77,7 +78,7 @@ public final class ProjectTeam {
return equal(this.projectId, that.projectId) && equal(this.team, that.team);
}
protected Objects.ToStringHelper string() {
protected MoreObjects.ToStringHelper string() {
return toStringHelper(this).add("projectId", projectId).add("team", team);
}

View File

@ -16,9 +16,10 @@
*/
package org.jclouds.googlecloudstorage.domain.internal;
import static com.google.common.base.Objects.toStringHelper;
import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Preconditions.checkNotNull;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
/**
@ -70,7 +71,7 @@ public class Rule {
return true;
}
protected Objects.ToStringHelper string() {
protected MoreObjects.ToStringHelper string() {
return toStringHelper(this).add("condition", condition).add("action", action);
}

View File

@ -16,8 +16,9 @@
*/
package org.jclouds.googlecloudstorage.domain.internal;
import static com.google.common.base.Objects.toStringHelper;
import static com.google.common.base.MoreObjects.toStringHelper;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
/**
@ -59,7 +60,7 @@ public final class Versioning {
return true;
}
protected Objects.ToStringHelper string() {
protected MoreObjects.ToStringHelper string() {
return toStringHelper(this).add("enabled", enabled);
}

View File

@ -16,11 +16,12 @@
*/
package org.jclouds.googlecloudstorage.domain.internal;
import static com.google.common.base.MoreObjects.toStringHelper;
import static com.google.common.base.Objects.equal;
import static com.google.common.base.Objects.toStringHelper;
import org.jclouds.javax.annotation.Nullable;
import com.google.common.base.MoreObjects;
import com.google.common.base.Objects;
/**
@ -62,7 +63,7 @@ public class Website {
return equal(this.mainPageSuffix, that.mainPageSuffix);
}
protected Objects.ToStringHelper string() {
protected MoreObjects.ToStringHelper string() {
return toStringHelper(this).add("mainPageSuffix", mainPageSuffix).add("notFoundPage", notFoundPage);
}