United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 7145771 [macosx] CreateFont/Register.java test fails because of cached results of getAllFonts()
7145771 : [macosx] CreateFont/Register.java test fails because of cached results of getAllFonts()

Details
Type:
Bug
Submit Date:
2012-02-15
Status:
Resolved
Updated Date:
2012-08-14
Project Name:
JDK
Resolved Date:
2012-07-10
Component:
client-libs
OS:
os_x
Sub-Component:
2d
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
8

Related Reports
Backport:
Backport:

Sub Tasks

Description
Mac OS X 10.7.3 macmini4,1 and iMac

closed/java/awt/FontClass/CreateFont/Register.java failed with b11. There's apparently problem with "Untitled" font registration.

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-comp/jdk/rev/9881db0a65bf
                                     
2012-08-14
EVALUATION

The OS X specific subclass of SunGraphicsEnvironment has an implementation
of getAllFonts() which caches the list of fonts on first call.
Thus it will never report additional fonts added after that first call.
The fix is to remove that caching behaviour.
                                     
2012-06-25
EVALUATION

OK, missed that its 4 tests.
The runs that pass are "neither" and "getfamilies" and
"getfonts" and "both" are the ones that fail as thus :

** END Font Names ** After registration
Exception in thread "main" java.lang.RuntimeException: Font array length
	at Register.main(Register.java:123)

However this isn't a regression from Apple JDK6. These all fail there too.
Was this really new in b11 ?
                                     
2012-03-13
EVALUATION

There are 4 @run commands in the test. I have the failure consistently reproduced in the 3rd run, even if I remove '@' from the first two (so they are skipped). In this run, Untitled font is not reported after registration.

Now, as I understand, 10.6.8 is not supported; this test does fail on several machines with 10.7.3.  Please try 10.7.3!
                                     
2012-03-02
EVALUATION

I tried with b11 and the test passes for me.
...

If you have the font "Untitled" installed somewhere already
then that would make the test fail.
Note that I used 10.6.8 but I can't think why that would matter.
                                     
2012-03-01



Hardware and Software, Engineered to Work Together