]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Code cleanup (minor)
authorAndreas L. Delmelle <adelmelle@apache.org>
Sun, 6 Feb 2011 01:23:08 +0000 (01:23 +0000)
committerAndreas L. Delmelle <adelmelle@apache.org>
Sun, 6 Feb 2011 01:23:08 +0000 (01:23 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1067569 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/FootnoteBodyLayoutManager.java

index 4f6cfa9d50344eeb82b3fcd6f25b7c600905b4f3..6c6462a3f9783dc6b9848e3f9a2cab31f05e589e 100644 (file)
@@ -38,31 +38,29 @@ public class FootnoteBodyLayoutManager extends BlockStackingLayoutManager {
     }
 
     /** {@inheritDoc} */
+    @Override
     public void addAreas(PositionIterator parentIter, LayoutContext layoutContext) {
-        LayoutManager childLM = null;
+        LayoutManager childLM;
         LayoutManager lastLM = null;
         LayoutContext lc = new LayoutContext(0);
 
         // "unwrap" the NonLeafPositions stored in parentIter
         // and put them in a new list;
-        LinkedList positionList = new LinkedList();
+        LinkedList<Position> positionList = new LinkedList<Position>();
         Position pos;
         while (parentIter.hasNext()) {
-            pos = (Position) parentIter.next();
-            //log.trace("pos = " + pos.getClass().getName() + "; " + pos);
-            Position innerPosition = pos;
+            pos = parentIter.next();
+            Position innerPosition;
             if (pos instanceof NonLeafPosition) {
-                innerPosition = ((NonLeafPosition) pos).getPosition();
+                innerPosition = pos.getPosition();
                 if (innerPosition.getLM() == this) {
                     // pos was created by this LM and was inside a penalty
                     // allowing or forbidding a page break
                     // nothing to do
-                    //log.trace(" penalty");
                 } else {
                     // innerPosition was created by another LM
                     positionList.add(innerPosition);
                     lastLM = innerPosition.getLM();
-                    //log.trace(" " + innerPosition.getClass().getName());
                 }
             }
         }
@@ -81,6 +79,7 @@ public class FootnoteBodyLayoutManager extends BlockStackingLayoutManager {
     }
 
     /** {@inheritDoc} */
+    @Override
     public void addChildArea(Area childArea) {
         childArea.setAreaClass(Area.CLASS_FOOTNOTE);
         parentLayoutManager.addChildArea(childArea);
@@ -92,16 +91,19 @@ public class FootnoteBodyLayoutManager extends BlockStackingLayoutManager {
     }
 
     /** {@inheritDoc} */
+    @Override
     public Keep getKeepTogether() {
         return getParentKeepTogether();
     }
 
     /** {@inheritDoc} */
+    @Override
     public Keep getKeepWithNext() {
         return Keep.KEEP_AUTO;
     }
 
     /** {@inheritDoc} */
+    @Override
     public Keep getKeepWithPrevious() {
         return Keep.KEEP_AUTO;
     }