changeset 13698:5c1c0eda1459

8224915: Better serial attributes Reviewed-by: serb, psadhukhan, mschoene, rhalade
author prr
date Fri, 14 Jun 2019 20:33:17 -0700
parents 1f801b99581a
children 2c10a7ea0c40
files src/share/classes/java/awt/Font.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/awt/Font.java	Tue Jun 25 00:07:47 2019 +0100
+++ b/src/share/classes/java/awt/Font.java	Fri Jun 14 20:33:17 2019 -0700
@@ -1750,6 +1750,7 @@
         // value is the default.
 
         if (fRequestedAttributes != null) {
+            try {
             values = getAttributeValues(); // init
             AttributeValues extras =
                 AttributeValues.fromSerializableHashtable(fRequestedAttributes);
@@ -1759,10 +1760,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</code>. Glyph codes