Skip to content

Commit fad5c0a

Browse files
committed
linting changes
1 parent 2470206 commit fad5c0a

File tree

3 files changed

+45
-13
lines changed

3 files changed

+45
-13
lines changed

google-cloud-spanner/clirr-ignored-differences.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,29 @@
3535
<className>com/google/cloud/spanner/connection/ConnectionOptions</className>
3636
<method>com.google.cloud.spanner.Dialect getDialect()</method>
3737
</difference>
38+
<difference>
39+
<differenceType>7013</differenceType>
40+
<className>com/google/cloud/spanner/BackupInfo$Builder</className>
41+
<method>com.google.cloud.spanner.BackupInfo$Builder setMaxExpireTime(com.google.cloud.Timestamp)</method>
42+
</difference>
43+
<difference>
44+
<differenceType>7013</differenceType>
45+
<className>com/google/cloud/spanner/BackupInfo$Builder</className>
46+
<method>com.google.cloud.spanner.BackupInfo$Builder setReferencingBackup(com.google.protobuf.ProtocolStringList)</method>
47+
</difference>
48+
<difference>
49+
<differenceType>7012</differenceType>
50+
<className>com/google/cloud/spanner/DatabaseAdminClient</className>
51+
<method>com.google.api.gax.longrunning.OperationFuture copyBackup(java.lang.String, java.lang.String, java.lang.String, com.google.cloud.Timestamp)</method>
52+
</difference>
53+
<difference>
54+
<differenceType>7012</differenceType>
55+
<className>com/google/cloud/spanner/DatabaseAdminClient</className>
56+
<method>com.google.api.gax.longrunning.OperationFuture copyBackup(com.google.cloud.spanner.BackupId, com.google.cloud.spanner.Backup)</method>
57+
</difference>
58+
<difference>
59+
<differenceType>7012</differenceType>
60+
<className>com/google/cloud/spanner/spi/v1/SpannerRpc</className>
61+
<method>com.google.api.gax.longrunning.OperationFuture copyBackUp(com.google.cloud.spanner.BackupId, com.google.cloud.spanner.Backup)</method>
62+
</difference>
3863
</differences>

google-cloud-spanner/src/main/java/com/google/cloud/spanner/Backup.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package com.google.cloud.spanner;
1818

19+
import static com.google.common.base.Preconditions.checkArgument;
20+
1921
import com.google.api.client.util.Preconditions;
2022
import com.google.api.gax.longrunning.OperationFuture;
2123
import com.google.api.gax.paging.Page;
@@ -26,8 +28,6 @@
2628
import com.google.spanner.admin.database.v1.CreateBackupMetadata;
2729
import com.google.spanner.admin.database.v1.RestoreDatabaseMetadata;
2830

29-
import static com.google.common.base.Preconditions.checkArgument;
30-
3131
/**
3232
* Represents a Cloud Spanner database backup. {@code Backup} adds a layer of service related
3333
* functionality over {@code BackupInfo}.
@@ -177,7 +177,7 @@ static Backup fromProto(
177177
checkArgument(!proto.getDatabase().isEmpty(), "Missing expected 'database' field");
178178
return new Backup.Builder(client, BackupId.of(proto.getName()))
179179
.setState(fromProtoState(proto.getState()))
180-
.setSize(proto.getSiprotected abstract Builder setMaxExpireTime(Timestamp maxExpireTime);zeBytes())
180+
.setSize(proto.getSizeBytes())
181181
.setExpireTime(Timestamp.fromProto(proto.getExpireTime()))
182182
.setVersionTime(Timestamp.fromProto(proto.getVersionTime()))
183183
.setDatabase(DatabaseId.of(proto.getDatabase()))

google-cloud-spanner/src/main/java/com/google/cloud/spanner/BackupInfo.java

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222
import com.google.cloud.spanner.encryption.EncryptionInfo;
2323
import com.google.protobuf.ProtocolStringList;
2424
import com.google.spanner.admin.database.v1.Database;
25-
26-
import javax.annotation.Nullable;
2725
import java.util.Objects;
26+
import javax.annotation.Nullable;
2827

2928
/** Represents a Cloud Spanner database backup. */
3029
public class BackupInfo {
@@ -90,16 +89,14 @@ public abstract static class Builder {
9089
/**
9190
* Output Only.
9291
*
93-
* <p>Returns the max allowed expiration time of the backup, with
94-
* microseconds granularity.
92+
* <p>Returns the max allowed expiration time of the backup, with microseconds granularity.
9593
*/
9694
protected abstract Builder setMaxExpireTime(Timestamp maxExpireTime);
9795

9896
/**
9997
* Output Only.
10098
*
101-
* <p>Returns the names of the destination backups being created by copying
102-
* this source backup.
99+
* <p>Returns the names of the destination backups being created by copying this source backup.
103100
*/
104101
protected abstract Builder setReferencingBackup(ProtocolStringList referencingBackup);
105102
}
@@ -192,7 +189,6 @@ public Builder setMaxExpireTime(Timestamp maxExpireTime) {
192189
return this;
193190
}
194191

195-
196192
@Override
197193
public Builder setReferencingBackup(ProtocolStringList referencingBackup) {
198194
this.referencingBackup = Preconditions.checkNotNull(referencingBackup);
@@ -297,8 +293,10 @@ public Timestamp getMaxExpireTime() {
297293
return maxExpireTime;
298294
}
299295

300-
/** Returns the names of the destination backups being created by copying
301-
* this source backup {@link Backup}. */
296+
/**
297+
* Returns the names of the destination backups being created by copying this source backup {@link
298+
* Backup}.
299+
*/
302300
public ProtocolStringList getReferencingBackup() {
303301
return referencingBackup;
304302
}
@@ -327,7 +325,16 @@ public boolean equals(Object o) {
327325
@Override
328326
public int hashCode() {
329327
return Objects.hash(
330-
id, state, size, encryptionConfig, encryptionInfo, expireTime, versionTime, database, maxExpireTime, referencingBackup);
328+
id,
329+
state,
330+
size,
331+
encryptionConfig,
332+
encryptionInfo,
333+
expireTime,
334+
versionTime,
335+
database,
336+
maxExpireTime,
337+
referencingBackup);
331338
}
332339

333340
@Override

0 commit comments

Comments
 (0)