Skip to content

Commit

Permalink
[eclipse-ee4j#617]Pattern Matching for instanceof removed - not befor…
Browse files Browse the repository at this point in the history
…e Java 16

Signed-off-by: Anton Pinsky <anton.pinsky@ionos.com>
  • Loading branch information
api-from-the-ion committed Oct 15, 2023
1 parent 062a161 commit 5703629
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -724,8 +724,8 @@ public static class GenericBean<T> {

@Override
public boolean equals(Object obj) {
if (obj instanceof GenericBean<?> genericBean){
return Objects.equals(genericBean.value, this.value);
if (obj instanceof GenericBean){
return Objects.equals(GenericBean.class.cast(obj).value, this.value);
}
return Boolean.FALSE;
}
Expand Down

0 comments on commit 5703629

Please sign in to comment.