Format some imports using fix_imports.py

Unfortunately this tool isn't smart enough to deal with the assertThat
situation (which has two static imports of a function with the same name).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=172000753
This commit is contained in:
mcilwain 2017-10-12 13:09:59 -07:00 committed by jianglai
parent 326cf698e0
commit 05f6ad80ab
20 changed files with 35 additions and 49 deletions

View file

@ -14,7 +14,6 @@
package google.registry.bigquery; package google.registry.bigquery;
import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.collect.Sets.newConcurrentHashSet; import static com.google.common.collect.Sets.newConcurrentHashSet;
import static google.registry.util.FormattingLogger.getLoggerForCallerClass; import static google.registry.util.FormattingLogger.getLoggerForCallerClass;

View file

@ -18,33 +18,35 @@ import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import javax.annotation.Nullable; import javax.annotation.Nullable;
/** /**
* AutoValue class describing an RDAP Notice object. * AutoValue class describing an RDAP Notice object.
* *
* <p>This is used for injecting RDAP help pages. * <p>This is used for injecting RDAP help pages.
*/ */
@AutoValue @AutoValue
public abstract class RdapNoticeDescriptor { public abstract class RdapNoticeDescriptor {
public static Builder builder() {
return new AutoValue_RdapNoticeDescriptor.Builder();
}
@Nullable public abstract String getTitle(); public static Builder builder() {
public abstract ImmutableList<String> getDescription(); return new AutoValue_RdapNoticeDescriptor.Builder();
@Nullable public abstract String getTypeString();
@Nullable public abstract String getLinkValueSuffix();
@Nullable public abstract String getLinkHrefUrlString();
/** Builder class for {@link RdapNoticeDescriptor}. */
@AutoValue.Builder
public abstract static class Builder {
public abstract Builder setTitle(@Nullable String title);
public abstract Builder setDescription(Iterable<String> description);
public abstract Builder setTypeString(@Nullable String typeString);
public abstract Builder setLinkValueSuffix(@Nullable String linkValueSuffix);
public abstract Builder setLinkHrefUrlString(@Nullable String linkHrefUrlString);
public abstract RdapNoticeDescriptor build();
}
} }
@Nullable public abstract String getTitle();
public abstract ImmutableList<String> getDescription();
@Nullable public abstract String getTypeString();
@Nullable public abstract String getLinkValueSuffix();
@Nullable public abstract String getLinkHrefUrlString();
/** Builder class for {@link RdapNoticeDescriptor}. */
@AutoValue.Builder
public abstract static class Builder {
public abstract Builder setTitle(@Nullable String title);
public abstract Builder setDescription(Iterable<String> description);
public abstract Builder setTypeString(@Nullable String typeString);
public abstract Builder setLinkValueSuffix(@Nullable String linkValueSuffix);
public abstract Builder setLinkHrefUrlString(@Nullable String linkHrefUrlString);
public abstract RdapNoticeDescriptor build();
}
}

View file

@ -16,19 +16,15 @@ package google.registry.keyring.api;
import com.google.common.annotations.VisibleForTesting; import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.MoreObjects; import com.google.common.base.MoreObjects;
import google.registry.util.ComparingInvocationHandler; import google.registry.util.ComparingInvocationHandler;
import google.registry.util.FormattingLogger; import google.registry.util.FormattingLogger;
import java.io.IOException; import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.StringWriter; import java.io.StringWriter;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.Arrays; import java.util.Arrays;
import java.util.Objects; import java.util.Objects;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import org.bouncycastle.bcpg.BCPGKey; import org.bouncycastle.bcpg.BCPGKey;
import org.bouncycastle.bcpg.PublicKeyPacket; import org.bouncycastle.bcpg.PublicKeyPacket;
import org.bouncycastle.openpgp.PGPKeyPair; import org.bouncycastle.openpgp.PGPKeyPair;

View file

@ -13,6 +13,7 @@
// limitations under the License. // limitations under the License.
package google.registry.keyring.api; package google.registry.keyring.api;
import static com.google.common.io.Resources.getResource; import static com.google.common.io.Resources.getResource;
import static google.registry.keyring.api.PgpHelper.KeyRequirement.ENCRYPT_SIGN; import static google.registry.keyring.api.PgpHelper.KeyRequirement.ENCRYPT_SIGN;
import static google.registry.keyring.api.PgpHelper.lookupKeyPair; import static google.registry.keyring.api.PgpHelper.lookupKeyPair;

View file

@ -43,14 +43,11 @@ import google.registry.keyring.kms.KmsKeyring.PublicKeyLabel;
import google.registry.keyring.kms.KmsKeyring.StringKeyLabel; import google.registry.keyring.kms.KmsKeyring.StringKeyLabel;
import google.registry.model.server.KmsSecret; import google.registry.model.server.KmsSecret;
import google.registry.model.server.KmsSecretRevision; import google.registry.model.server.KmsSecretRevision;
import java.io.IOException; import java.io.IOException;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import javax.inject.Inject; import javax.inject.Inject;
import org.bouncycastle.openpgp.PGPException; import org.bouncycastle.openpgp.PGPException;
import org.bouncycastle.openpgp.PGPKeyPair; import org.bouncycastle.openpgp.PGPKeyPair;
import org.bouncycastle.openpgp.PGPPublicKey; import org.bouncycastle.openpgp.PGPPublicKey;

View file

