Skip to content

Commit 3b5ce15

Browse files
committed
Added check of self-equals
1 parent 51f5f5e commit 3b5ce15

12 files changed

+36
-0
lines changed

topic/src/main/java/tech/ydb/topic/description/Consumer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ public Consumer build() {
144144

145145
@Override
146146
public boolean equals(Object o) {
147+
if (this == o) {
148+
return true;
149+
}
147150
if (o == null || getClass() != o.getClass()) {
148151
return false;
149152
}

topic/src/main/java/tech/ydb/topic/description/ConsumerDescription.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ public List<ConsumerPartitionInfo> getPartitions() {
3232

3333
@Override
3434
public boolean equals(Object o) {
35+
if (this == o) {
36+
return true;
37+
}
3538
if (o == null || getClass() != o.getClass()) {
3639
return false;
3740
}

topic/src/main/java/tech/ydb/topic/description/ConsumerPartitionInfo.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ public int getConnectionNodeId() {
182182

183183
@Override
184184
public boolean equals(Object o) {
185+
if (this == o) {
186+
return true;
187+
}
185188
if (o == null || getClass() != o.getClass()) {
186189
return false;
187190
}

topic/src/main/java/tech/ydb/topic/description/MultipleWindowsStat.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ public long getPerDay() {
3838

3939
@Override
4040
public boolean equals(Object o) {
41+
if (this == o) {
42+
return true;
43+
}
4144
if (o == null || getClass() != o.getClass()) {
4245
return false;
4346
}

topic/src/main/java/tech/ydb/topic/description/PartitionInfo.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ public PartitionInfo build() {
9090

9191
@Override
9292
public boolean equals(Object o) {
93+
if (this == o) {
94+
return true;
95+
}
9396
if (o == null || getClass() != o.getClass()) {
9497
return false;
9598
}

topic/src/main/java/tech/ydb/topic/description/PartitionStats.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ public PartitionStats build() {
130130

131131
@Override
132132
public boolean equals(Object o) {
133+
if (this == o) {
134+
return true;
135+
}
133136
if (o == null || getClass() != o.getClass()) {
134137
return false;
135138
}

topic/src/main/java/tech/ydb/topic/description/SupportedCodecs.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ public SupportedCodecs build() {
5151

5252
@Override
5353
public boolean equals(Object o) {
54+
if (this == o) {
55+
return true;
56+
}
5457
if (o == null || getClass() != o.getClass()) {
5558
return false;
5659
}

topic/src/main/java/tech/ydb/topic/description/TopicDescription.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ public TopicDescription build() {
183183

184184
@Override
185185
public boolean equals(Object o) {
186+
if (this == o) {
187+
return true;
188+
}
186189
if (o == null || getClass() != o.getClass()) {
187190
return false;
188191
}

topic/src/main/java/tech/ydb/topic/description/TopicStats.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ public TopicStats build() {
8080

8181
@Override
8282
public boolean equals(Object o) {
83+
if (this == o) {
84+
return true;
85+
}
8386
if (o == null || getClass() != o.getClass()) {
8487
return false;
8588
}

topic/src/main/java/tech/ydb/topic/read/impl/OffsetsRangeImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ public void setEnd(long end) {
4141

4242
@Override
4343
public boolean equals(Object o) {
44+
if (this == o) {
45+
return true;
46+
}
4447
if (o == null || getClass() != o.getClass()) {
4548
return false;
4649
}

0 commit comments

Comments
 (0)