Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public int hashCode() {

@Override
public boolean equals(Object obj) {
if (obj instanceof BooleanValue) {
return ((BooleanValue) obj).value == this.value;
if (obj instanceof BooleanValue other) {
return other.value == this.value;
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ public int hashCode() {

@Override
public boolean equals(final Object obj) {
if (obj instanceof ByteValue) {
return ((ByteValue) obj).value == this.value;
if (obj instanceof ByteValue other) {
return other.value == this.value;
}
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions flink-core/src/main/java/org/apache/flink/types/IntValue.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ public int hashCode() {

@Override
public boolean equals(final Object obj) {
if (obj instanceof IntValue) {
return ((IntValue) obj).value == this.value;
if (obj instanceof IntValue other) {
return other.value == this.value;
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ public int hashCode() {
*/
@Override
public boolean equals(final Object obj) {
if (obj instanceof LongValue) {
return ((LongValue) obj).value == this.value;
if (obj instanceof LongValue other) {
return other.value == this.value;
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ public int hashCode() {

@Override
public boolean equals(final Object obj) {
if (obj instanceof ShortValue) {
return ((ShortValue) obj).value == this.value;
if (obj instanceof ShortValue other) {
return other.value == this.value;
}
return false;
}

// --------------------------------------------------------------------------------------------

@Override
Expand Down