@ -28,7 +28,6 @@ import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.joda.time.DateTime; import org.joda.time.DateTime;
/** The {@link ResponseData} returned for an EPP info flow on a contact. */ /** The {@link ResponseData} returned for an EPP info flow on a contact. */
@XmlRootElement(name = "infData") @XmlRootElement(name = "infData")
@XmlType(propOrder = { @XmlType(propOrder = {

View file

@ -14,7 +14,6 @@
package google.registry.model.domain; package google.registry.model.domain;
import com.googlecode.objectify.annotation.Embed; import com.googlecode.objectify.annotation.Embed;
import google.registry.model.ImmutableObject; import google.registry.model.ImmutableObject;
import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlAttribute;

View file

@ -24,4 +24,3 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlNs; import javax.xml.bind.annotation.XmlNs;
import javax.xml.bind.annotation.XmlNsForm; import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.bind.annotation.XmlSchema; import javax.xml.bind.annotation.XmlSchema;

View file

@ -24,4 +24,3 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlNs; import javax.xml.bind.annotation.XmlNs;
import javax.xml.bind.annotation.XmlNsForm; import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.bind.annotation.XmlSchema; import javax.xml.bind.annotation.XmlSchema;

View file

@ -24,4 +24,3 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlNs; import javax.xml.bind.annotation.XmlNs;
import javax.xml.bind.annotation.XmlNsForm; import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.bind.annotation.XmlSchema; import javax.xml.bind.annotation.XmlSchema;

View file

@ -24,4 +24,3 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlNs; import javax.xml.bind.annotation.XmlNs;
import javax.xml.bind.annotation.XmlNsForm; import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.bind.annotation.XmlSchema; import javax.xml.bind.annotation.XmlSchema;

View file

@ -26,7 +26,6 @@ import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import org.joda.time.DateTime; import org.joda.time.DateTime;
/** The {@link ResponseData} returned for an EPP info flow on a host. */ /** The {@link ResponseData} returned for an EPP info flow on a host. */
@XmlRootElement(name = "infData") @XmlRootElement(name = "infData")
@XmlType(propOrder = { @XmlType(propOrder = {

View file

@ -14,7 +14,6 @@
package google.registry.model.ofy; package google.registry.model.ofy;
import java.io.IOException; import java.io.IOException;
import javax.servlet.Filter; import javax.servlet.Filter;
import javax.servlet.FilterChain; import javax.servlet.FilterChain;

View file

@ -14,7 +14,6 @@
package google.registry.model.poll; package google.registry.model.poll;
import com.google.common.annotations.VisibleForTesting; import com.google.common.annotations.VisibleForTesting;
import com.googlecode.objectify.annotation.Embed; import com.googlecode.objectify.annotation.Embed;
import google.registry.model.ImmutableObject; import google.registry.model.ImmutableObject;

View file

@ -14,7 +14,6 @@
package google.registry.monitoring.metrics; package google.registry.monitoring.metrics;
import com.google.common.base.MoreObjects; import com.google.common.base.MoreObjects;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import google.registry.monitoring.metrics.MetricSchema.Kind; import google.registry.monitoring.metrics.MetricSchema.Kind;

View file

@ -14,7 +14,6 @@
package google.registry.monitoring.metrics; package google.registry.monitoring.metrics;
import com.google.common.annotations.VisibleForTesting; import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableList.Builder; import com.google.common.collect.ImmutableList.Builder;

View file

@ -18,7 +18,6 @@ import com.google.auto.value.AutoValue;
import google.registry.model.common.Cursor.CursorType; import google.registry.model.common.Cursor.CursorType;
import google.registry.model.rde.RdeMode; import google.registry.model.rde.RdeMode;
import java.io.Serializable; import java.io.Serializable;
import java.util.Optional;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.Duration; import org.joda.time.Duration;

View file

@ -13,6 +13,7 @@
// limitations under the License. // limitations under the License.
package google.registry.flows.host; package google.registry.flows.host;
import static google.registry.testing.DatastoreHelper.assertNoBillingEvents; import static google.registry.testing.DatastoreHelper.assertNoBillingEvents;
import static google.registry.testing.DatastoreHelper.createTld; import static google.registry.testing.DatastoreHelper.createTld;
import static google.registry.testing.DatastoreHelper.newDomainApplication; import static google.registry.testing.DatastoreHelper.newDomainApplication;

View file

@ -14,7 +14,6 @@
package google.registry.flows.session; package google.registry.flows.session;
import static google.registry.testing.DatastoreHelper.loadRegistrar; import static google.registry.testing.DatastoreHelper.loadRegistrar;
import static google.registry.testing.DatastoreHelper.persistResource; import static google.registry.testing.DatastoreHelper.persistResource;

View file

@ -15,6 +15,7 @@
package google.registry.tools; package google.registry.tools;
import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkArgument;
import google.registry.tools.LevelDbLogReader.ChunkType; import google.registry.tools.LevelDbLogReader.ChunkType;
class LevelDbUtil { class LevelDbUtil {
@ -73,7 +74,9 @@ class LevelDbUtil {
*/ */
static int addRecord(byte[] bytes, int pos, ChunkType type, byte[] data) { static int addRecord(byte[] bytes, int pos, ChunkType type, byte[] data) {
checkArgument( checkArgument(
data.length < MAX_RECORD, "Record length (%d) > max record size (%d)", data.length, data.length < MAX_RECORD,
"Record length (%s) > max record size (%s)",
data.length,
MAX_RECORD); MAX_RECORD);
pos = addRecordHeader(bytes, pos, type, data.length); pos = addRecordHeader(bytes, pos, type, data.length);