JDK-7145771 : [macosx] CreateFont/Register.java test fails because of cached results of getAllFonts()
Type:Bug
Component:client-libs
Sub-Component:2d
Affected Version:7
Priority:P3
Status:Resolved
Resolution:Fixed
OS:os_x
CPU:x86
Submitted:2012-02-15
Updated:2013-05-27
Resolved:2012-07-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.
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.
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.
25-06-2012
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 ?
13-03-2012
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!
02-03-2012
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.