Skip to content

Commit 8a2f413

Browse files
committed
Fix Codacy problems (unused param, unused local)
1 parent c9ddfcc commit 8a2f413

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ private void checkBindingInProgress(boolean expectInProgress) {
213213

214214
private void checkDuplicateColumns(ImmutableList<String> columnNames) {
215215
Set<String> columnNameSet = new HashSet<>();
216-
for (String columnName : columns.build()) {
216+
for (String columnName : columnNames) {
217217
columnName = columnName.toLowerCase();
218218
if (columnNameSet.contains(columnName)) {
219219
throw new IllegalStateException("Duplicate column: " + columnName);

google-cloud-spanner/src/test/java/com/google/cloud/spanner/MutationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,14 +126,14 @@ public void replace() {
126126
public void duplicateColumn() {
127127
expectedException.expect(IllegalStateException.class);
128128
expectedException.expectMessage("Duplicate column");
129-
Mutation m = Mutation.newInsertBuilder("T1").set("C1").to(true).set("C1").to(false).build();
129+
Mutation.newInsertBuilder("T1").set("C1").to(true).set("C1").to(false).build();
130130
}
131131

132132
@Test
133133
public void duplicateColumnCaseInsensitive() {
134134
expectedException.expect(IllegalStateException.class);
135135
expectedException.expectMessage("Duplicate column");
136-
Mutation m = Mutation.newInsertBuilder("T1").set("C1").to(true).set("c1").to(false).build();
136+
Mutation.newInsertBuilder("T1").set("C1").to(true).set("c1").to(false).build();
137137
}
138138

139139
@Test

0 commit comments

Comments
 (0)