From: Simon Pepping Date: Thu, 27 Jan 2011 15:34:12 +0000 (+0000) Subject: Fix an forgotten change of type in class Area and a checkstyle error in class FObj X-Git-Tag: fop-1_1rc1old~346 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f540b00cf2c8cf1126f6d45e3a9062b2bccd7a58;p=xmlgraphics-fop.git Fix an forgotten change of type in class Area and a checkstyle error in class FObj git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1064159 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/area/Area.java b/src/java/org/apache/fop/area/Area.java index b1e27a1eb..1f14ed740 100644 --- a/src/java/org/apache/fop/area/Area.java +++ b/src/java/org/apache/fop/area/Area.java @@ -378,11 +378,11 @@ public class Area extends AreaTreeObject implements Serializable { * @param traitCode the trait key * @param prop the value of the trait */ - public void addTrait(Object traitCode, Object prop) { + public void addTrait(Integer traitCode, Object prop) { if (props == null) { props = new java.util.HashMap(20); } - props.put((Integer)traitCode, prop); + props.put(traitCode, prop); } /** diff --git a/src/java/org/apache/fop/fo/FObj.java b/src/java/org/apache/fop/fo/FObj.java index 66bf1a15d..98661b8b6 100644 --- a/src/java/org/apache/fop/fo/FObj.java +++ b/src/java/org/apache/fop/fo/FObj.java @@ -47,10 +47,10 @@ public abstract class FObj extends FONode implements Constants { private static final PropertyMaker[] PROPERTY_LIST_TABLE = FOPropertyMapping.getGenericMappings(); - /** - * pointer to the descendant subtree - */ + /** pointer to the descendant subtree */ protected FONode firstChild; + + /** pointer to the end of the descendant subtree */ protected FONode lastChild; /** The list of extension attachments, null if none */ diff --git a/src/java/org/apache/fop/layoutmgr/TraitSetter.java b/src/java/org/apache/fop/layoutmgr/TraitSetter.java index 6039ad941..ff0e70811 100644 --- a/src/java/org/apache/fop/layoutmgr/TraitSetter.java +++ b/src/java/org/apache/fop/layoutmgr/TraitSetter.java @@ -104,10 +104,10 @@ public final class TraitSetter { private static void addBorderTrait(Area area, CommonBorderPaddingBackground bpProps, boolean bDiscard, int iSide, int mode, - Object oTrait) { + Integer trait) { int iBP = bpProps.getBorderWidth(iSide, bDiscard); if (iBP > 0) { - area.addTrait(oTrait, + area.addTrait(trait, new BorderProps(bpProps.getBorderStyle(iSide), iBP, bpProps.getBorderColor(iSide), mode));