8261940: Fix references to IOException in BigDecimal javadoc

Reviewed-by: alanb, chegar, iris, bpb
This commit is contained in:
Joe Darcy 2021-02-18 17:52:30 +00:00
parent 0e9c5aedc8
commit c4664e6446

View file

@ -30,6 +30,7 @@
package java.math; package java.math;
import static java.math.BigInteger.LONG_MASK; import static java.math.BigInteger.LONG_MASK;
import java.io.IOException;
import java.util.Arrays; import java.util.Arrays;
import java.util.Objects; import java.util.Objects;
@ -4224,7 +4225,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
*/ */
@java.io.Serial @java.io.Serial
private void readObject(java.io.ObjectInputStream s) private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException, ClassNotFoundException { throws IOException, ClassNotFoundException {
// Read in all fields // Read in all fields
s.defaultReadObject(); s.defaultReadObject();
// validate possibly bad fields // validate possibly bad fields
@ -4244,7 +4245,7 @@ public class BigDecimal extends Number implements Comparable<BigDecimal> {
*/ */
@java.io.Serial @java.io.Serial
private void writeObject(java.io.ObjectOutputStream s) private void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException { throws IOException {
// Must inflate to maintain compatible serial form. // Must inflate to maintain compatible serial form.
if (this.intVal == null) if (this.intVal == null)
UnsafeHolder.setIntValVolatile(this, BigInteger.valueOf(this.intCompact)); UnsafeHolder.setIntValVolatile(this, BigInteger.valueOf(this.intCompact));