mirror of https://github.com/apache/jclouds.git
Revert "JCLOUDS-653: Address Guava 18 deprecations"
This reverts commit e2e288ee86d537d249c7e58c782a66b0201f2134. Many conflicts on account of lots of changes since the original commit.
This commit is contained in:
parent
0c9b49baf5
commit
8f2dc52852
|
@ -35,7 +35,7 @@ import org.jclouds.googlecloudstorage.domain.internal.Website;
|
|||
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
/**
|
||||
|
@ -151,7 +151,7 @@ public class Bucket extends Resource {
|
|||
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper string() {
|
||||
protected Objects.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)
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.jclouds.googlecloudstorage.domain.DomainResourceReferences.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;
|
||||
|
||||
/**
|
||||
|
@ -96,7 +95,7 @@ public class BucketAccessControls extends Resource {
|
|||
&& equal(this.id, that.id);
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper string() {
|
||||
protected Objects.ToStringHelper string() {
|
||||
return super.string().omitNullValues().add("bucket", bucket).add("entity", entity).add("entityId", entityId)
|
||||
.add("role", role).add("email", email).add("domain", domain);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.jclouds.googlecloudstorage.domain.DomainResourceReferences.ObjectRole
|
|||
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;
|
||||
|
||||
/**
|
||||
|
@ -95,7 +94,7 @@ public class DefaultObjectAccessControls extends Resource {
|
|||
return equal(this.kind, that.kind) && equal(this.entity, that.entity) && equal(this.role, that.role);
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper string() {
|
||||
protected Objects.ToStringHelper string() {
|
||||
return super.string().omitNullValues().add("bucket", bucket).add("entity", entity).add("entityId", entityId)
|
||||
.add("role", role).add("email", email).add("domain", domain);
|
||||
}
|
||||
|
|
|
@ -27,12 +27,11 @@ import java.util.Set;
|
|||
import org.jclouds.googlecloudstorage.domain.DomainResourceReferences.StorageClass;
|
||||
import org.jclouds.googlecloudstorage.domain.internal.Owner;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.hash.HashCode;
|
||||
import com.google.common.io.BaseEncoding;
|
||||
import com.google.inject.Inject;
|
||||
|
||||
/**
|
||||
* This class represent an object in a Google Cloud Storage Bucket.
|
||||
|
@ -62,7 +61,6 @@ public class GCSObject extends Resource {
|
|||
private final String crc32c;
|
||||
private final Integer componentCount;
|
||||
|
||||
@Inject
|
||||
private GCSObject(String id, URI selfLink, String etag, String name, String bucket, Long generation,
|
||||
Long metageneration, String contentType, Date updated, Date timeDeleted, StorageClass storageClass,
|
||||
Long size, String md5Hash, URI mediaLink, Map<String, String> metadata, String contentEncoding,
|
||||
|
@ -199,7 +197,7 @@ public class GCSObject extends Resource {
|
|||
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper string() {
|
||||
protected Objects.ToStringHelper string() {
|
||||
return super.string().omitNullValues().add("name", name).add("bucket", bucket).add("generation", generation)
|
||||
.add("metageneration", metageneration).add("timeDeleted", timeDeleted).add("updated", updated)
|
||||
.add("storageClass", storageClass).add("size", size).add("md5Hash", md5Hash).add("mediaLink", mediaLink)
|
||||
|
|
|
@ -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.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
public class ListBucketAccessControls {
|
||||
|
@ -63,7 +63,7 @@ public class ListBucketAccessControls {
|
|||
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper string() {
|
||||
protected Objects.ToStringHelper string() {
|
||||
return toStringHelper(this).omitNullValues().add("kind", kind).add("items", items);
|
||||
|
||||
}
|
||||
|
|
|
@ -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.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
public class ListDefaultObjectAccessControls {
|
||||
|
@ -63,7 +63,7 @@ public class ListDefaultObjectAccessControls {
|
|||
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper string() {
|
||||
protected Objects.ToStringHelper string() {
|
||||
return toStringHelper(this).omitNullValues().add("kind", kind).add("items", items);
|
||||
|
||||
}
|
||||
|
|
|
@ -17,16 +17,16 @@
|
|||
|
||||
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.util.Set;
|
||||
|
||||
import org.jclouds.googlecloudstorage.domain.Resource.Kind;
|
||||
|
||||
import com.google.common.base.MoreObjects.ToStringHelper;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
public class ListObjectAccessControls {
|
||||
|
|
|
@ -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;
|
||||
|
@ -27,7 +27,6 @@ import java.util.Set;
|
|||
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.ImmutableList;
|
||||
|
@ -89,7 +88,7 @@ public class ListPage<T> extends IterableWithMarker<T> {
|
|||
return equal(this.kind, that.kind) && equal(this.items, that.items);
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper string() {
|
||||
protected Objects.ToStringHelper string() {
|
||||
return toStringHelper(this).omitNullValues().add("kind", kind).add("nextPageToken", nextPageToken)
|
||||
.add("items", items);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,6 @@ import org.jclouds.googlecloudstorage.domain.DomainResourceReferences.ObjectRole
|
|||
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;
|
||||
|
||||
/**
|
||||
|
@ -108,7 +107,7 @@ public class ObjectAccessControls extends Resource {
|
|||
&& equal(this.entity, that.entity) && equal(this.id , that.id);
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper string() {
|
||||
protected Objects.ToStringHelper string() {
|
||||
return super.string().omitNullValues().add("bucket", bucket).add("entity", entity).add("entityId", entityId)
|
||||
.add("object", object).add("generation", generation).add("role", role).add("email", email)
|
||||
.add("domain", domain).add("projectTeam", projectTeam);
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
*/
|
||||
package org.jclouds.googlecloudstorage.domain;
|
||||
|
||||
import static com.google.common.base.MoreObjects.ToStringHelper;
|
||||
import static com.google.common.base.MoreObjects.toStringHelper;
|
||||
import static com.google.common.base.Objects.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;
|
||||
|
|
|
@ -16,13 +16,13 @@
|
|||
*/
|
||||
package org.jclouds.googlecloudstorage.domain;
|
||||
|
||||
import static com.google.common.base.MoreObjects.toStringHelper;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
import static com.google.common.base.Objects.toStringHelper;
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.MoreObjects.ToStringHelper;
|
||||
import com.google.common.base.Objects.ToStringHelper;
|
||||
|
||||
/**
|
||||
* Represents results of resumable upload response.
|
||||
|
|
|
@ -16,9 +16,8 @@
|
|||
*/
|
||||
package org.jclouds.googlecloudstorage.domain.internal;
|
||||
|
||||
import static com.google.common.base.MoreObjects.toStringHelper;
|
||||
import static com.google.common.base.Objects.toStringHelper;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
/**
|
||||
|
@ -58,7 +57,7 @@ public class Action {
|
|||
return true;
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper string() {
|
||||
protected Objects.ToStringHelper string() {
|
||||
return toStringHelper(this).add("type", type);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,12 +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 java.util.Set;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
|
@ -77,7 +76,7 @@ public class BucketCors {
|
|||
&& equal(this.responseHeader, that.responseHeader) && equal(this.maxAgeSeconds, that.maxAgeSeconds);
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper string() {
|
||||
protected Objects.ToStringHelper string() {
|
||||
return toStringHelper(this).omitNullValues().add("origin", origin).add("method", method).add("responseHeader", responseHeader)
|
||||
.add("maxAgeSeconds", maxAgeSeconds);
|
||||
}
|
||||
|
|
|
@ -16,11 +16,10 @@
|
|||
*/
|
||||
package org.jclouds.googlecloudstorage.domain.internal;
|
||||
|
||||
import static com.google.common.base.MoreObjects.toStringHelper;
|
||||
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;
|
||||
|
||||
|
@ -64,7 +63,7 @@ public class BucketLifeCycle {
|
|||
return true;
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper string() {
|
||||
protected Objects.ToStringHelper string() {
|
||||
return toStringHelper(this).add("rule", rules);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,13 +16,12 @@
|
|||
*/
|
||||
package org.jclouds.googlecloudstorage.domain.internal;
|
||||
|
||||
import static com.google.common.base.MoreObjects.toStringHelper;
|
||||
import static com.google.common.base.Objects.toStringHelper;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.jclouds.javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
/**
|
||||
|
@ -96,7 +95,7 @@ public class Condition {
|
|||
return true;
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper string() {
|
||||
protected Objects.ToStringHelper string() {
|
||||
return toStringHelper(this).add("age", age).add("createdBefore", createdBefore).add("isLive", isLive)
|
||||
.add("numNewerVersions", numNewerVersions);
|
||||
}
|
||||
|
|
|
@ -16,11 +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 static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
/**
|
||||
|
@ -63,7 +62,7 @@ public class Logging {
|
|||
return equal(this.logBucket, that.logBucket) && equal(this.logObjectPrefix, that.logObjectPrefix);
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper string() {
|
||||
protected Objects.ToStringHelper string() {
|
||||
return toStringHelper(this).add("logBucket", logBucket).add("logObjectPrefix", logObjectPrefix);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,13 +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 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;
|
||||
|
||||
/**
|
||||
|
@ -61,7 +60,7 @@ public class Owner {
|
|||
return equal(this.entity, that.entity);
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper string() {
|
||||
protected Objects.ToStringHelper string() {
|
||||
return toStringHelper(this).omitNullValues().add("entity", entity).add("entityId", entityId);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,10 +16,9 @@
|
|||
*/
|
||||
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;
|
||||
|
||||
/**
|
||||
|
@ -78,7 +77,7 @@ public final class ProjectTeam {
|
|||
return equal(this.projectNumber, that.projectNumber) && equal(this.team, that.team);
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper string() {
|
||||
protected Objects.ToStringHelper string() {
|
||||
return toStringHelper(this).add("projectNumber", projectNumber).add("team", team);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,10 +16,9 @@
|
|||
*/
|
||||
package org.jclouds.googlecloudstorage.domain.internal;
|
||||
|
||||
import static com.google.common.base.MoreObjects.toStringHelper;
|
||||
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;
|
||||
|
||||
/**
|
||||
|
@ -71,7 +70,7 @@ public class Rule {
|
|||
return true;
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper string() {
|
||||
protected Objects.ToStringHelper string() {
|
||||
return toStringHelper(this).add("condition", condition).add("action", action);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,9 +16,8 @@
|
|||
*/
|
||||
package org.jclouds.googlecloudstorage.domain.internal;
|
||||
|
||||
import static com.google.common.base.MoreObjects.toStringHelper;
|
||||
import static com.google.common.base.Objects.toStringHelper;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
/**
|
||||
|
@ -60,7 +59,7 @@ public final class Versioning {
|
|||
return true;
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper string() {
|
||||
protected Objects.ToStringHelper string() {
|
||||
return toStringHelper(this).add("enabled", enabled);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,12 +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 org.jclouds.javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
/**
|
||||
|
@ -63,7 +62,7 @@ public class Website {
|
|||
return equal(this.mainPageSuffix, that.mainPageSuffix);
|
||||
}
|
||||
|
||||
protected MoreObjects.ToStringHelper string() {
|
||||
protected Objects.ToStringHelper string() {
|
||||
return toStringHelper(this).add("mainPageSuffix", mainPageSuffix).add("notFoundPage", notFoundPage);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue