]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
FOP-2179: Fix checkstyle and findbugs warnings.
authorGlenn Adams <gadams@apache.org>
Mon, 31 Dec 2012 14:46:01 +0000 (14:46 +0000)
committerGlenn Adams <gadams@apache.org>
Mon, 31 Dec 2012 14:46:01 +0000 (14:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1427143 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/area/inline/InlineArea.java
src/java/org/apache/fop/area/inline/InlineParent.java
src/java/org/apache/fop/fo/FObj.java
src/java/org/apache/fop/layoutmgr/BalancingColumnBreakingAlgorithm.java
status.xml

index d92ea4f4fee6a0676b043434275a8d763845c9cf..399bd1f1ef1d76ea388f4636500b92555d91a602 100644 (file)
@@ -278,7 +278,7 @@ public class InlineArea extends Area {
             storedIPDVariation += ipdVariation;
         }
     }
-    
+
     /**
      * Returns the offset that this area would have if its offset and size were taking
      * children areas into account. The bpd of an inline area is taken from its nominal
index 4d3f27b30e03ccaea234155fe3d4961ec654ddd9..1be3aff0f8eb29cf4a315d7cc43b0eed271889ee 100644 (file)
 
 package org.apache.fop.area.inline;
 
-import java.util.Iterator;
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
-import java.lang.Math;
 
 import org.apache.fop.area.Area;
 
@@ -41,10 +40,10 @@ public class InlineParent extends InlineArea {
 
     /** Controls whether the IPD is automatically adjusted based on the area's children. */
     protected transient boolean autoSize;
-    
+
     /** The offset of the <q>beforest</q> child area of this area. */
     protected int minChildOffset;
-    
+
     /**
      * The offset of the <q>afterest</q> child area of this area. Offset from the
      * before-edge of this area's content-rectangle and the after-edge of the child area's
index d50e18b0e3ca41be188024ab5844953c91fcd5b9..b19ccbe20133633965c439236ce967bd53c621b3 100644 (file)
@@ -25,6 +25,7 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.ListIterator;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.NoSuchElementException;
 import java.util.Set;
 
@@ -132,12 +133,13 @@ public abstract class FObj extends FONode implements Constants {
     private void warnOnUnknownProperties(Attributes attlist, String objName, PropertyList propertyList)
             throws FOPException {
         Map<String, Property> unknowns = propertyList.getUnknownPropertyValues();
-        for (String propertyValue : unknowns.keySet()) {
+        for (Entry<String, Property> value : unknowns.entrySet()) {
+            String unknownProperty = value.getKey();
             FOValidationEventProducer producer = FOValidationEventProducer.Provider.get(getUserAgent()
                     .getEventBroadcaster());
             producer.invalidPropertyValue(this, objName,
-                    getAttributeNameForValue(attlist, unknowns.get(propertyValue), propertyList),
-                    propertyValue, null,
+                    getAttributeNameForValue(attlist, unknowns.get(unknownProperty), propertyList),
+                    unknownProperty, null,
                     getLocator());
         }
     }
index f40a44d0e0235b758a9cb724b8fcebaf7c4d6a21..06c3c538d37be1529b40de7941f9f2492ef8d183 100644 (file)
@@ -63,8 +63,8 @@ public class BalancingColumnBreakingAlgorithm extends PageBreakingAlgorithm {
             return demerits;
         }
         for (int breakPos = 0; breakPos < curPossibility.size(); breakPos++) {
-            if (curPossibility.get(breakPos) != 0 &&
-                    !curPossibility.get(breakPos).equals(idealBreaks.get(breakPos))) {
+            if (curPossibility.get(breakPos) != 0
+                    && !curPossibility.get(breakPos).equals(idealBreaks.get(breakPos))) {
                 notIdeal = true;
                 break;
             }
index cd7feb080db8b8461d5c016a6ff57f2ee55412de..394c0bf894bcf85a1ad2579dbd0f061a6e640cbc 100644 (file)
@@ -59,6 +59,9 @@
       documents. Example: the fix of marks layering will be such a case when it's done.
     -->
     <release version="FOP Trunk" date="TBD">
+      <action context="Code" dev="GA" type="fix" fixes-bug="FOP-2179" due-to="Robert Meyer">
+        Fix checkstyle and findbugs warnings.
+      </action>
       <action context="Layout" dev="GA" type="fix" fixes-bug="FOP-2160" due-to="Robert Meyer">
         Fix NPE when rl writing mode is used in certain contexts.
       </action>