< prev index next >

src/java.base/share/classes/java/math/BigDecimal.java

Print this page

        

*** 278,287 **** --- 278,288 ---- // All 18-digit base ten strings fit into a long; not all 19-digit // strings will private static final int MAX_COMPACT_DIGITS = 18; /* Appease the serialization gods */ + @java.io.Serial private static final long serialVersionUID = 6108874887143696463L; private static final ThreadLocal<StringBuilderHelper> threadLocalStringBuilderHelper = new ThreadLocal<StringBuilderHelper>() { @Override
*** 4125,4134 **** --- 4126,4136 ---- * Reconstitute the {@code BigDecimal} 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 { // Read in all fields s.defaultReadObject(); // validate possibly bad fields
*** 4143,4152 **** --- 4145,4155 ---- /** * Serialize this {@code BigDecimal} to the stream in question * * @param s the stream to serialize to. */ + @java.io.Serial private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException { // Must inflate to maintain compatible serial form. if (this.intVal == null) UnsafeHolder.setIntValVolatile(this, BigInteger.valueOf(this.intCompact));
< prev index next >