Re: svn commit: r653826 [1/3] - in /xmlgraphics/fop/trunk: ./ src/documentation/content/xdocs/trunk/ src/java/org/apache/fop/apps/ src/java/org/apache/fop/fonts/ src/java/org/apache/fop/fonts/autodetect/ src/java/org/apache/fop/fonts/base14/ src/java/org/a...
On May 9, 2008, at 16:40, Andreas Delmelle wrote:
> <snip />
> That is, unless there is a specific reason to wait until
> getFontManager() is called before initializing (?)
> (Haven't checked whether the fontManager needs a fully initialized
> FopFactory to work properly...)
I did a quick check, and missed Jeremias' update in the meantime. The
reference to FopFactory has been removed, so the assignment can be
safely moved out of the method.
Declare it 'volatile' or 'final' to obtain assurance that multiple
threads always see the same variable. In this case, 'final' should be
OK, since the FopFactory has no setFontManager() method through which
this reference could be altered.
Note: for final members, this may still be insufficient on older VMs,
but modern VMs provide initialization safety in that case.
Cheers
Andreas