Skip to content

Commit

Permalink
Fix errorprone TruthSelfEquals flagged items
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanlb committed Apr 24, 2024
1 parent f0ad743 commit 6dc8bd8
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion astra/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<curator.version>5.6.0</curator.version>
<log4j.version>2.23.1</log4j.version>
<aws.sdk.version>2.25.37</aws.sdk.version>
<error.prone.version>2.23.0</error.prone.version>
<error.prone.version>2.26.1</error.prone.version>
<junit.jupiter.version>5.10.2</junit.jupiter.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ public void testEqualsAndHashCode() {
DatasetMetadata datasetMetadata5 =
new DatasetMetadata(name, owner, throughputBytes, Collections.emptyList(), name);

assertThat(datasetMetadata1).isEqualTo(datasetMetadata1);
assertThat(datasetMetadata1).isNotEqualTo(datasetMetadata2);
assertThat(datasetMetadata1).isNotEqualTo(datasetMetadata3);
assertThat(datasetMetadata1).isNotEqualTo(datasetMetadata4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public void testEqualsAndHashCode() {
new DatasetPartitionMetadata(
start.toEpochMilli(), end.toEpochMilli(), Collections.emptyList());

assertThat(datasetPartitionMetadata1).isEqualTo(datasetPartitionMetadata1);
assertThat(datasetPartitionMetadata1).isNotEqualTo(datasetPartitionMetadata2);
assertThat(datasetPartitionMetadata1).isNotEqualTo(datasetPartitionMetadata3);
assertThat(datasetPartitionMetadata1).isNotEqualTo(datasetPartitionMetadata4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ public void testChunkSchemaEqualsHashCode() {
metadataMap2.put("m2", "v2");
final ChunkSchema chunkSchema6 = new ChunkSchema(schemaName, fieldDefMap2, metadataMap2);

assertThat(chunkSchema1).isEqualTo(chunkSchema1);
assertThat(chunkSchema3).isEqualTo(chunkSchema3);
assertThat(chunkSchema1).isNotEqualTo(chunkSchema2);
assertThat(chunkSchema1).isNotEqualTo(chunkSchema3);
assertThat(chunkSchema1).isNotEqualTo(chunkSchema4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public void testEqualsAndHashCode() {
SearchMetadata searchMetadata1 = new SearchMetadata(name, snapshotName, url);
SearchMetadata searchMetadata2 = new SearchMetadata(name + "2", snapshotName, url);

assertThat(searchMetadata1).isEqualTo(searchMetadata1);
assertThat(searchMetadata1).isNotEqualTo(searchMetadata2);

Set<SearchMetadata> set = new HashSet<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public void testEqualsAndHashCode() {
new SnapshotMetadata(
name + "2", path, startTime, endTime, maxOffset, partitionId, LOGS_LUCENE9);

assertThat(snapshot1).isEqualTo(snapshot1);
// Ensure the name field from super class is included.
assertThat(snapshot1).isNotEqualTo(snapshot2);
Set<SnapshotMetadata> set = new HashSet<>();
Expand Down

0 comments on commit 6dc8bd8

Please sign in to comment.