]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Add code guards around log statements for better performance when they are disabled
authorVincent Hennebert <vhennebert@apache.org>
Wed, 28 Feb 2007 08:45:26 +0000 (08:45 +0000)
committerVincent Hennebert <vhennebert@apache.org>
Wed, 28 Feb 2007 08:45:26 +0000 (08:45 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@512661 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/table/TableStepper.java

index 72861cf26c67d9c27850b842705b2f35bdba3f7a..f698ea784c925278ef12013e74b51c38aacbeeca 100644 (file)
@@ -154,7 +154,9 @@ public class TableStepper {
         for (int i = 0; i < rowGroup.length; i++) {
             totalHeight += rowGroup[i].getHeight().opt;
         }
-        log.debug("totalHeight=" + totalHeight);
+        if (log.isDebugEnabled()) {
+            log.debug("totalHeight=" + totalHeight);
+        }
     }
     
     private int getMaxRemainingHeight() {
@@ -238,7 +240,9 @@ public class TableStepper {
                 borderBefore[column] = pgu.getBorders().getBorderBeforeWidth(false);
             } else {
                 borderBefore[column] = pgu.getBorders().getBorderBeforeWidth(false) / 2;
-                log.trace("border before for column " + column + ": " + borderBefore[column]);
+                if (log.isTraceEnabled()) {
+                    log.trace("border before for column " + column + ": " + borderBefore[column]);
+                }
             }
             paddingBefore[column] = pgu.getBorders().getPaddingBefore(false, pgu.getCellLM());
             paddingAfter[column] = pgu.getBorders().getPaddingAfter(false, pgu.getCellLM());