You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2005/11/24 21:09:09 UTC
svn commit: r348795 - in /xmlgraphics/fop/trunk:
src/java/org/apache/fop/fo/FObj.java status.xml
Author: jeremias
Date: Thu Nov 24 12:08:56 2005
New Revision: 348795
URL: http://svn.apache.org/viewcvs?rev=348795&view=rev
Log:
Bugfix for a multi-threading problem:
propertyListTable initialization moved from the constructor to a static block in FOObj.
This fixes NullPointerExceptions in PropertyList.
This was discovered using the application in test/java/org/apache/fop/threading/.
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FObj.java
xmlgraphics/fop/trunk/status.xml
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FObj.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FObj.java?rev=348795&r1=348794&r2=348795&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FObj.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FObj.java Thu Nov 24 12:08:56 2005
@@ -55,12 +55,21 @@
/** Markers added to this element. */
protected Map markers = null;
+ static {
+ propertyListTable = new PropertyMaker[Constants.PROPERTY_COUNT + 1];
+ PropertyMaker[] list = FOPropertyMapping.getGenericMappings();
+ for (int i = 1; i < list.length; i++) {
+ if (list[i] != null) {
+ propertyListTable[i] = list[i];
+ }
+ }
+ }
+
/**
* Create a new formatting object.
* All formatting object classes extend this class.
*
* @param parent the parent node
- * @todo move propertyListTable initialization someplace else?
*/
public FObj(FONode parent) {
super(parent);
@@ -74,16 +83,6 @@
if (foID == FO_FLOAT || foID == FO_FOOTNOTE
|| foID == FO_FOOTNOTE_BODY) {
isOutOfLineFODescendant = true;
- }
- }
- }
-
- if (propertyListTable == null) {
- propertyListTable = new PropertyMaker[Constants.PROPERTY_COUNT + 1];
- PropertyMaker[] list = FOPropertyMapping.getGenericMappings();
- for (int i = 1; i < list.length; i++) {
- if (list[i] != null) {
- propertyListTable[i] = list[i];
}
}
}
Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/status.xml?rev=348795&r1=348794&r2=348795&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Thu Nov 24 12:08:56 2005
@@ -27,7 +27,12 @@
<changes>
<release version="FOP Trunk">
- <action context="Code" dev="JM" type="update">
+ <action context="Code" dev="JM" type="fix">
+ Bugfix for a multi-threading problem:
+ propertyListTable initialization moved from the constructor to a static block in FONode.
+ This fixes NullPointerExceptions in PropertyList.
+ </action>
+ <action context="Code" dev="JM" type="fix">
Bugfix for placement of text inside a text area when borders are present in PostScript output.
</action>
<action context="Code" dev="JM" type="update">
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org