mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8311188: Simplify and modernize equals and hashCode in java.text
Reviewed-by: lancea, naoto, rriggs
This commit is contained in:
parent
1fc726a8b3
commit
1dfb0fb3e2
15 changed files with 72 additions and 98 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -741,9 +741,8 @@ public class DecimalFormatSymbols implements Cloneable, Serializable {
|
|||
*/
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null) return false;
|
||||
if (this == obj) return true;
|
||||
if (getClass() != obj.getClass()) return false;
|
||||
if (obj == null || getClass() != obj.getClass()) return false;
|
||||
DecimalFormatSymbols other = (DecimalFormatSymbols) obj;
|
||||
return (zeroDigit == other.zeroDigit &&
|
||||
groupingSeparator == other.groupingSeparator &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue