# HG changeset patch # User prr # Date 1560569597 25200 # Node ID fbab568169c4cec9cf79b81e893a58a49cab1792 # Parent 36c5e85b859716ec56d109252277cfd410023e19 8224915: Better serial attributes Reviewed-by: serb, psadhukhan, mschoene, rhalade diff -r 36c5e85b8597 -r fbab568169c4 src/java.desktop/share/classes/java/awt/Font.java --- a/src/java.desktop/share/classes/java/awt/Font.java Tue Jun 25 00:07:47 2019 +0100 +++ b/src/java.desktop/share/classes/java/awt/Font.java Fri Jun 14 20:33:17 2019 -0700 @@ -1929,6 +1929,7 @@ // value is the default. if (fRequestedAttributes != null) { + try { values = getAttributeValues(); // init AttributeValues extras = AttributeValues.fromSerializableHashtable(fRequestedAttributes); @@ -1938,10 +1939,13 @@ 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