Skip to content

Commit fc1d0ed

Browse files
committed
Add missing final, fix codacy issues
1 parent d86ede9 commit fc1d0ed

File tree

8 files changed

+13
-14
lines changed

8 files changed

+13
-14
lines changed

gcloud-java-compute/src/main/java/com/google/gcloud/compute/Address.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ public final int hashCode() {
172172
return Objects.hash(super.hashCode(), options);
173173
}
174174

175-
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
176-
in.defaultReadObject();
175+
private void readObject(ObjectInputStream input) throws IOException, ClassNotFoundException {
176+
input.defaultReadObject();
177177
this.compute = options.service();
178178
}
179179

gcloud-java-compute/src/main/java/com/google/gcloud/compute/Compute.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,7 @@ public static SnapshotListOption fields(SnapshotField... fields) {
16681668
Snapshot getSnapshot(String snapshot, SnapshotOption... options);
16691669

16701670
/**
1671-
* Lists all snapshots.
1671+
* Lists snapshots.
16721672
*
16731673
* @throws ComputeException upon failure
16741674
*/

gcloud-java-compute/src/main/java/com/google/gcloud/compute/ComputeImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,6 @@ public Snapshot apply(com.google.api.services.compute.model.Snapshot snapshot) {
10071007
@Override
10081008
public Operation deleteSnapshot(SnapshotId snapshot, OperationOption... options) {
10091009
return deleteSnapshot(snapshot.snapshot(), options);
1010-
10111010
}
10121011

10131012
@Override

gcloud-java-compute/src/main/java/com/google/gcloud/compute/Operation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,8 +792,8 @@ com.google.api.services.compute.model.Operation toPb() {
792792
return operationPb;
793793
}
794794

795-
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
796-
in.defaultReadObject();
795+
private void readObject(ObjectInputStream input) throws IOException, ClassNotFoundException {
796+
input.defaultReadObject();
797797
this.compute = options.service();
798798
}
799799

gcloud-java-compute/src/main/java/com/google/gcloud/compute/Snapshot.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ public final int hashCode() {
199199
return Objects.hash(super.hashCode(), options);
200200
}
201201

202-
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
203-
in.defaultReadObject();
202+
private void readObject(ObjectInputStream input) throws IOException, ClassNotFoundException {
203+
input.defaultReadObject();
204204
this.compute = options.service();
205205
}
206206

gcloud-java-compute/src/test/java/com/google/gcloud/compute/AddressTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ public class AddressTest {
5757
private static final AddressInfo.RegionForwardingUsage REGION_FORWARDING_USAGE =
5858
new AddressInfo.RegionForwardingUsage(REGION_FORWARDING_RULES);
5959

60-
private Compute serviceMockReturnsOptions = createStrictMock(Compute.class);
61-
private ComputeOptions mockOptions = createMock(ComputeOptions.class);
60+
private final Compute serviceMockReturnsOptions = createStrictMock(Compute.class);
61+
private final ComputeOptions mockOptions = createMock(ComputeOptions.class);
6262
private Compute compute;
6363
private Address globalForwardingAddress;
6464
private Address instanceAddress;

gcloud-java-compute/src/test/java/com/google/gcloud/compute/OperationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ public class OperationTest {
7676
private static final RegionOperationId REGION_OPERATION_ID =
7777
RegionOperationId.of("project", "region", "op");
7878

79-
private Compute serviceMockReturnsOptions = createStrictMock(Compute.class);
80-
private ComputeOptions mockOptions = createMock(ComputeOptions.class);
79+
private final Compute serviceMockReturnsOptions = createStrictMock(Compute.class);
80+
private final ComputeOptions mockOptions = createMock(ComputeOptions.class);
8181
private Compute compute;
8282
private Operation globalOperation;
8383
private Operation regionOperation;

gcloud-java-compute/src/test/java/com/google/gcloud/compute/SnapshotTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public class SnapshotTest {
4949
private static final SnapshotInfo.StorageBytesStatus STORAGE_BYTES_STATUS =
5050
SnapshotInfo.StorageBytesStatus.UP_TO_DATE;
5151

52-
private Compute serviceMockReturnsOptions = createStrictMock(Compute.class);
53-
private ComputeOptions mockOptions = createMock(ComputeOptions.class);
52+
private final Compute serviceMockReturnsOptions = createStrictMock(Compute.class);
53+
private final ComputeOptions mockOptions = createMock(ComputeOptions.class);
5454
private Compute compute;
5555
private Snapshot snapshot;
5656
private Snapshot expectedSnapshot;

0 commit comments

Comments
 (0)