JDK-6968373 : FontUtilities static initializer throws AccessControlException
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,linux
  • CPU: generic,x86
  • Submitted: 2010-07-12
  • Updated: 2012-10-01
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7
7 b102Fixed
Related Reports
Duplicate :  
Duplicate :  
Description
Usnsigned applet fails to start if java console is disabled with following exception:

exception in trace when applet fails to load:
Exception in thread "AWT-EventQueue-2" java.lang.ExceptionInInitializerError
       at sun.java2d.SunGraphics2D.checkFontInfo(SunGraphics2D.java:596)
       at sun.java2d.SunGraphics2D.getFontInfo(SunGraphics2D.java:757)
       at sun.java2d.pipe.GlyphListPipe.drawString(GlyphListPipe.java:50)
       at sun.java2d.pipe.ValidatePipe.drawString(ValidatePipe.java:165)
       at sun.java2d.SunGraphics2D.drawString(SunGraphics2D.java:2807)
       at HelloWorld.paint(HelloWorld.java:8)
       at sun.awt.RepaintArea.paintComponent(RepaintArea.java:264)
       at sun.awt.RepaintArea.paint(RepaintArea.java:240)
       at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:347
       at java.awt.Component.dispatchEventImpl(Component.java:4866)
       at java.awt.Container.dispatchEventImpl(Container.java:2261)
       at java.awt.Component.dispatchEvent(Component.java:4616)
       at java.awt.EventQueue.dispatchEvent(EventQueue.java:651)
       at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchT
ad.java:255)
       at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThre
java:170)
       at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchT
ad.java:160)
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:1
       at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:1
       at java.awt.EventDispatchThread.run(EventDispatchThread.java:136)
Caused by: java.security.AccessControlException: access denied ("java.util.Pr
rtyPermission" "sun.java2d.debugfonts" "read")
       at java.security.AccessControlContext.checkPermission(AccessControlCo
xt.java:345)
@

Comments
EVALUATION The fix is to merge static blocks and execute them both in the privileged context. No new tests are needed as this is covered by existing SQE tests (same as for 6904882).
12-07-2010

EVALUATION FontUtilities apparently has 2 static blocks and only one of them is executed using doPrivileged. However, in fact both need privileges.
12-07-2010