src/share/classes/java/awt/font/TextAttribute.java
Print this page
rev 10196 : [mq]: 8038092
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -42,10 +42,11 @@
import java.io.InvalidObjectException;
import java.text.AttributedCharacterIterator.Attribute;
import java.util.Map;
import java.util.HashMap;
+import sun.misc.SharedSecrets;
/**
* The <code>TextAttribute</code> class defines attribute keys and
* attribute values used for text rendering.
* <p>
@@ -255,10 +256,17 @@
// table of all instances in this class, used by readResolve
private static final Map<String, TextAttribute>
instanceMap = new HashMap<String, TextAttribute>(29);
+ // For access from java.text.Bidi
+ static {
+ if (SharedSecrets.getJavaAWTFontAccess() == null) {
+ SharedSecrets.setJavaAWTFontAccess(new JavaAWTFontAccessImpl());
+ }
+ }
+
/**
* Constructs a <code>TextAttribute</code> with the specified name.
* @param name the attribute name to assign to this
* <code>TextAttribute</code>
*/