JDK-8076151 : [TESTBUG] Test java/awt/FontClass/CreateFont/fileaccess/FontFile.java fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7u75,7-pool,8,9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2015-03-27
  • Updated: 2020-10-12
  • Resolved: 2015-04-10
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 8 JDK 9 Other
8u270Fixed 9 b65Fixed openjdk8u272Fixed
Related Reports
Relates :  
Relates :  
Description
Test name(s): java/awt/FontClass/CreateFont/fileaccess/FontFile.java
JDK tested: 8u60b07,9b55 
OS tested:Windows,Mac
Is it a regression? No 
Regression introduced in release/build: N/A 
                            
Is it platform specific? No 
                   
The is failure reproduced:Windows, MacOSX
----------System.out:(2/182)*----------
Will try to access K:\\regression\\workspaces\\1.8.0\\1.8.0_60b07\\j2se\\test\\java\\awt\\FontClass\\CreateFont\\fileaccess\\..\\A.ttf
File is available. Verify no access under SM
----------System.err:(17/1150)----------
java.security.AccessControlException: access denied ("java.io.FilePermission" "somefile" "read")
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
	at java.security.AccessController.checkPermission(AccessController.java:884)
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
	at java.awt.Font.createFont(Font.java:1051)
	at FontFile.main(FontFile.java:61)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:745)

JavaTest Message: Test threw exception: java.security.AccessControlException: access denied ("java.io.FilePermission" "somefile" "read")
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.security.AccessControlException: access denied ("java.io.FilePermission" "somefile" "read")
Comments
Fix Request (8u) This fixes the test bug and keeps codebases in sync (I see 8u271). Patch applies cleanly to 8u, passes the affected test on Linux/Windows x86_64.
28-07-2020

http://cr.openjdk.java.net/~kshefov/8076151/webrev.02
09-04-2015