8224915: Better serial attributes

Reviewed-by: serb, psadhukhan, mschoene, rhalade
This commit is contained in:
Phil Race 2019-06-14 20:33:17 -07:00
parent d6304e88e6
commit c2701f73d5

View File

@ -1929,6 +1929,7 @@ public class Font implements java.io.Serializable
// value is the default.
if (fRequestedAttributes != null) {
try {
values = getAttributeValues(); // init
AttributeValues extras =
AttributeValues.fromSerializableHashtable(fRequestedAttributes);
@ -1938,10 +1939,13 @@ public class Font implements java.io.Serializable
values = getAttributeValues().merge(extras);
this.nonIdentityTx = values.anyNonDefault(EXTRA_MASK);
this.hasLayoutAttributes = values.anyNonDefault(LAYOUT_MASK);
} catch (Throwable t) {
throw new IOException(t);
} finally {
fRequestedAttributes = null; // don't need it any more
}
}
}
/**
* Returns the number of glyphs in this {@code Font}. Glyph codes