mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8263190: Update java.io, java.math, and java.text to use instanceof pattern variable
Reviewed-by: lancea, bpb, darcy, naoto, iris, dfuchs, smarks, redestad
This commit is contained in:
parent
4f0a12ec87
commit
0f2402d0a2
15 changed files with 32 additions and 59 deletions
|
@ -248,10 +248,8 @@ public final class MathContext implements Serializable {
|
|||
* settings as this object
|
||||
*/
|
||||
public boolean equals(Object x){
|
||||
MathContext mc;
|
||||
if (!(x instanceof MathContext))
|
||||
if (!(x instanceof MathContext mc))
|
||||
return false;
|
||||
mc = (MathContext) x;
|
||||
return mc.precision == this.precision
|
||||
&& mc.roundingMode == this.roundingMode; // no need for .equals()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue