< prev index next >
src/java.base/share/classes/java/math/MathContext.java
Print this page
*** 62,71 ****
--- 62,72 ----
private static final RoundingMode DEFAULT_ROUNDINGMODE = RoundingMode.HALF_UP;
// Smallest values for digits (Maximum is Integer.MAX_VALUE)
private static final int MIN_DIGITS = 0;
// Serialization version
+ @java.io.Serial
private static final long serialVersionUID = 5579720004786848255L;
/* ----- Public Properties ----- */
/**
* A {@code MathContext} object whose settings have the values
*** 307,316 ****
--- 308,318 ----
* Reconstitute the {@code MathContext} instance from a stream (that is,
* deserialize it).
*
* @param s the stream being read.
*/
+ @java.io.Serial
private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException, ClassNotFoundException {
s.defaultReadObject(); // read in all fields
// validate possibly bad fields
if (precision < MIN_DIGITS) {
< prev index next >