]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Removed many "// CSOK: ConstantName" instances for constants, by converting them...
authorJeremias Maerki <jeremias@apache.org>
Sat, 14 Aug 2010 19:28:26 +0000 (19:28 +0000)
committerJeremias Maerki <jeremias@apache.org>
Sat, 14 Aug 2010 19:28:26 +0000 (19:28 +0000)
Fixed some other non-Checkstyle issues on the way, imports mainly.
Removed some "log" instances that were not used.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@985571 13f79535-47bb-0310-9956-ffa450edef68

74 files changed:
examples/plan/src/org/apache/fop/plan/PlanHints.java
examples/plan/src/org/apache/fop/plan/PlanRenderer.java
examples/plan/src/org/apache/fop/plan/SimplePlanDrawer.java
src/java/org/apache/fop/afp/AFPDataObjectInfo.java
src/java/org/apache/fop/afp/AFPGraphics2D.java
src/java/org/apache/fop/afp/AFPStreamer.java
src/java/org/apache/fop/afp/DataStream.java
src/java/org/apache/fop/afp/Factory.java
src/java/org/apache/fop/afp/fonts/CharacterSet.java
src/java/org/apache/fop/afp/fonts/RasterFont.java
src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java
src/java/org/apache/fop/afp/modca/AbstractAFPObject.java
src/java/org/apache/fop/afp/modca/AbstractEnvironmentGroup.java
src/java/org/apache/fop/afp/modca/AbstractNamedAFPObject.java
src/java/org/apache/fop/afp/modca/AbstractTripletStructuredObject.java
src/java/org/apache/fop/afp/modca/ActiveEnvironmentGroup.java
src/java/org/apache/fop/afp/modca/MapCodedFont.java
src/java/org/apache/fop/afp/modca/MapPageOverlay.java
src/java/org/apache/fop/afp/modca/MapPageSegment.java
src/java/org/apache/fop/afp/ptoca/LineDataInfoProducer.java
src/java/org/apache/fop/afp/svg/AFPGraphicsConfiguration.java
src/java/org/apache/fop/area/IDTracker.java
src/java/org/apache/fop/events/model/EventModelParser.java
src/java/org/apache/fop/fo/FOEventHandler.java
src/java/org/apache/fop/fo/FObj.java
src/java/org/apache/fop/fo/extensions/ExtensionElementMapping.java
src/java/org/apache/fop/fo/flow/Marker.java
src/java/org/apache/fop/fo/pagination/Region.java
src/java/org/apache/fop/fo/properties/CharacterProperty.java
src/java/org/apache/fop/fo/properties/ColorProperty.java
src/java/org/apache/fop/fo/properties/CommonBorderPaddingBackground.java
src/java/org/apache/fop/fo/properties/CommonFont.java
src/java/org/apache/fop/fo/properties/CommonHyphenation.java
src/java/org/apache/fop/fo/properties/CondLengthProperty.java
src/java/org/apache/fop/fo/properties/CorrespondingPropertyMaker.java
src/java/org/apache/fop/fo/properties/EnumNumber.java
src/java/org/apache/fop/fo/properties/EnumProperty.java
src/java/org/apache/fop/fo/properties/FixedLength.java
src/java/org/apache/fop/fo/properties/FontFamilyProperty.java
src/java/org/apache/fop/fo/properties/KeepProperty.java
src/java/org/apache/fop/fo/properties/NumberProperty.java
src/java/org/apache/fop/fo/properties/StringProperty.java
src/java/org/apache/fop/fonts/FontSetup.java
src/java/org/apache/fop/layoutmgr/BalancingColumnBreakingAlgorithm.java
src/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java
src/java/org/apache/fop/layoutmgr/SpaceResolver.java
src/java/org/apache/fop/layoutmgr/TraitSetter.java
src/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java
src/java/org/apache/fop/layoutmgr/inline/BasicScaledBaselineTable.java
src/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java
src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java
src/java/org/apache/fop/layoutmgr/inline/ScaledBaselineTable.java
src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java
src/java/org/apache/fop/layoutmgr/table/TableRowIterator.java
src/java/org/apache/fop/pdf/PDFEmbeddedFile.java
src/java/org/apache/fop/pdf/PDFEncryptionJCE.java
src/java/org/apache/fop/pdf/PDFEncryptionManager.java
src/java/org/apache/fop/render/afp/AFPForeignAttributeReader.java
src/java/org/apache/fop/render/afp/extensions/AFPPageOverlay.java
src/java/org/apache/fop/render/intermediate/AbstractIFDocumentHandler.java
src/java/org/apache/fop/render/java2d/Java2DPainter.java
src/java/org/apache/fop/render/pcl/HardcodedFonts.java
src/java/org/apache/fop/render/pcl/PCLPainter.java
src/java/org/apache/fop/render/pcl/PCLRendererContext.java
src/java/org/apache/fop/render/pdf/PDFBorderPainter.java
src/java/org/apache/fop/render/ps/PSSVGHandler.java
src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfList.java
src/sandbox/org/apache/fop/render/svg/SVGPainter.java
test/java/org/apache/fop/GenericFOPTestCase.java
test/java/org/apache/fop/config/BaseUserConfigTestCase.java
test/java/org/apache/fop/events/EventChecker.java
test/java/org/apache/fop/memory/Stats.java
test/java/org/apache/fop/render/pdf/PDFCMapTestCase.java
test/java/org/apache/fop/util/DigestFilter.java

index 2a2c1333af2c53709afc366f8814ee3ee9384a78..a50d911394dc4a2f4e0163964d619580760e3b17 100644 (file)
@@ -25,22 +25,22 @@ package org.apache.fop.plan;
 public interface PlanHints {
 
     /** Border attribute */
-    public static final String PLAN_BORDER = "border";
+    String PLAN_BORDER = "border";
     /** Legend attribute */
-    public static final String PLAN_LEGEND = "legend";
+    String PLAN_LEGEND = "legend";
     /** Font family attribute */
-    public static final String FONT_FAMILY = "font-family";
+    String FONT_FAMILY = "font-family";
     /** Font size attribute */
-    public static final String FONT_SIZE = "font-size";
+    String FONT_SIZE = "font-size";
     /** Legent type attribute */
-    public static final String LEGEND_TYPE = "legendType";
+    String LEGEND_TYPE = "legendType";
     /** Locale attribute */
-    public static final String LOCALE = "locale";
+    String LOCALE = "locale";
     /** Label type attribute */
-    public static final String LABEL_TYPE = "labelType";
+    String LABEL_TYPE = "labelType";
     /** Label font size attribute */
-    public static final String LABEL_FONT_SIZE = "labelFontSize";
+    String LABEL_FONT_SIZE = "labelFontSize";
     /** Label font attribute */
-    public static final String LABEL_FONT = "labelFont";
+    String LABEL_FONT = "labelFont";
 
 }
index 8b79782591f011f9abd3b843b72f0fcec1f038bf..7d41962fbd51aced2d276867b042f83a428e6d40 100644 (file)
@@ -109,8 +109,8 @@ public class PlanRenderer {
         hints.put(PlanHints.FONT_FAMILY, fontFamily);
         hints.put(PlanHints.FONT_SIZE, new Float(fontSize));
         hints.put(PlanHints.LOCALE, locale);
-        Document doc =
-          planDrawer.createDocument(data, width, height, hints);
+        Document doc
+            = planDrawer.createDocument(data, width, height, hints);
         return doc;
     }
 
@@ -152,6 +152,7 @@ public class PlanRenderer {
         } else if (t.equals("grouping")) {
             data.setType(ActionInfo.GROUPING);
         } else {
+            throw new IllegalArgumentException("Unknown action type: " + t);
         }
 
         for (int i = 0; i < childs.getLength(); i++) {
index 46b07601abcb9efce1e06cf9aaf53dbbddf6768e..a8ba062edb9e8deb71b5f8e8e61e869b78396d1d 100644 (file)
@@ -243,8 +243,8 @@ public class SimplePlanDrawer implements PlanDrawer {
                                 - lastWeek.getTime() + 43200000) / 86400000);
                     int days = (int)((end.getTime() - start.getTime()
                                 + 43200000) / 86400000);
-                    int daysFromEnd =
-                        (int)((future.getTime() - end.getTime()
+                    int daysFromEnd
+                        (int)((future.getTime() - end.getTime()
                             + 43200000) / 86400000);
                     Element taskGraphic;
                     switch (type) {
@@ -299,8 +299,8 @@ public class SimplePlanDrawer implements PlanDrawer {
                 topEdge = lastTop;
             }
         }
-        int currentDays =
-          (int)((currentDate.getTime() - lastWeek.getTime()
+        int currentDays
+            = (int)((currentDate.getTime() - lastWeek.getTime()
                 + 43200000) / 86400000);
 
         text = SVGUtilities.createText(doc,
index 66ef8e595c0fac4a962a393c18e1da57339e0fdb..7589ef4fe68757583a204f8b882ea786dd61c118 100644 (file)
@@ -19,9 +19,6 @@
 
 package org.apache.fop.afp;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.apache.fop.afp.modca.Registry;
 import org.apache.fop.afp.modca.triplets.MappingOptionTriplet;
 
@@ -29,8 +26,6 @@ import org.apache.fop.afp.modca.triplets.MappingOptionTriplet;
  * A list of parameters associated with an AFP data objects
  */
 public class AFPDataObjectInfo {
-    private static final Log log  // CSOK: ConstantName
-        = LogFactory.getLog("org.apache.xmlgraphics.afp");
 
     /** the object area info */
     private AFPObjectAreaInfo objectAreaInfo;
index 5fa6bae2dc7c52842515fd346913f2d73cc049ad..af58b54718e88f01d02cf0514032f7a13f9e65ad 100644 (file)
@@ -75,7 +75,7 @@ import org.apache.fop.svg.NativeImageHandler;
  */
 public class AFPGraphics2D extends AbstractGraphics2D implements NativeImageHandler {
 
-    private static final Log log = LogFactory.getLog(AFPGraphics2D.class); // CSOK: ConstantName
+    private static final Log LOG = LogFactory.getLog(AFPGraphics2D.class);
 
     private static final int X = 0;
 
@@ -321,7 +321,7 @@ public class AFPGraphics2D extends AbstractGraphics2D implements NativeImageHand
                 graphicsObj.setLineType(type);
             }
         } else {
-            log.warn("Unsupported Stroke: " + stroke.getClass().getName());
+            LOG.warn("Unsupported Stroke: " + stroke.getClass().getName());
         }
     }
 
@@ -339,7 +339,7 @@ public class AFPGraphics2D extends AbstractGraphics2D implements NativeImageHand
         if (paint instanceof Color) {
             return true;
         }
-        log.debug("NYI: applyPaint() " + paint + " fill=" + fill);
+        LOG.debug("NYI: applyPaint() " + paint + " fill=" + fill);
         if (paint instanceof TexturePaint) {
 //            TexturePaint texturePaint = (TexturePaint)paint;
 //            BufferedImage bufferedImage = texturePaint.getImage();
@@ -490,7 +490,7 @@ public class AFPGraphics2D extends AbstractGraphics2D implements NativeImageHand
                 currentPosition = new double[]{openingCoords[0], openingCoords[1]};
                 break;
             default:
-                log.debug("Unrecognised path iterator type");
+                LOG.debug("Unrecognised path iterator type");
                 break;
             }
         }
@@ -498,13 +498,13 @@ public class AFPGraphics2D extends AbstractGraphics2D implements NativeImageHand
 
     /** {@inheritDoc} */
     public void draw(Shape shape) {
-        log.debug("draw() shape=" + shape);
+        LOG.debug("draw() shape=" + shape);
         doDrawing(shape, false);
     }
 
     /** {@inheritDoc} */
     public void fill(Shape shape) {
-        log.debug("fill() shape=" + shape);
+        LOG.debug("fill() shape=" + shape);
         doDrawing(shape, true);
     }
 
@@ -516,7 +516,7 @@ public class AFPGraphics2D extends AbstractGraphics2D implements NativeImageHand
      */
     public void handleIOException(IOException ioe) {
         // TODO Surely, there's a better way to do this.
-        log.error(ioe.getMessage());
+        LOG.error(ioe.getMessage());
         ioe.printStackTrace();
     }
 
@@ -659,29 +659,29 @@ public class AFPGraphics2D extends AbstractGraphics2D implements NativeImageHand
 
     /** {@inheritDoc} */
     public void drawRenderableImage(RenderableImage img, AffineTransform xform) {
-        log.debug("drawRenderableImage() NYI: img=" + img + ", xform=" + xform);
+        LOG.debug("drawRenderableImage() NYI: img=" + img + ", xform=" + xform);
     }
 
     /** {@inheritDoc} */
     public FontMetrics getFontMetrics(Font f) {
-        log.debug("getFontMetrics() NYI: f=" + f);
+        LOG.debug("getFontMetrics() NYI: f=" + f);
         return null;
     }
 
     /** {@inheritDoc} */
     public void setXORMode(Color col) {
-        log.debug("setXORMode() NYI: col=" + col);
+        LOG.debug("setXORMode() NYI: col=" + col);
     }
 
     /** {@inheritDoc} */
     public void addNativeImage(org.apache.xmlgraphics.image.loader.Image image,
             float x, float y, float width, float height) {
-        log.debug("NYI: addNativeImage() " + "image=" + image
+        LOG.debug("NYI: addNativeImage() " + "image=" + image
                 + ",x=" + x + ",y=" + y + ",width=" + width + ",height=" + height);
     }
 
     /** {@inheritDoc} */
     public void copyArea(int x, int y, int width, int height, int dx, int dy) {
-        log.debug("copyArea() NYI: ");
+        LOG.debug("copyArea() NYI: ");
     }
 }
index a24e90cbf61dca4c4992c0d03d7dbcf99a06fba7..33d1dbf9036f3a42c87a3af7846ec114c2396d8e 100644 (file)
@@ -31,6 +31,7 @@ import java.util.Map;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
 import org.apache.fop.afp.modca.ResourceGroup;
 import org.apache.fop.afp.modca.StreamedResourceGroup;
 
@@ -39,7 +40,7 @@ import org.apache.fop.afp.modca.StreamedResourceGroup;
  */
 public class AFPStreamer implements Streamable {
     /** Static logging instance */
-    private static final Log log = LogFactory.getLog(AFPStreamer.class); // CSOK: ConstantName
+    private static final Log LOG = LogFactory.getLog(AFPStreamer.class);
 
     private static final String AFPDATASTREAM_TEMP_FILE_PREFIX = "AFPDataStream_";
 
@@ -119,7 +120,7 @@ public class AFPStreamer implements Streamable {
         if (level.isExternal()) {
             String filePath = level.getExternalFilePath();
             if (filePath == null) {
-                log.warn("No file path provided for external resource, using default.");
+                LOG.warn("No file path provided for external resource, using default.");
                 filePath = defaultResourceGroupFilePath;
             }
             resourceGroup = (ResourceGroup)pathResourceGroupMap.get(filePath);
@@ -128,7 +129,7 @@ public class AFPStreamer implements Streamable {
                 try {
                     os = new BufferedOutputStream(new FileOutputStream(filePath));
                 } catch (FileNotFoundException fnfe) {
-                    log.error("Failed to create/open external resource group file '"
+                    LOG.error("Failed to create/open external resource group file '"
                             + filePath + "'");
                 } finally {
                     if (os != null) {
index 096c2e60efd967be4b5178b259b06b59db3fa646..843e3fa65a6ccd616a5599d38ffd774a3e0d9543 100644 (file)
@@ -30,8 +30,8 @@ import java.util.Map;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import org.apache.fop.afp.fonts.AFPFontAttributes;
 import org.apache.fop.afp.fonts.AFPFont;
+import org.apache.fop.afp.fonts.AFPFontAttributes;
 import org.apache.fop.afp.fonts.CharacterSet;
 import org.apache.fop.afp.modca.AbstractPageObject;
 import org.apache.fop.afp.modca.Document;
@@ -42,10 +42,10 @@ import org.apache.fop.afp.modca.PageObject;
 import org.apache.fop.afp.modca.ResourceGroup;
 import org.apache.fop.afp.modca.TagLogicalElementBean;
 import org.apache.fop.afp.modca.triplets.FullyQualifiedNameTriplet;
-import org.apache.fop.afp.ptoca.PtocaProducer;
 import org.apache.fop.afp.ptoca.PtocaBuilder;
-import org.apache.fop.util.CharUtilities;
+import org.apache.fop.afp.ptoca.PtocaProducer;
 import org.apache.fop.fonts.Font;
+import org.apache.fop.util.CharUtilities;
 
 /**
  * A data stream is a continuous ordered stream of data elements and objects
@@ -65,8 +65,7 @@ import org.apache.fop.fonts.Font;
 public class DataStream {
 
     /** Static logging instance */
-    protected static final Log log // CSOK: ConstantName
-        = LogFactory.getLog("org.apache.xmlgraphics.afp");
+    protected static final Log LOG = LogFactory.getLog("org.apache.xmlgraphics.afp");
 
     /** Boolean completion indicator */
     private boolean complete = false;
@@ -163,7 +162,7 @@ public class DataStream {
     public void endDocument() throws IOException {
         if (complete) {
             String msg = "Invalid state - document already ended.";
-            log.warn("endDocument():: " + msg);
+            LOG.warn("endDocument():: " + msg);
             throw new IllegalStateException(msg);
         }
 
@@ -357,7 +356,7 @@ public class DataStream {
      * @param letterSpacing letter spacing to draw text with
      * @param wordSpacing word Spacing to draw text with
      * @param font is the font to draw text with
-     * @param charSet is the AFP Character Set to use with the text 
+     * @param charSet is the AFP Character Set to use with the text
      * @throws UnsupportedEncodingException thrown if character encoding is not supported
      */
     public void createText
index f29453cf5bac3f6c5cad70d7c6c3842400bb0799..ef68a22fb3d02c123cf11263ace6c57d76f782ae 100644 (file)
@@ -21,8 +21,6 @@ package org.apache.fop.afp;
 
 import java.io.OutputStream;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.fop.afp.goca.GraphicsData;
 import org.apache.fop.afp.ioca.ImageContent;
 import org.apache.fop.afp.ioca.ImageRasterData;
@@ -65,9 +63,6 @@ import org.apache.fop.afp.util.StringUtils;
  */
 public class Factory {
 
-    /** Static logging instance */
-    private static final Log log = LogFactory.getLog(Factory.class); // CSOK: ConstantName
-
     private static final String OBJECT_ENVIRONMENT_GROUP_NAME_PREFIX = "OEG";
 
     private static final String ACTIVE_ENVIRONMENT_GROUP_NAME_PREFIX = "AEG";
index 22cb52d4d440ef8ef2e8c0b567f44cecd3013c7d..7123d4138dbe4a3958a39b8f452721d50f3d0c9f 100644 (file)
@@ -21,7 +21,6 @@ package org.apache.fop.afp.fonts;
 
 import java.io.File;
 import java.io.UnsupportedEncodingException;
-import java.net.URI;
 import java.nio.ByteBuffer;
 import java.nio.CharBuffer;
 import java.nio.charset.CharacterCodingException;
index 6ad5375bfa70a437f8ef90f75845c7e88163ecd0..2a4d5d270cec154931d15b02a9206248bb50990e 100644 (file)
@@ -37,8 +37,7 @@ import org.apache.commons.logging.LogFactory;
 public class RasterFont extends AFPFont {
 
     /** Static logging instance */
-    protected static final Log log // CSOK: ConstantName
-        = LogFactory.getLog("org.apache.fop.afp.fonts");
+    protected static final Log LOG = LogFactory.getLog("org.apache.fop.afp.fonts");
 
     private final SortedMap/*<Integer,CharacterSet>*/ charSets
             = new java.util.TreeMap/*<Integer,CharacterSet>*/();
@@ -118,7 +117,7 @@ public class RasterFont extends AFPFont {
                 substitutionCharSets.put(requestedSize, csm);
                 String msg = "No " + (size / 1000f) + "pt font " + getFontName()
                     + " found, substituted with " + fontSize.intValue() / 1000f + "pt font";
-                log.warn(msg);
+                LOG.warn(msg);
             }
         }
 
@@ -126,7 +125,7 @@ public class RasterFont extends AFPFont {
             // Still no match -> error
             String msg = "No font found for font " + getFontName()
                 + " with point size " + size / 1000f;
-            log.error(msg);
+            LOG.error(msg);
             throw new FontRuntimeException(msg);
         }
 
@@ -145,7 +144,7 @@ public class RasterFont extends AFPFont {
             return csm.getFirstChar();
         } else {
             String msg = "getFirstChar() - No character set found for font:" + getFontName();
-            log.error(msg);
+            LOG.error(msg);
             throw new FontRuntimeException(msg);
         }
     }
@@ -162,7 +161,7 @@ public class RasterFont extends AFPFont {
             return csm.getLastChar();
         } else {
             String msg = "getLastChar() - No character set found for font:" + getFontName();
-            log.error(msg);
+            LOG.error(msg);
             throw new FontRuntimeException(msg);
         }
 
index 4d45b22cb2bb2c73547028bd485502b92e47963a..aba02f76cfd24df4074ea0e6cc55fe91031954d0 100644 (file)
@@ -75,7 +75,7 @@ public class GraphicsSetProcessColor extends AbstractGraphicsDrawingOrder {
         } else if (colSpaceType == ColorSpace.TYPE_RGB) {
             colspace = RGB;
         } else {
-            log.error("unsupported colorspace " + colSpaceType);
+            LOG.error("unsupported colorspace " + colSpaceType);
             colspace = RGB;
         }
 
index be92ce0b66f313c96d00945af89801166fc2c1df..4b1439da01c9776e2dfe4d72af6083be0a4d8fcd 100644 (file)
@@ -27,6 +27,7 @@ import java.util.Iterator;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
 import org.apache.fop.afp.Streamable;
 import org.apache.fop.afp.util.BinaryUtils;
 
@@ -38,8 +39,7 @@ import org.apache.fop.afp.util.BinaryUtils;
 public abstract class AbstractAFPObject implements Streamable {
 
     /** Static logging instance */
-    protected static final Log log // CSOK: ConstantName
-        = LogFactory.getLog("org.apache.xmlgraphics.afp.modca");
+    protected static final Log LOG = LogFactory.getLog("org.apache.xmlgraphics.afp.modca");
 
     /** the structured field class id */
     protected static final byte SF_CLASS = (byte)0xD3;
@@ -189,7 +189,7 @@ public abstract class AbstractAFPObject implements Streamable {
     protected String truncate(String str, int maxLength) {
         if (str.length() > maxLength) {
             str = str.substring(0, maxLength);
-            log.warn("truncated character string '"
+            LOG.warn("truncated character string '"
                      + str + "', longer than " + maxLength + " chars");
         }
         return str;
index 19f2c94a37c511640e6c6315498d082f7e83247e..d06311a471fc523e6b12fcdcb1572dc0bdd6b6d7 100644 (file)
@@ -73,7 +73,7 @@ public abstract class AbstractEnvironmentGroup extends AbstractNamedAFPObject {
                 mpo.addOverlay(name);
             } catch (MaximumSizeExceededException ex) {
                 // Should never happen (but log just in case)
-                log.error("createOverlay():: resulted in a MaximumSizeExceededException");
+                LOG.error("createOverlay():: resulted in a MaximumSizeExceededException");
             }
         }
     }
index 4e0dbc34985152dd0a447ded1fd4a093bbd0e360..b349e1f7db852eaed72bb61c7bc2a66710a60015 100644 (file)
@@ -73,7 +73,7 @@ public abstract class AbstractNamedAFPObject extends AbstractTripletStructuredOb
             name = (name + "       ").substring(0, afpNameLen);
         } else if (name.length() > afpNameLen) {
             String truncatedName = name.substring(nameLen - afpNameLen, nameLen);
-            log.warn("Constructor:: name '" + name + "'"
+            LOG.warn("Constructor:: name '" + name + "'"
                     + " truncated to " + afpNameLen + " chars"
                     + " ('" + truncatedName + "')");
             name = truncatedName;
@@ -83,7 +83,7 @@ public abstract class AbstractNamedAFPObject extends AbstractTripletStructuredOb
             nameBytes = name.getBytes(AFPConstants.EBCIDIC_ENCODING);
         } catch (UnsupportedEncodingException usee) {
             nameBytes = name.getBytes();
-            log.warn(
+            LOG.warn(
                 "Constructor:: UnsupportedEncodingException translating the name "
                 + name);
         }
index efc38f3b8d01658ccd72f7f670ea080bd6190d43..4b269086e240779e677b40bfc1ddb54f308c033d 100644 (file)
@@ -27,8 +27,6 @@ import java.util.List;
 
 import org.apache.fop.afp.modca.Registry.ObjectType;
 import org.apache.fop.afp.modca.triplets.AbstractTriplet;
-import org.apache.fop.afp.modca.triplets.AttributeQualifierTriplet;
-import org.apache.fop.afp.modca.triplets.AttributeValueTriplet;
 import org.apache.fop.afp.modca.triplets.CommentTriplet;
 import org.apache.fop.afp.modca.triplets.FullyQualifiedNameTriplet;
 import org.apache.fop.afp.modca.triplets.ObjectClassificationTriplet;
@@ -150,7 +148,7 @@ public class AbstractTripletStructuredObject extends AbstractStructuredObject {
         if (fqNameTriplet != null) {
             return fqNameTriplet.getFullyQualifiedName();
         }
-        log.warn(this + " has no fully qualified name");
+        LOG.warn(this + " has no fully qualified name");
         return null;
     }
 
index 4af687a92633d01b47584a6e121218f508e129b8..696787bc402396bb0f504a3eab1505064959c143 100644 (file)
@@ -185,7 +185,7 @@ public final class ActiveEnvironmentGroup extends AbstractEnvironmentGroup {
                 mapCodedFont.addFont(fontRef, font, size, orientation);
             } catch (MaximumSizeExceededException ex) {
                 // Should never happen (but log just in case)
-                log.error("createFont():: resulted in a MaximumSizeExceededException");
+                LOG.error("createFont():: resulted in a MaximumSizeExceededException");
             }
         }
     }
index 8d99d8eaa58d751ff4b415b95016d3a8a3fd55c4..69d8ccf3187a774ae2acdbb096c0d0acd6c8367e 100644 (file)
@@ -180,7 +180,7 @@ public class MapCodedFont extends AbstractStructuredObject {
                 if (cs == null) {
                     String msg = "Character set not found for font "
                         + font.getFontName() + " with point size " + size;
-                    log.error(msg);
+                    LOG.error(msg);
                     throw new FontRuntimeException(msg);
                 }
 
@@ -243,7 +243,7 @@ public class MapCodedFont extends AbstractStructuredObject {
             } else {
                 String msg = "Font of type " + font.getClass().getName()
                     + " not recognized.";
-                log.error(msg);
+                LOG.error(msg);
                 throw new FontRuntimeException(msg);
             }
 
index 9fd3c7059bfaf9cebbbbc3a7cf8384222baf8c85..6f5855c93809a207c58aa2aa036a2d6b6b775010 100644 (file)
@@ -69,14 +69,14 @@ public class MapPageOverlay extends AbstractAFPObject {
             throw new IllegalArgumentException("The name of overlay " + name
                 + " must be 8 characters");
         }
-        if (log.isDebugEnabled()) {
-            log.debug("addOverlay():: adding overlay " + name);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("addOverlay():: adding overlay " + name);
         }
         try {
             byte[] data = name.getBytes(AFPConstants.EBCIDIC_ENCODING);
             getOverlays().add(data);
         } catch (UnsupportedEncodingException usee) {
-            log.error("addOverlay():: UnsupportedEncodingException translating the name "
+            LOG.error("addOverlay():: UnsupportedEncodingException translating the name "
                 + name);
         }
     }
index e2afd025703dd80c559c305db53089559d736ca7..8bb7afe46fc058764ac90a758bd88565609b2640 100644 (file)
@@ -67,8 +67,8 @@ public class MapPageSegment extends AbstractAFPObject {
             throw new IllegalArgumentException("The name of page segment " + name
                 + " must not be longer than 8 characters");
         }
-        if (log.isDebugEnabled()) {
-            log.debug("addPageSegment():: adding page segment " + name);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("addPageSegment():: adding page segment " + name);
         }
         getPageSegments().add(name);
     }
@@ -124,7 +124,7 @@ public class MapPageSegment extends AbstractAFPObject {
                 byte[] nameBytes = name.getBytes(AFPConstants.EBCIDIC_ENCODING);
                 System.arraycopy(nameBytes, 0, data, pos, nameBytes.length);
             } catch (UnsupportedEncodingException usee) {
-                log.error("UnsupportedEncodingException translating the name "
+                LOG.error("UnsupportedEncodingException translating the name "
                     + name);
             }
             pos += 8;
index ad2a5d716641fc508dc79b2b3f9468c2df019934..cf00674fbdf517168b4a5708542bb96314eba048 100644 (file)
@@ -32,8 +32,7 @@ import org.apache.fop.afp.AFPLineDataInfo;
 public class LineDataInfoProducer implements PtocaProducer, PtocaConstants {
 
     /** Static logging instance */
-    private static final Log log // CSOK: ConstantName
-        = LogFactory.getLog(LineDataInfoProducer.class);
+    private static final Log LOG = LogFactory.getLog(LineDataInfoProducer.class);
 
     private AFPLineDataInfo lineDataInfo;
 
@@ -62,7 +61,7 @@ public class LineDataInfoProducer implements PtocaProducer, PtocaConstants {
         } else if (x1 == x2) {
             builder.drawBaxisRule(y2 - y1, thickness);
         } else {
-            log.error("Invalid axis rule: unable to draw line");
+            LOG.error("Invalid axis rule: unable to draw line");
             return;
         }
     }
index b8ed5159ae0e2c89bb8475329ec4949df2e70d1b..0a051e675c2dd047fe97ef1fc381fe52ca1c134d 100644 (file)
@@ -109,7 +109,7 @@ public class AFPGraphicsConfiguration extends GraphicsConfiguration {
         }
     }
 
-    private static final Log log // CSOK: ConstantName
+    private static final Log LOG
         = LogFactory.getLog(AFPGraphicsConfiguration.class);
 
     private AffineTransform defaultTransform = null;
@@ -122,7 +122,7 @@ public class AFPGraphicsConfiguration extends GraphicsConfiguration {
      * @return the default transform for the configuration
      */
     public AffineTransform getDefaultTransform() {
-        log.debug("getDefaultTransform()");
+        LOG.debug("getDefaultTransform()");
         if (defaultTransform == null) {
             defaultTransform = new AffineTransform();
         }
@@ -137,7 +137,7 @@ public class AFPGraphicsConfiguration extends GraphicsConfiguration {
      * @return the normalizing transform for the configuration
      */
     public AffineTransform getNormalizingTransform() {
-        log.debug("getNormalizingTransform()");
+        LOG.debug("getNormalizingTransform()");
         if (normalizingTransform == null) {
             normalizingTransform = new AffineTransform(2, 0, 0, 2, 0, 0);
         }
@@ -146,7 +146,7 @@ public class AFPGraphicsConfiguration extends GraphicsConfiguration {
 
     /** {@inheritDoc} */
     public GraphicsDevice getDevice() {
-        log.debug("getDevice()");
+        LOG.debug("getDevice()");
         return graphicsDevice;
     }
 }
index c0607d1bd47bd6d394fcac997f638b02f4ea94b1..829c8c58d54137fb35d6d15f4964264bb4501a1c 100644 (file)
@@ -34,8 +34,7 @@ import org.apache.commons.logging.LogFactory;
  */
 public class IDTracker {
 
-    private static final Log log // CSOK: ConstantName
-        = LogFactory.getLog(IDTracker.class);
+    private static final Log LOG = LogFactory.getLog(IDTracker.class);
 
     // HashMap of ID's whose area is located on one or more consecutive
     // PageViewports. Each ID has an arraylist of PageViewports that
@@ -59,8 +58,8 @@ public class IDTracker {
      * @param pv a page viewport that contains the area with this ID
      */
     public void associateIDWithPageViewport(String id, PageViewport pv) {
-        if (log.isDebugEnabled()) {
-            log.debug("associateIDWithPageViewport(" + id + ", " + pv + ")");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("associateIDWithPageViewport(" + id + ", " + pv + ")");
         }
         List pvList = (List) idLocations.get(id);
         if (pvList == null) { // first time ID located
@@ -93,8 +92,8 @@ public class IDTracker {
      * @param id the id of the object being processed
      */
     public void signalPendingID(String id) {
-        if (log.isDebugEnabled()) {
-            log.debug("signalPendingID(" + id + ")");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("signalPendingID(" + id + ")");
         }
         unfinishedIDs.add(id);
     }
@@ -107,8 +106,8 @@ public class IDTracker {
      * @param id the id of the formatting object which was just finished
      */
     public void signalIDProcessed(String id) {
-        if (log.isDebugEnabled()) {
-            log.debug("signalIDProcessed(" + id + ")");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("signalIDProcessed(" + id + ")");
         }
 
         alreadyResolvedIDs.add(id);
index be7c61790a26d651d354d8515eccd87a7d533313..5441d1c4fe4351b327f1c611359a090d692ca858 100644 (file)
@@ -46,8 +46,7 @@ public final class EventModelParser {
     }
 
     /** Logger instance */
-    private static final Log log // CSOK: ConstantName
-        = LogFactory.getLog(EventModelParser.class);
+    private static final Log LOG = LogFactory.getLog(EventModelParser.class);
 
     private static SAXTransformerFactory tFactory
         = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
@@ -61,7 +60,7 @@ public final class EventModelParser {
     public static EventModel parse(Source src)
             throws TransformerException {
         Transformer transformer = tFactory.newTransformer();
-        transformer.setErrorListener(new DefaultErrorListener(log));
+        transformer.setErrorListener(new DefaultErrorListener(LOG));
 
         EventModel model = new EventModel();
         SAXResult res = new SAXResult(getContentHandler(model));
index 238a4ced6f8d6a403a0f747da34471be59dd3d08..e280af2d7d8b0ebd4185f4a628a157c4ec8ff354 100644 (file)
@@ -40,11 +40,10 @@ import org.apache.fop.fo.flow.PageNumberCitation;
 import org.apache.fop.fo.flow.PageNumberCitationLast;
 import org.apache.fop.fo.flow.table.Table;
 import org.apache.fop.fo.flow.table.TableBody;
-import org.apache.fop.fo.flow.table.TableFooter;
-import org.apache.fop.fo.flow.table.TableHeader;
-import org.apache.fop.fo.flow.table.TablePart;
 import org.apache.fop.fo.flow.table.TableCell;
 import org.apache.fop.fo.flow.table.TableColumn;
+import org.apache.fop.fo.flow.table.TableFooter;
+import org.apache.fop.fo.flow.table.TableHeader;
 import org.apache.fop.fo.flow.table.TableRow;
 import org.apache.fop.fo.pagination.Flow;
 import org.apache.fop.fo.pagination.PageSequence;
index 244013c4d4b12cb26fd02d11b055f252afb01699..cb265b00807e17a093ae44e54e3254647cae73a6 100644 (file)
@@ -44,7 +44,7 @@ import org.apache.fop.fo.properties.PropertyMaker;
 public abstract class FObj extends FONode implements Constants {
 
     /** the list of property makers */
-    private static final PropertyMaker[] propertyListTable // CSOK: ConstantName
+    private static final PropertyMaker[] PROPERTY_LIST_TABLE
                             = FOPropertyMapping.getGenericMappings();
 
     /**
@@ -108,7 +108,7 @@ public abstract class FObj extends FONode implements Constants {
      * @return the requested Property Maker
      */
     public static PropertyMaker getPropertyMakerFor(int propId) {
-        return propertyListTable[propId];
+        return PROPERTY_LIST_TABLE[propId];
     }
 
     /** {@inheritDoc} */
index 32d0d745c6c5ce9b141be28ab86ab2059dd7e223..a12bed0fa8e4dca15a2ce6589e3df4f5857c47a4 100644 (file)
@@ -37,18 +37,18 @@ public class ExtensionElementMapping extends ElementMapping {
     /** The FOP extension namespace URI */
     public static final String URI = "http://xmlgraphics.apache.org/fop/extensions";
 
-    private static final Set propertyAttributes // CSOK: ConstantName
+    private static final Set PROPERTY_ATTRIBUTES
         = new java.util.HashSet();
 
     static {
         //These are FOP's standard extension properties (fox:*)
-        propertyAttributes.add("block-progression-unit");
-        propertyAttributes.add("widow-content-limit");
-        propertyAttributes.add("orphan-content-limit");
-        propertyAttributes.add("internal-destination");
-        propertyAttributes.add("disable-column-balancing");
+        PROPERTY_ATTRIBUTES.add("block-progression-unit");
+        PROPERTY_ATTRIBUTES.add("widow-content-limit");
+        PROPERTY_ATTRIBUTES.add("orphan-content-limit");
+        PROPERTY_ATTRIBUTES.add("internal-destination");
+        PROPERTY_ATTRIBUTES.add("disable-column-balancing");
         //These are FOP's extension properties for accessibility
-        propertyAttributes.add("alt-text");
+        PROPERTY_ATTRIBUTES.add("alt-text");
     }
 
     /**
@@ -93,7 +93,7 @@ public class ExtensionElementMapping extends ElementMapping {
         if (!URI.equals(attributeName.getNamespaceURI())) {
             throw new IllegalArgumentException("The namespace URIs don't match");
         }
-        return propertyAttributes.contains(attributeName.getLocalName());
+        return PROPERTY_ATTRIBUTES.contains(attributeName.getLocalName());
     }
 
 }
index e23a13f338558f1af846b8b6dd091267302ada3b..d8f69af287733d6b957b33db073074ad584b38e2 100644 (file)
@@ -19,7 +19,6 @@
 
 package org.apache.fop.fo.flow;
 
-import java.util.Collections;
 import java.util.Map;
 
 import org.xml.sax.Attributes;
index 6f94418be4f0e6e77cabdc907a841f3b66cb6879..ea449cdff0927c29109162f6d4d0ed1e38dead1e 100644 (file)
@@ -31,7 +31,6 @@ import org.apache.fop.fo.FONode;
 import org.apache.fop.fo.FObj;
 import org.apache.fop.fo.PropertyList;
 import org.apache.fop.fo.ValidationException;
-import org.apache.fop.fo.expr.PropertyException;
 import org.apache.fop.fo.properties.CommonBorderPaddingBackground;
 
 /**
index 71b70ebee072dab23554a204d0ee2f0763b3613b..5fef57a8b2dd7e23a2be65293ec222b35b2f8bed 100644 (file)
@@ -51,7 +51,7 @@ public final class CharacterProperty extends Property {
     }
 
     /** cache containing all canonical CharacterProperty instances */
-    private static final PropertyCache cache // CSOK: ConstantName
+    private static final PropertyCache CACHE
         = new PropertyCache(CharacterProperty.class);
 
     private final char character;
@@ -69,7 +69,7 @@ public final class CharacterProperty extends Property {
      * @return the character property instance
      */
     public static CharacterProperty getInstance(char character) {
-        return (CharacterProperty) cache.fetch(
+        return (CharacterProperty) CACHE.fetch(
                         new CharacterProperty(character));
     }
 
index 95725f3e8d0bc97db08dacd8f3e1801c76ea78f8..e7b8d59312b1c83e413bb653d600dbebf215d1e4 100644 (file)
@@ -33,7 +33,7 @@ import org.apache.fop.util.ColorUtil;
 public final class ColorProperty extends Property  {
 
     /** cache holding canonical ColorProperty instances */
-    private static final PropertyCache cache // CSOK: ConstantName
+    private static final PropertyCache CACHE
         = new PropertyCache(ColorProperty.class);
 
     /**
@@ -103,7 +103,7 @@ public final class ColorProperty extends Property  {
         ColorProperty instance = new ColorProperty(
                                        ColorUtil.parseColorString(
                                                foUserAgent, value));
-        return (ColorProperty)cache.fetch(instance);
+        return (ColorProperty)CACHE.fetch(instance);
     }
 
     /**
index b3ae7d8cd314fc54ee2c03769fa8270f78edb079..d39dc24f075b6c9d7b5013308195fa10402bda23 100644 (file)
@@ -48,7 +48,7 @@ public class CommonBorderPaddingBackground {                    // CSOK: FinalCl
      *  cache holding all canonical instances
      *  (w/ absolute background-position-* and padding-*)
      */
-    private static final PropertyCache cache                    // CSOK: ConstantName
+    private static final PropertyCache CACHE
         = new PropertyCache(CommonBorderPaddingBackground.class);
 
     private int hash = -1;
@@ -102,7 +102,7 @@ public class CommonBorderPaddingBackground {                    // CSOK: FinalCl
     public static final class BorderInfo {
 
         /** cache holding all canonical instances */
-        private static final PropertyCache cache                // CSOK: ConstantName
+        private static final PropertyCache CACHE
             = new PropertyCache(BorderInfo.class);
 
         private int mStyle; // Enum for border style
@@ -129,7 +129,7 @@ public class CommonBorderPaddingBackground {                    // CSOK: FinalCl
          * @return a cached BorderInfo instance
          */
         public static BorderInfo getInstance(int style, CondLengthProperty width, Color color) {
-            return cache.fetch(new BorderInfo(style, width, color));
+            return CACHE.fetch(new BorderInfo(style, width, color));
         }
 
         /**
@@ -214,7 +214,7 @@ public class CommonBorderPaddingBackground {                    // CSOK: FinalCl
      * A border info with style "none". Used as a singleton, in the collapsing-border model,
      * for elements which don't specify any border on some of their sides.
      */
-    private static final BorderInfo defaultBorderInfo           // CSOK: ConstantName        
+    private static final BorderInfo DEFAULT_BORDER_INFO
             = BorderInfo.getInstance(Constants.EN_NONE, new ConditionalNullLength(), null);
 
     /**
@@ -276,7 +276,7 @@ public class CommonBorderPaddingBackground {                    // CSOK: FinalCl
      * @return a BorderInfo instance with style set to {@link Constants#EN_NONE}
      */
     public static BorderInfo getDefaultBorderInfo() {
-        return defaultBorderInfo;
+        return DEFAULT_BORDER_INFO;
     }
 
     private BorderInfo[] borderInfo = new BorderInfo[4];
@@ -366,7 +366,7 @@ public class CommonBorderPaddingBackground {                    // CSOK: FinalCl
                     || newInstance.backgroundPositionHorizontal.isAbsolute())
                 && (newInstance.backgroundPositionVertical == null
                     || newInstance.backgroundPositionVertical.isAbsolute())) {
-            cachedInstance = cache.fetch(newInstance);
+            cachedInstance = CACHE.fetch(newInstance);
         }
 
         /* for non-cached, or not-yet-cached instances, preload the image */
index f3f7d3f69c0d6ebca5eb57b0efa967e7af4baaf9..b12f84ad2a642bdfd5fd0d669d34d01914c418c4 100644 (file)
@@ -37,7 +37,7 @@ public final class CommonFont {
 
     /** cache holding canonical CommonFont instances (only those with
      *  absolute font-size and font-size-adjust) */
-    private static final PropertyCache cache                    // CSOK: ConstantName
+    private static final PropertyCache CACHE
         = new PropertyCache(CommonFont.class);
 
     /** hashcode of this instance */
@@ -129,7 +129,7 @@ public final class CommonFont {
                                                fontSize,
                                                fontSizeAdjust);
 
-        return cache.fetch(commonFont);
+        return CACHE.fetch(commonFont);
     }
 
     /** @return an array with the font-family names */
index c65b5b6163a3f6cc0097cfc64ea13d112c36fc7f..65b2cebbdb628c27cbc0112c2ff51543151f8a26 100644 (file)
@@ -36,11 +36,9 @@ import org.apache.fop.fonts.Typeface;
 public final class CommonHyphenation {
 
     /** Logger */
-    private static final Log log                                // CSOK: ConstantName
-        = LogFactory.getLog(CommonHyphenation.class);
+    private static final Log LOG = LogFactory.getLog(CommonHyphenation.class);
 
-    private static final PropertyCache cache                    // CSOK: ConstantName
-        = new PropertyCache(CommonHyphenation.class);
+    private static final PropertyCache CACHE = new PropertyCache(CommonHyphenation.class);
 
     private int hash = 0;
 
@@ -119,7 +117,7 @@ public final class CommonHyphenation {
                                 hyphenationPushCharacterCount,
                                 hyphenationRemainCharacterCount);
 
-        return cache.fetch(instance);
+        return CACHE.fetch(instance);
 
     }
 
@@ -168,7 +166,7 @@ public final class CommonHyphenation {
             }
         }
         if (warn) {
-            log.warn("Substituted specified hyphenation character (0x"
+            LOG.warn("Substituted specified hyphenation character (0x"
                     + Integer.toHexString(hyphChar)
                     + ") with 0x" + Integer.toHexString(effHyphChar)
                     + " because the font doesn't have the specified hyphenation character: "
index dc7d80c39a66c5497c9137616969865676b55883..1ab7ec3adf85e5922597f414a32102e3ca08bf8c 100644 (file)
@@ -33,7 +33,7 @@ import org.apache.fop.fo.expr.PropertyException;
 public class CondLengthProperty extends Property implements CompoundDatatype {
 
     /** cache holding canonical instances (for absolute conditional lengths) */
-    private static final PropertyCache cache                    // CSOK: ConstantName
+    private static final PropertyCache CACHE
         = new PropertyCache(CondLengthProperty.class);
 
     /** components */
@@ -159,7 +159,7 @@ public class CondLengthProperty extends Property implements CompoundDatatype {
      */
     public CondLengthProperty getCondLength() {
         if (this.length.getLength().isAbsolute()) {
-            CondLengthProperty clp = (CondLengthProperty) cache.fetch(this);
+            CondLengthProperty clp = (CondLengthProperty) CACHE.fetch(this);
             if (clp == this) {
                 isCached = true;
             }
index 18c6f09a66749a69288aad63e83bad7e203963be..6183b9e56c9850307bb41998dac4a76b2232d631 100644 (file)
 
 package org.apache.fop.fo.properties;
 
-import org.apache.fop.apps.FOPException;
 import org.apache.fop.fo.FObj;
 import org.apache.fop.fo.PropertyList;
 import org.apache.fop.fo.expr.PropertyException;
 
 /**
+ * Maker class for handling corresponding properties.
  */
 public class CorrespondingPropertyMaker {
     /** base property maker */
index 6a2879479cb99b6be1044d19f264cda12946116a..153a716df53f72cd95c3b32b15049d601d7b1039 100644 (file)
@@ -29,7 +29,7 @@ import org.apache.fop.fo.expr.PropertyException;
 public final class EnumNumber extends Property implements Numeric {
 
     /** cache holding all canonical EnumNumber instances */
-    private static final PropertyCache cache                    // CSOK: ConstantName
+    private static final PropertyCache CACHE
         = new PropertyCache(EnumNumber.class);
 
     private final EnumProperty enumProperty;
@@ -50,7 +50,7 @@ public final class EnumNumber extends Property implements Numeric {
      * @return  the canonical instance
      */
     public static EnumNumber getInstance(Property enumProperty) {
-        return (EnumNumber)cache.fetch(
+        return (EnumNumber)CACHE.fetch(
                 new EnumNumber((EnumProperty) enumProperty));
     }
 
index db26cfdc6136d176e05462eba26314c2c11a6c16..ae704f1c95deece742b2d82309e602c02da7a2cd 100644 (file)
@@ -29,7 +29,7 @@ import org.apache.fop.fo.expr.PropertyException;
 public final class EnumProperty extends Property {
 
     /** cache holding all canonical EnumProperty instances */
-    private static final PropertyCache cache                    // CSOK: ConstantName
+    private static final PropertyCache CACHE
         = new PropertyCache(EnumProperty.class);
 
     /**
@@ -93,7 +93,7 @@ public final class EnumProperty extends Property {
      * @return an enumeration property
      */
     public static EnumProperty getInstance(int explicitValue, String text) {
-        return (EnumProperty) cache.fetch(
+        return (EnumProperty) CACHE.fetch(
                         new EnumProperty(explicitValue, text));
     }
 
index cc4d04c69e7ee98b7dde8a4b8dc3a6074ce8fb12..c35c6f6c9e8e343dc0d150ea28161995c70efb6c 100644 (file)
@@ -45,7 +45,7 @@ public final class FixedLength extends LengthProperty {
     public static final String MPT = "mpt";
 
     /** cache holding all canonical FixedLength instances */
-    private static final PropertyCache cache                    // CSOK: ConstantName
+    private static final PropertyCache CACHE
         = new PropertyCache(FixedLength.class);
 
     /** canonical zero-length instance */
@@ -82,7 +82,7 @@ public final class FixedLength extends LengthProperty {
         if (numUnits == 0.0) {
             return ZERO_FIXED_LENGTH;
         } else {
-            return (FixedLength)cache.fetch(
+            return (FixedLength)CACHE.fetch(
                 new FixedLength(numUnits, units, sourceResolution));
         }
 
index 5b05aa9595a2986fed4f60a0427e2c507d814c17..330101ee78892b6a7dcbf31359aec3829862f1b9 100644 (file)
@@ -31,7 +31,7 @@ import org.apache.fop.fo.expr.PropertyException;
 public final class FontFamilyProperty extends ListProperty {
 
     /** cache holding all canonical FontFamilyProperty instances */
-    private static final PropertyCache cache                    // CSOK: ConstantName
+    private static final PropertyCache CACHE
         = new PropertyCache(FontFamilyProperty.class);
 
     private int hash = 0;
@@ -95,7 +95,7 @@ public final class FontFamilyProperty extends ListProperty {
                         prop.addProperty(StringProperty.getInstance(tmpVal));
                     }
                 }
-                return cache.fetch(prop);
+                return CACHE.fetch(prop);
             }
         }
 
index 7c5b6124f15565e100d26c87e7e2b4d9633699d8..0bc44e4596ec961258a6c48e65e9e7c48070ccc4 100644 (file)
@@ -30,7 +30,7 @@ import org.apache.fop.fo.expr.PropertyException;
 public final class KeepProperty extends Property implements CompoundDatatype {
 
     /** class holding all canonical KeepProperty instances*/
-    private static final PropertyCache cache                    // CSOK: ConstantName
+    private static final PropertyCache CACHE
         = new PropertyCache(KeepProperty.class);
 
     private boolean isCachedValue = false;
@@ -165,7 +165,7 @@ public final class KeepProperty extends Property implements CompoundDatatype {
      *          this property
      */
     public KeepProperty getKeep() {
-        KeepProperty keep = (KeepProperty) cache.fetch(this);
+        KeepProperty keep = (KeepProperty) CACHE.fetch(this);
         /* make sure setComponent() can never alter cached values */
         keep.isCachedValue = true;
         return keep;
index d54161b8d0c471a418b76e969896cfd4bff8eefd..97844d723171675ef6695c8273a03ebf0c768d57 100644 (file)
@@ -106,7 +106,7 @@ public final class NumberProperty extends Property implements Numeric {
     }
 
     /** cache holding all canonical NumberProperty instances */
-    private static final PropertyCache cache                    // CSOK: ConstantName
+    private static final PropertyCache CACHE
         = new PropertyCache(NumberProperty.class);
 
     private final Number number;
@@ -144,7 +144,7 @@ public final class NumberProperty extends Property implements Numeric {
      * @return  the canonical NumberProperty
      */
     public static NumberProperty getInstance(Double num) {
-        return (NumberProperty)cache.fetch(
+        return (NumberProperty)CACHE.fetch(
                     new NumberProperty(num.doubleValue()));
     }
 
@@ -155,7 +155,7 @@ public final class NumberProperty extends Property implements Numeric {
      * @return  the canonical NumberProperty
      */
     public static NumberProperty getInstance(Integer num) {
-        return (NumberProperty)cache.fetch(
+        return (NumberProperty)CACHE.fetch(
                     new NumberProperty(num.intValue()));
     }
 
@@ -166,7 +166,7 @@ public final class NumberProperty extends Property implements Numeric {
      * @return  the canonical NumberProperty
      */
     public static NumberProperty getInstance(double num) {
-        return (NumberProperty)cache.fetch(
+        return (NumberProperty)CACHE.fetch(
                     new NumberProperty(num));
     }
 
@@ -177,7 +177,7 @@ public final class NumberProperty extends Property implements Numeric {
      * @return  the canonical NumberProperty
      */
     public static NumberProperty getInstance(int num) {
-        return (NumberProperty)cache.fetch(
+        return (NumberProperty)CACHE.fetch(
                     new NumberProperty(num));
     }
 
index ab4544c0abae6218569bda00b0c37fa4c9f0cea5..9bbe33070d9945a1d506167552603e9f020b0443 100644 (file)
@@ -21,11 +21,6 @@ package org.apache.fop.fo.properties;
 
 import org.apache.fop.fo.FObj;
 import org.apache.fop.fo.PropertyList;
-import org.apache.fop.fo.FOValidationEventProducer;
-import org.apache.fop.fo.ValidationException;
-import org.apache.fop.fo.expr.PropertyException;
-
-import java.util.Set;
 
 /**
  * Exists primarily as a container for its Maker inner class, which is
@@ -83,7 +78,7 @@ public final class StringProperty extends Property {
     }
 
     /** cache containing all canonical StringProperty instances */
-    private static final PropertyCache cache                    // CSOK: ConstantName
+    private static final PropertyCache CACHE
         = new PropertyCache(StringProperty.class);
 
     /** canonical instance for empty strings */
@@ -109,7 +104,7 @@ public final class StringProperty extends Property {
         if ("".equals(str) || str == null) {
             return EMPTY_STRING_PROPERTY;
         } else {
-            return (StringProperty)cache.fetch(
+            return (StringProperty)CACHE.fetch(
                        new StringProperty(str));
         }
     }
index 7ceef5a9c75772a3fd273abd27eb12815c155bed..1f49f7bb5a522843e62852a037fa11ceb0cc1a8f 100644 (file)
@@ -25,8 +25,6 @@ import java.util.List;
 import javax.xml.transform.Source;
 import javax.xml.transform.stream.StreamSource;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.fop.fonts.base14.Courier;
 import org.apache.fop.fonts.base14.CourierBold;
 import org.apache.fop.fonts.base14.CourierBoldOblique;
@@ -56,12 +54,6 @@ public final class FontSetup {
     private FontSetup() {
     }
 
-    /**
-     * logging instance
-     */
-    private static Log log                                      // CSOK: ConstantName
-        = LogFactory.getLog(FontSetup.class);
-
     /**
      * Sets up a font info
      * @param fontInfo font info
index a6fbdd49ca51fe4a856966073634b2ad3ab7a1b6..b8bbc0c6c7fa6dc7b9dd802fc8ce556e4000c058 100644 (file)
@@ -21,6 +21,7 @@ package org.apache.fop.layoutmgr;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
 import org.apache.fop.fo.Constants;
 import org.apache.fop.traits.MinOptMax;
 
@@ -30,8 +31,7 @@ import org.apache.fop.traits.MinOptMax;
  */
 public class BalancingColumnBreakingAlgorithm extends PageBreakingAlgorithm {
 
-    private static final Log log                                // CSOK: ConstantName
-        = LogFactory.getLog(BalancingColumnBreakingAlgorithm.class);
+    private static final Log LOG = LogFactory.getLog(BalancingColumnBreakingAlgorithm.class);
 
     private int columnCount;
     private int fullLen;
@@ -74,8 +74,8 @@ public class BalancingColumnBreakingAlgorithm extends PageBreakingAlgorithm {
     protected double computeDemerits(KnuthNode activeNode,
             KnuthElement element, int fitnessClass, double r) {
         double dem = super.computeDemerits(activeNode, element, fitnessClass, r);
-        if (log.isTraceEnabled()) {
-            log.trace("original demerit=" + dem + " " + totalWidth
+        if (LOG.isTraceEnabled()) {
+            LOG.trace("original demerit=" + dem + " " + totalWidth
                     + " line=" + activeNode.line + "/" + columnCount
                     + " pos=" + activeNode.position + "/" + (par.size() - 1));
         }
@@ -91,13 +91,13 @@ public class BalancingColumnBreakingAlgorithm extends PageBreakingAlgorithm {
         if (remParts > 0) {
             avgRestLen = restLen / remParts;
         }
-        if (log.isTraceEnabled()) {
-            log.trace("remaining parts: " + remParts + " rest len: " + restLen
+        if (LOG.isTraceEnabled()) {
+            LOG.trace("remaining parts: " + remParts + " rest len: " + restLen
                     + " avg=" + avgRestLen);
         }
         double balance = (idealPartLen - partLen) / 1000f;
-        if (log.isTraceEnabled()) {
-            log.trace("balance=" + balance);
+        if (LOG.isTraceEnabled()) {
+            LOG.trace("balance=" + balance);
         }
         double absBalance = Math.abs(balance);
         dem = absBalance;
@@ -120,8 +120,8 @@ public class BalancingColumnBreakingAlgorithm extends PageBreakingAlgorithm {
             //We don't want more columns than available
             dem = Double.MAX_VALUE;
         }
-        if (log.isTraceEnabled()) {
-            log.trace("effective dem=" + dem + " " + totalWidth);
+        if (LOG.isTraceEnabled()) {
+            LOG.trace("effective dem=" + dem + " " + totalWidth);
         }
         return dem;
     }
index 1a31f8d49582e1238e2ec067c78fb2c2b8257c08..2acf67c1f72012942f8b9016b4429e4f1cfba57a 100644 (file)
@@ -67,14 +67,12 @@ import org.apache.fop.fo.pagination.SideRegion;
 import org.apache.fop.fo.pagination.StaticContent;
 import org.apache.fop.fo.pagination.Title;
 import org.apache.fop.layoutmgr.inline.BasicLinkLayoutManager;
-import org.apache.fop.layoutmgr.inline.BidiLayoutManager;
 import org.apache.fop.layoutmgr.inline.CharacterLayoutManager;
 import org.apache.fop.layoutmgr.inline.ContentLayoutManager;
 import org.apache.fop.layoutmgr.inline.ExternalGraphicLayoutManager;
 import org.apache.fop.layoutmgr.inline.FootnoteLayoutManager;
 import org.apache.fop.layoutmgr.inline.ICLayoutManager;
 import org.apache.fop.layoutmgr.inline.InlineLayoutManager;
-import org.apache.fop.layoutmgr.inline.InlineLevelLayoutManager;
 import org.apache.fop.layoutmgr.inline.InstreamForeignObjectLM;
 import org.apache.fop.layoutmgr.inline.LeaderLayoutManager;
 import org.apache.fop.layoutmgr.inline.PageNumberCitationLastLayoutManager;
@@ -93,8 +91,7 @@ import org.apache.fop.util.CharUtilities;
 public class LayoutManagerMapping implements LayoutManagerMaker {
 
     /** logging instance */
-    private static final Log log                                // CSOK: ConstantName
-        = LogFactory.getLog(LayoutManagerMapping.class);
+    private static final Log LOG = LogFactory.getLog(LayoutManagerMapping.class);
 
     /** The map of LayoutManagerMakers */
     private Map makers = new HashMap();
@@ -159,10 +156,10 @@ public class LayoutManagerMapping implements LayoutManagerMaker {
         Maker maker = (Maker) makers.get(node.getClass());
         if (maker == null) {
             if (FOElementMapping.URI.equals(node.getNamespaceURI())) {
-                log.error("No LayoutManager maker for class " + node.getClass());
+                LOG.error("No LayoutManager maker for class " + node.getClass());
             } else {
-                if (log.isDebugEnabled()) {
-                    log.debug("Skipping the creation of a layout manager for " + node.getClass());
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Skipping the creation of a layout manager for " + node.getClass());
                 }
             }
         } else {
index c49bb2d9ac5bda14cd4ae0b3ba4a12aad825a04f..6890d4ebcfb8adc2ae693fd944970744df668ecb 100644 (file)
@@ -35,8 +35,7 @@ import org.apache.fop.traits.MinOptMax;
 public final class SpaceResolver {
 
     /** Logger instance */
-    private static final Log log                                // CSOK: ConstantName
-        = LogFactory.getLog(SpaceResolver.class);
+    private static final Log LOG = LogFactory.getLog(SpaceResolver.class);
 
     private UnresolvedListElementWithLength[] firstPart;
     private BreakElement breakPoss;
@@ -94,25 +93,25 @@ public final class SpaceResolver {
         //Add pending elements from higher level FOs
         if (breakPoss != null) {
             if (breakPoss.getPendingAfterMarks() != null) {
-                if (log.isTraceEnabled()) {
-                    log.trace("    adding pending before break: "
+                if (LOG.isTraceEnabled()) {
+                    LOG.trace("    adding pending before break: "
                             + breakPoss.getPendingAfterMarks());
                 }
                 first.addAll(0, breakPoss.getPendingAfterMarks());
             }
             if (breakPoss.getPendingBeforeMarks() != null) {
-                if (log.isTraceEnabled()) {
-                    log.trace("    adding pending after break: "
+                if (LOG.isTraceEnabled()) {
+                    LOG.trace("    adding pending after break: "
                             + breakPoss.getPendingBeforeMarks());
                 }
                 second.addAll(0, breakPoss.getPendingBeforeMarks());
             }
         }
-        if (log.isTraceEnabled()) {
-            log.trace("before: " + first);
-            log.trace("  break: " + breakPoss);
-            log.trace("after: " + second);
-            log.trace("NO-BREAK: " + toString(noBreak, noBreakLengths));
+        if (LOG.isTraceEnabled()) {
+            LOG.trace("before: " + first);
+            LOG.trace("  break: " + breakPoss);
+            LOG.trace("after: " + second);
+            LOG.trace("NO-BREAK: " + toString(noBreak, noBreakLengths));
         }
 
         if (first != null) {
@@ -164,15 +163,15 @@ public final class SpaceResolver {
             if (elems[effIndex] instanceof BorderOrPaddingElement) {
                 BorderOrPaddingElement bop = (BorderOrPaddingElement)elems[effIndex];
                 if (bop.isConditional() && !(bop.isFirst() || bop.isLast())) {
-                    if (log.isDebugEnabled()) {
-                        log.debug("Nulling conditional element: " + bop);
+                    if (LOG.isDebugEnabled()) {
+                        LOG.debug("Nulling conditional element: " + bop);
                     }
                     lengths[effIndex] = null;
                 }
             }
         }
-        if (log.isTraceEnabled() && elems.length > 0) {
-            log.trace("-->Resulting list: " + toString(elems, lengths));
+        if (LOG.isTraceEnabled() && elems.length > 0) {
+            LOG.trace("-->Resulting list: " + toString(elems, lengths));
         }
     }
 
@@ -194,20 +193,20 @@ public final class SpaceResolver {
             } else if (!elems[effIndex].isConditional()) {
                 break;
             }
-            if (log.isDebugEnabled()) {
-                log.debug("Nulling conditional element using 4.3.1, rule 1: " + elems[effIndex]);
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("Nulling conditional element using 4.3.1, rule 1: " + elems[effIndex]);
             }
             lengths[effIndex] = null;
         }
-        if (log.isTraceEnabled() && elems.length > 0) {
-            log.trace("-->Resulting list: " + toString(elems, lengths));
+        if (LOG.isTraceEnabled() && elems.length > 0) {
+            LOG.trace("-->Resulting list: " + toString(elems, lengths));
         }
     }
 
     private void performSpaceResolutionRules2to3(UnresolvedListElement[] elems,
             MinOptMax[] lengths, int start, int end) {
-        if (log.isTraceEnabled()) {
-            log.trace("rule 2-3: " + start + "-" + end);
+        if (LOG.isTraceEnabled()) {
+            LOG.trace("rule 2-3: " + start + "-" + end);
         }
         SpaceElement space;
         int remaining;
@@ -236,8 +235,8 @@ public final class SpaceResolver {
                 }
                 space = (SpaceElement)elems[i];
                 if (!space.isForcing()) {
-                    if (log.isDebugEnabled()) {
-                        log.debug("Nulling non-forcing space-specifier using 4.3.1, rule 2: "
+                    if (LOG.isDebugEnabled()) {
+                        LOG.debug("Nulling non-forcing space-specifier using 4.3.1, rule 2: "
                                 + elems[i]);
                     }
                     lengths[i] = null;
@@ -256,8 +255,8 @@ public final class SpaceResolver {
             space = (SpaceElement)elems[i];
             highestPrecedence = Math.max(highestPrecedence, space.getPrecedence());
         }
-        if (highestPrecedence != 0 && log.isDebugEnabled()) {
-            log.debug("Highest precedence is " + highestPrecedence);
+        if (highestPrecedence != 0 && LOG.isDebugEnabled()) {
+            LOG.debug("Highest precedence is " + highestPrecedence);
         }
         //Suppress space-specifiers with lower precedence
         remaining = 0;
@@ -268,8 +267,8 @@ public final class SpaceResolver {
             }
             space = (SpaceElement)elems[i];
             if (space.getPrecedence() != highestPrecedence) {
-                if (log.isDebugEnabled()) {
-                    log.debug("Nulling space-specifier with precedence "
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Nulling space-specifier with precedence "
                             + space.getPrecedence() + " using 4.3.1, rule 3: "
                             + elems[i]);
                 }
@@ -279,8 +278,8 @@ public final class SpaceResolver {
                 remaining++;
             }
         }
-        if (log.isDebugEnabled()) {
-            log.debug("Greatest optimum: " + greatestOptimum);
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Greatest optimum: " + greatestOptimum);
         }
         if (remaining <= 1) {
             return;
@@ -293,8 +292,8 @@ public final class SpaceResolver {
             }
             space = (SpaceElement)elems[i];
             if (space.getLength().getOpt() < greatestOptimum) {
-                if (log.isDebugEnabled()) {
-                    log.debug("Nulling space-specifier with smaller optimum length "
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Nulling space-specifier with smaller optimum length "
                             + "using 4.3.1, rule 3: "
                             + elems[i]);
                 }
@@ -317,8 +316,8 @@ public final class SpaceResolver {
             min = Math.max(min, space.getLength().getMin());
             max = Math.min(max, space.getLength().getMax());
             if (remaining > 1) {
-                if (log.isDebugEnabled()) {
-                    log.debug("Nulling non-last space-specifier using 4.3.1, rule 3, second part: "
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Nulling non-last space-specifier using 4.3.1, rule 3, second part: "
                             + elems[i]);
                 }
                 lengths[i] = null;
@@ -328,9 +327,9 @@ public final class SpaceResolver {
             }
         }
 
-        if (log.isTraceEnabled() && elems.length > 0) {
-            log.trace("Remaining spaces: " + remaining);
-            log.trace("-->Resulting list: " + toString(elems, lengths));
+        if (LOG.isTraceEnabled() && elems.length > 0) {
+            LOG.trace("Remaining spaces: " + remaining);
+            LOG.trace("-->Resulting list: " + toString(elems, lengths));
         }
     }
 
@@ -390,7 +389,7 @@ public final class SpaceResolver {
             if (hasFirstPart()) {
                 //Now that we've handled isFirst/isLast conditions, we need to look at the
                 //active part in its normal order so swap it back.
-                log.trace("Swapping first and second parts.");
+                LOG.trace("Swapping first and second parts.");
                 UnresolvedListElementWithLength[] tempList;
                 MinOptMax[] tempLengths;
                 tempList = secondPart;
@@ -598,8 +597,8 @@ public final class SpaceResolver {
      * @param elems the element list
      */
     public static void resolveElementList(List elems) {
-        if (log.isTraceEnabled()) {
-            log.trace(elems);
+        if (LOG.isTraceEnabled()) {
+            LOG.trace(elems);
         }
         boolean first = true;
         boolean last = false;
@@ -611,8 +610,8 @@ public final class SpaceResolver {
         while (iter.hasNext()) {
             ListElement el = (ListElement)iter.next();
             if (el.isUnresolvedElement()) {
-                if (log.isTraceEnabled()) {
-                    log.trace("unresolved found: " + el + " " + first + "/" + last);
+                if (LOG.isTraceEnabled()) {
+                    LOG.trace("unresolved found: " + el + " " + first + "/" + last);
                 }
                 BreakElement breakPoss = null;
                 //Clear temp lists
@@ -649,7 +648,7 @@ public final class SpaceResolver {
                 }
                 //last = !iter.hasNext();
                 if (breakPoss == null && unresolvedSecond.size() == 0 && !last) {
-                    log.trace("Swap first and second parts in no-break condition,"
+                    LOG.trace("Swap first and second parts in no-break condition,"
                             + " second part is empty.");
                     //The first list is reversed, so swap if this shouldn't happen
                     List swapList = unresolvedSecond;
@@ -657,7 +656,7 @@ public final class SpaceResolver {
                     unresolvedFirst = swapList;
                 }
 
-                log.debug("----start space resolution (first=" + first + ", last=" + last + ")...");
+                LOG.debug("----start space resolution (first=" + first + ", last=" + last + ")...");
                 SpaceResolver resolver = new SpaceResolver(
                         unresolvedFirst, breakPoss, unresolvedSecond, first, last);
                 if (!last) {
@@ -667,7 +666,7 @@ public final class SpaceResolver {
                 if (!last && skipNextElement) {
                     iter.next();
                 }
-                log.debug("----end space resolution.");
+                LOG.debug("----end space resolution.");
             }
             first = false;
         }
index 8008501775da4c4e1420642e8700b1742f4401ba..6039ad941a88a5ad0810b62c801ff1773eff87ef 100644 (file)
@@ -45,8 +45,7 @@ public final class TraitSetter {
     }
 
     /** logger */
-    private static final Log log                                 // CSOK: ConstantName
-        = LogFactory.getLog(TraitSetter.class);
+    private static final Log LOG = LogFactory.getLog(TraitSetter.class);
 
     /**
      * Sets border and padding traits on areas.
@@ -343,7 +342,7 @@ public final class TraitSetter {
                                 + backProps.backgroundPositionHorizontal.getValue(refContext));
                     } else {
                         // TODO Area IPD has to be set for this to work
-                        log.warn("Horizontal background image positioning ignored"
+                        LOG.warn("Horizontal background image positioning ignored"
                                 + " because the IPD was not set on the area."
                                 + " (Yes, it's a bug in FOP)");
                     }
@@ -360,7 +359,7 @@ public final class TraitSetter {
                                 + backProps.backgroundPositionVertical.getValue(refContext));
                     } else {
                         // TODO Area BPD has to be set for this to work
-                        log.warn("Vertical background image positioning ignored"
+                        LOG.warn("Vertical background image positioning ignored"
                                 + " because the BPD was not set on the area."
                                 + " (Yes, it's a bug in FOP)");
                     }
@@ -411,7 +410,7 @@ public final class TraitSetter {
                         back.setHoriz(horizontal);
                     } else {
                         //TODO Area IPD has to be set for this to work
-                        log.warn("Horizontal background image positioning ignored"
+                        LOG.warn("Horizontal background image positioning ignored"
                                 + " because the IPD was not set on the area."
                                 + " (Yes, it's a bug in FOP)");
                     }
@@ -435,7 +434,7 @@ public final class TraitSetter {
                         back.setVertical(vertical);
                     } else {
                         //TODO Area BPD has to be set for this to work
-                        log.warn("Vertical background image positioning ignored"
+                        LOG.warn("Vertical background image positioning ignored"
                                 + " because the BPD was not set on the area."
                                 + " (Yes, it's a bug in FOP)");
                     }
index c2dde9f9eafa1a65f34ebb8c27419335317e4e64..e090fbae6b519d4dd1c8258af384aedeedb73512 100644 (file)
@@ -30,7 +30,6 @@ import org.apache.fop.fonts.Font;
 import org.apache.fop.fonts.FontInfo;
 import org.apache.fop.fonts.FontTriplet;
 import org.apache.fop.layoutmgr.LayoutContext;
-import org.apache.fop.layoutmgr.LayoutManager;
 import org.apache.fop.layoutmgr.PositionIterator;
 import org.apache.fop.layoutmgr.TraitSetter;
 
index f2664ed1c72421f63d721e47a8454adec42c3e21..467f2e154977dddf143faa1b2c07573ae40cdf2a 100644 (file)
@@ -21,9 +21,7 @@ package org.apache.fop.layoutmgr.inline;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.fop.datatypes.Length;
-import org.apache.fop.datatypes.LengthBase;
-import org.apache.fop.datatypes.SimplePercentBaseContext;
+
 import org.apache.fop.fo.Constants;
 
 
index 3eed124b25a042840184cf5e7635e883e8cad8a2..49c97b7b6f096f95aeab1ce4ac2c83967564266e 100644 (file)
@@ -23,6 +23,7 @@ import java.util.List;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
 import org.apache.fop.layoutmgr.Position;
 
 /**
@@ -31,8 +32,7 @@ import org.apache.fop.layoutmgr.Position;
 public class LineLayoutPossibilities {
 
     /** logger instance */
-    private static final Log log                                // CSOK: ConstantName
-        = LogFactory.getLog(LineLayoutPossibilities.class);
+    private static final Log LOG = LogFactory.getLog(LineLayoutPossibilities.class);
 
     private final class Possibility {
         private int lineCount;
@@ -157,7 +157,7 @@ public class LineLayoutPossibilities {
                     possibilitiesList.set(index, restoredPossibility);
                 } else {
                     // this should not happen
-                    log.error("LineLayoutPossibilities restorePossibilities(),"
+                    LOG.error("LineLayoutPossibilities restorePossibilities(),"
                         + " min= " + getMinLineCount()
                         + " max= " + getMaxLineCount()
                         + " restored= " + restoredPossibility.getLineCount());
@@ -258,12 +258,12 @@ public class LineLayoutPossibilities {
             && adj <= (getMaxLineCount() - getChosenLineCount())
             && getLineCount(chosenIndex + adj) == getChosenLineCount() + adj) {
             chosenIndex += adj;
-            log.debug("chosenLineCount= " + (getChosenLineCount() - adj) + " adjustment= " + adj
+            LOG.debug("chosenLineCount= " + (getChosenLineCount() - adj) + " adjustment= " + adj
                                + " => chosenLineCount= " + getLineCount(chosenIndex));
             return adj;
         } else {
             // this should not happen!
-            log.warn("Cannot apply the desired line count adjustment.");
+            LOG.warn("Cannot apply the desired line count adjustment.");
             return 0;
         }
     }
index 62041e888ecf03348b3854f1db58102e350def9d..b9f786c9712691b48ad61a389c91ac7c0f817086 100644 (file)
@@ -25,7 +25,6 @@ import org.apache.fop.area.inline.TextArea;
 import org.apache.fop.area.inline.UnresolvedPageNumber;
 import org.apache.fop.fo.flow.PageNumberCitation;
 import org.apache.fop.layoutmgr.LayoutContext;
-import org.apache.fop.layoutmgr.LayoutManager;
 
 /**
  * LayoutManager for the fo:page-number-citation formatting object
index a2a1dce27b56106a29b1f53452f2157cc8e3216a..19a1a1f8a2c8cde7ba88278521511f3b3fc1de9f 100644 (file)
@@ -19,8 +19,6 @@
 
 package org.apache.fop.layoutmgr.inline;
 
-import org.apache.fop.datatypes.Length;
-
 /**
  * The FOP specific incarnation of the XSL-FO scaled baseline table.
  * All baseline tables are scaled to the font size of the font they
index 1a3297ad52376c242ce71ab189ff47fdc26a2ad1..db5b4736cf595d97b66e7cb5359a2e3f5094cf69 100644 (file)
@@ -55,8 +55,7 @@ import org.apache.fop.util.BreakUtil;
 public class TableContentLayoutManager implements PercentBaseContext {
 
     /** Logger **/
-    private static final Log log                                // CSOK: ConstantName
-        = LogFactory.getLog(TableContentLayoutManager.class);
+    private static final Log LOG = LogFactory.getLog(TableContentLayoutManager.class);
 
     private TableLayoutManager tableLM;
     private TableRowIterator bodyIter;
@@ -138,8 +137,8 @@ public class TableContentLayoutManager implements PercentBaseContext {
      * @see org.apache.fop.layoutmgr.LayoutManager#getNextKnuthElements(LayoutContext, int)
      */
     public List getNextKnuthElements(LayoutContext context, int alignment) {
-        if (log.isDebugEnabled()) {
-            log.debug("==> Columns: " + getTableLM().getColumns());
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("==> Columns: " + getTableLM().getColumns());
         }
         KnuthBox headerAsFirst = null;
         KnuthBox headerAsSecondToLast = null;
@@ -149,8 +148,8 @@ public class TableContentLayoutManager implements PercentBaseContext {
                     headerIter, context, alignment, TableRowIterator.HEADER);
             this.headerNetHeight
                     = ElementListUtils.calcContentLength(this.headerList);
-            if (log.isDebugEnabled()) {
-                log.debug("==> Header: "
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("==> Header: "
                         + headerNetHeight + " - " + this.headerList);
             }
             TableHeaderFooterPosition pos = new TableHeaderFooterPosition(
@@ -169,8 +168,8 @@ public class TableContentLayoutManager implements PercentBaseContext {
                     footerIter, context, alignment, TableRowIterator.FOOTER);
             this.footerNetHeight
                     = ElementListUtils.calcContentLength(this.footerList);
-            if (log.isDebugEnabled()) {
-                log.debug("==> Footer: "
+            if (LOG.isDebugEnabled()) {
+                LOG.debug("==> Footer: "
                         + footerNetHeight + " - " + this.footerList);
             }
             //We can simply add the table footer at the end of the whole list
@@ -378,14 +377,14 @@ public class TableContentLayoutManager implements PercentBaseContext {
             } else if (pos instanceof TableContentPosition) {
                 tablePositions.add(pos);
             } else {
-                if (log.isDebugEnabled()) {
-                    log.debug("Ignoring position: " + pos);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Ignoring position: " + pos);
                 }
             }
         }
         if (lastPos instanceof TableHFPenaltyPosition) {
             TableHFPenaltyPosition penaltyPos = (TableHFPenaltyPosition)lastPos;
-            log.debug("Break at penalty!");
+            LOG.debug("Break at penalty!");
             if (penaltyPos.headerElements != null) {
                 //Header positions for the penalty position are in the last element and need to
                 //be handled first before all other TableContentPositions
@@ -411,7 +410,7 @@ public class TableContentLayoutManager implements PercentBaseContext {
 
         if (tablePositions.isEmpty()) {
             // TODO make sure this actually never happens
-            log.error("tablePositions empty."
+            LOG.error("tablePositions empty."
                     + " Please send your FO file to fop-users@xmlgraphics.apache.org");
         } else {
             // Here we are sure that posIter iterates only over TableContentPosition instances
index 282cd0fd57c10b79951c64d51255d43f0317557c..35cba6da63511de154f5a702af1b85fc01ab3967 100644 (file)
@@ -28,8 +28,6 @@ import org.apache.fop.fo.FONode.FONodeIterator;
 import org.apache.fop.fo.flow.table.EffRow;
 import org.apache.fop.fo.flow.table.Table;
 import org.apache.fop.fo.flow.table.TableBody;
-import org.apache.fop.fo.flow.table.TablePart;
-
 
 /**
  * Iterator that lets the table layout manager step over all the rows of a part of the
index db9a49271dd10e50b330a65a42cacc30859255a9..24a471e1ecff437a9154efd6c5262099a3233550 100644 (file)
@@ -21,17 +21,11 @@ package org.apache.fop.pdf;
 
 import java.util.Date;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 /**
  * This class represents an embedded file stream.
  */
 public class PDFEmbeddedFile extends PDFStream {
 
-    private static final Log log                                // CSOK: ConstantName
-        = LogFactory.getLog(PDFEmbeddedFile.class.getName());
-
     /**
      * Creates a new embedded file stream.
      */
index 90b530774f49161128a01ff2f841fda88383ef8d..269f0639d7516b210e349f37907c1f59f017f26b 100644 (file)
@@ -21,7 +21,6 @@ package org.apache.fop.pdf;
 
 // Java
 import java.io.IOException;
-import java.io.InputStream;
 import java.io.OutputStream;
 import java.security.InvalidKeyException;
 import java.security.MessageDigest;
index 60844c58824dd8a1f5a5a900712644292740c065..3f5ae2a3deb52431c837922d9ab86febdf801798 100644 (file)
@@ -37,8 +37,7 @@ public final class PDFEncryptionManager {
     }
 
     /** logging instance */
-    private static final Log log                                // CSOK: ConstantName
-        = LogFactory.getLog(PDFEncryptionManager.class);
+    private static final Log LOG = LogFactory.getLog(PDFEncryptionManager.class);
 
     /**
      * Indicates whether JCE is available.
@@ -64,12 +63,12 @@ public final class PDFEncryptionManager {
             Provider[] providers;
             providers = Security.getProviders("Cipher.RC4");
             if (providers == null) {
-                log.warn("Cipher provider for RC4 not available.");
+                LOG.warn("Cipher provider for RC4 not available.");
                 return false;
             }
             providers = Security.getProviders("MessageDigest.MD5");
             if (providers == null) {
-                log.warn("MessageDigest provider for MD5 not available.");
+                LOG.warn("MessageDigest provider for MD5 not available.");
                 return false;
             }
             return true;
@@ -92,13 +91,13 @@ public final class PDFEncryptionManager {
         if (params != null) {
             if (!checkAvailableAlgorithms()) {
                 if (isJCEAvailable()) {
-                    log.warn("PDF encryption has been requested, JCE is "
+                    LOG.warn("PDF encryption has been requested, JCE is "
                             + "available but there's no "
                             + "JCE provider available that provides the "
                             + "necessary algorithms. The PDF won't be "
                             + "encrypted.");
                 } else {
-                    log.warn("PDF encryption has been requested but JCE is "
+                    LOG.warn("PDF encryption has been requested but JCE is "
                             + "unavailable! The PDF won't be encrypted.");
                 }
             }
@@ -123,19 +122,19 @@ public final class PDFEncryptionManager {
             return (PDFEncryption)obj;
         } catch (ClassNotFoundException e) {
             if (checkAvailableAlgorithms()) {
-                log.warn("JCE and algorithms available, but the "
+                LOG.warn("JCE and algorithms available, but the "
                     + "implementation class unavailable. Please do a full "
                     + "rebuild.");
             }
             return null;
         } catch (NoSuchMethodException e) {
-            log.error(e);
+            LOG.error(e);
             return null;
         } catch (IllegalAccessException e) {
-            log.error(e);
+            LOG.error(e);
             return null;
         } catch (InvocationTargetException e) {
-            log.error(e);
+            LOG.error(e);
             return null;
         }
     }
index aad31f18e11af09cf167bac9fb99f7acb64926be..a03aaf816379e7320d63402d8e1f59b767223132 100644 (file)
@@ -35,8 +35,7 @@ import org.apache.fop.render.afp.extensions.AFPElementMapping;
  * Parses any AFP foreign attributes
  */
 public class AFPForeignAttributeReader {
-    private static final Log log                                // CSOK: ConstantName
-        = LogFactory.getLog("org.apache.xmlgraphics.afp");
+    private static final Log LOG = LogFactory.getLog("org.apache.xmlgraphics.afp");
 
     /** the resource-name attribute */
     public static final QName RESOURCE_NAME = new QName(
@@ -95,7 +94,7 @@ public class AFPForeignAttributeReader {
                         = (String)foreignAttributes.get(RESOURCE_GROUP_FILE);
                     if (resourceGroupFile == null) {
                         String msg = RESOURCE_GROUP_FILE + " not specified";
-                        log.error(msg);
+                        LOG.error(msg);
                         throw new UnsupportedOperationException(msg);
                     }
                     File resourceExternalGroupFile = new File(resourceGroupFile);
@@ -107,20 +106,20 @@ public class AFPForeignAttributeReader {
                     } catch (SecurityException ex) {
                         String msg = "unable to gain write access to external resource file: "
                         + resourceGroupFile;
-                        log.error(msg);
+                        LOG.error(msg);
                     }
 
                     try {
                         boolean exists = resourceExternalGroupFile.exists();
                         if (exists) {
-                            log.warn("overwriting external resource file: "
+                            LOG.warn("overwriting external resource file: "
                                     + resourceGroupFile);
                         }
                         resourceLevel.setExternalFilePath(resourceGroupFile);
                     } catch (SecurityException ex) {
                         String msg = "unable to gain read access to external resource file: "
                             + resourceGroupFile;
-                        log.error(msg);
+                        LOG.error(msg);
                     }
                 }
             }
index b14a4eb9dd903bdfe4743bdc6f2dc07e85b89376..a82fe3457b399018d14c46f37c3ebc928168e45f 100644 (file)
@@ -19,8 +19,6 @@
 
 package org.apache.fop.render.afp.extensions;
 
-import java.net.URI;
-
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.AttributesImpl;
index cd15a9d726629e175a92b43ee61977b0581ebe8e..b156b6c3a1b685435ce118e614a2400c4b888150 100644 (file)
@@ -19,9 +19,6 @@
 
 package org.apache.fop.render.intermediate;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.apache.fop.apps.FOUserAgent;
 
 /**
@@ -29,9 +26,6 @@ import org.apache.fop.apps.FOUserAgent;
  */
 public abstract class AbstractIFDocumentHandler implements IFDocumentHandler {
 
-    /** logging instance */
-    private static Log log = LogFactory.getLog(AbstractIFDocumentHandler.class);
-
     private IFContext ifContext;
 
     /**
index a2b9c96130b5fe9a04f9a98c4ae74a294bd2b533..39664576829689a5f2faa7f2f92eb5eefa87443a 100644 (file)
@@ -33,9 +33,6 @@ import java.util.Stack;
 
 import org.w3c.dom.Document;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.apache.fop.fonts.Font;
 import org.apache.fop.fonts.FontInfo;
 import org.apache.fop.fonts.FontTriplet;
@@ -54,9 +51,6 @@ import org.apache.fop.util.CharUtilities;
  */
 public class Java2DPainter extends AbstractIFPainter {
 
-    /** logging instance */
-    private static Log log = LogFactory.getLog(Java2DPainter.class);
-
     /** the IF context */
     protected IFContext ifContext;
 
index 429d36167e53f2479617afaa5f957a3fd6ac8948..185e1ece5491d8f9b9384769169b99b84a419a38 100644 (file)
@@ -34,8 +34,7 @@ final class HardcodedFonts {
     }
 
     /** logging instance */
-    private static final Log log                                // CSOK: ConstantName
-        = LogFactory.getLog(HardcodedFonts.class);
+    private static final Log LOG = LogFactory.getLog(HardcodedFonts.class);
 
     /**
      * Sets the current font (NOTE: Hard-coded font mappings ATM!)
@@ -62,7 +61,7 @@ final class HardcodedFonts {
             try {
                 fontcode = Integer.parseInt(name.substring(1));
             } catch (Exception e) {
-                log.error(e);
+                LOG.error(e);
             }
         }
         //Note "(ON" selects ISO 8859-1 symbol set as used by PCLGenerator
index d0e82ed7dfbc3756e7a0ac2d7ded693a625c8d12..00b25a5e397df3b56203fa095cb09061c873a21a 100644 (file)
@@ -34,9 +34,6 @@ import java.util.Stack;
 
 import org.w3c.dom.Document;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.apache.xmlgraphics.image.loader.ImageException;
 import org.apache.xmlgraphics.image.loader.ImageInfo;
 import org.apache.xmlgraphics.image.loader.ImageProcessingHints;
@@ -65,9 +62,6 @@ import org.apache.fop.util.CharUtilities;
  */
 public class PCLPainter extends AbstractIFPainter implements PCLConstants {
 
-    /** logging instance */
-    private static Log log = LogFactory.getLog(PCLPainter.class);
-
     private static final boolean DEBUG = false;
 
     private PCLDocumentHandler parent;
index 6c2c592b1f3ecba4c28a23912d0b91a41e5a6b47..d54973ac87de3b2ca05fe6176e685305bb0060af 100644 (file)
@@ -19,9 +19,6 @@
 
 package org.apache.fop.render.pcl;
 
-import org.apache.xmlgraphics.util.QName;
-
-import org.apache.fop.fo.extensions.ExtensionElementMapping;
 import org.apache.fop.render.ImageHandlerUtil;
 import org.apache.fop.render.RendererContext;
 
index 10db33b0f9009cb82efb66282c2d5704af9de67b..287f896074b513f04082e0f66d1d836867cf423b 100644 (file)
@@ -37,8 +37,7 @@ import org.apache.fop.util.ColorUtil;
 public class PDFBorderPainter extends BorderPainter {
 
     /** logging instance */
-    private static final Log log                                // CSOK: ConstantName
-        = LogFactory.getLog(PDFBorderPainter.class);
+    private static final Log LOG = LogFactory.getLog(PDFBorderPainter.class);
 
     private PDFContentGenerator generator;
 
@@ -70,7 +69,7 @@ public class PDFBorderPainter extends BorderPainter {
         float w = x2 - x1;
         float h = y2 - y1;
         if ((w < 0) || (h < 0)) {
-            log.error("Negative extent received (w=" + w + ", h=" + h
+            LOG.error("Negative extent received (w=" + w + ", h=" + h
                     + "). Border won't be painted.");
             return;
         }
index 5cc1a1b01ab5f7b6ddd587e92d6a5ffb9822be33..66b26fb33129e8d9db0ad06b48e31e83c3d4b099 100644 (file)
@@ -30,8 +30,6 @@ import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.batik.bridge.BridgeContext;
 import org.apache.batik.bridge.GVTBuilder;
 import org.apache.batik.gvt.GraphicsNode;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 import org.apache.xmlgraphics.java2d.ps.PSGraphics2D;
 import org.apache.xmlgraphics.ps.PSGenerator;
@@ -57,9 +55,6 @@ import org.apache.fop.svg.SVGUserAgent;
 public class PSSVGHandler extends AbstractGenericSVGHandler
             implements PSRendererContextConstants {
 
-    /** logging instance */
-    private static Log log = LogFactory.getLog(PSSVGHandler.class);
-
     /**
      * Create a new PostScript XML handler for use by the PostScript renderer.
      */
index f44199bee3f37cab58de480f7581f42b5b8b1916..13748a3bf6edf289c828af5b6373fed2dafc153c 100644 (file)
@@ -26,9 +26,8 @@ package org.apache.fop.render.rtf.rtflib.rtfdoc;
  * the FOP project.
  */
 
-import java.io.Writer;
 import java.io.IOException;
-import java.util.Date;
+import java.io.Writer;
 import java.util.Random;
 
 /**
index 2477099a48cb223afc9c5c451a3e33f469d3761d..bcc3a6913e361d07f5ec076683a6ebccb5e66cd7 100644 (file)
@@ -34,17 +34,14 @@ import org.w3c.dom.Document;
 import org.xml.sax.SAXException;
 import org.xml.sax.helpers.AttributesImpl;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import org.apache.xmlgraphics.image.loader.ImageException;
 import org.apache.xmlgraphics.image.loader.ImageInfo;
 import org.apache.xmlgraphics.image.loader.ImageManager;
 import org.apache.xmlgraphics.image.loader.ImageSessionContext;
 import org.apache.xmlgraphics.xmp.Metadata;
 
-import org.apache.fop.apps.MimeConstants;
 import org.apache.fop.ResourceEventProducer;
+import org.apache.fop.apps.MimeConstants;
 import org.apache.fop.render.ImageHandlerUtil;
 import org.apache.fop.render.RenderingContext;
 import org.apache.fop.render.intermediate.AbstractIFPainter;
@@ -64,9 +61,6 @@ import org.apache.fop.util.XMLUtil;
  */
 public class SVGPainter extends AbstractIFPainter implements SVGConstants {
 
-    /** logging instance */
-    private static Log log = LogFactory.getLog(SVGPainter.class);
-
     private AbstractSVGDocumentHandler parent;
 
     /** The SAX content handler that receives the generated XML events. */
index 26053cdadae526d53181775a29c0ce24ee185c95..5b51a34e16baf54b76d26a97f05b1623613478b7 100644 (file)
@@ -31,12 +31,13 @@ import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
-import org.apache.fop.apps.Fop;
+import org.xml.sax.InputSource;
+
 import org.apache.fop.apps.FOUserAgent;
+import org.apache.fop.apps.Fop;
 import org.apache.fop.apps.FopFactory;
 import org.apache.fop.apps.MimeConstants;
 import org.apache.fop.util.DigestFilter;
-import org.xml.sax.InputSource;
 
 /**
  * Framework for simple regression testing.
@@ -76,8 +77,8 @@ public final class GenericFOPTestCase extends TestCase {
     public void testSimple() throws Exception {
         final String digestIn = "17bf13298796065f7775db8707133aeb";
         final String digestOut = "e2761f51152f6663911e567901596707";
-        final String fo =
-            "<fo:root xmlns:fo='http://www.w3.org/1999/XSL/Format'>"
+        final String fo
+            "<fo:root xmlns:fo='http://www.w3.org/1999/XSL/Format'>"
                 + "  <fo:layout-master-set>"
                 + "    <fo:simple-page-master master-name='simple'"
                 + "       page-height='25cm' page-width='20cm'>"
@@ -118,8 +119,8 @@ public final class GenericFOPTestCase extends TestCase {
         FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
         foUserAgent.setCreationDate(new Date(10000));
         MessageDigest outDigest = MessageDigest.getInstance("MD5");
-        DigestOutputStream out =
-            new DigestOutputStream(new ByteArrayOutputStream(), outDigest);
+        DigestOutputStream out
+            new DigestOutputStream(new ByteArrayOutputStream(), outDigest);
         Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, out);
         InputSource source = new InputSource(new StringReader(fo));
         DigestFilter filter = new DigestFilter("MD5");
index 5c803317e1766e16dbfafd46f5754c86f3b7bc91..6ce833312576ced2d7c07e554be432a6b1c702bf 100644 (file)
@@ -100,7 +100,7 @@ public abstract class BaseUserConfigTestCase extends BasePDFTestCase {
     /**
      * @return user config File
      */
-    abstract protected String getUserConfigFilename();
+    protected abstract String getUserConfigFilename();
 
     /*
      * @see junit.framework.TestCase#getName()
index 767c590ed1ea5dd580f5eeef137666370933dcad..afef11d8706582aef59dddf5c78b7dc80a508694 100644 (file)
@@ -40,7 +40,7 @@ class EventChecker extends Assert implements EventListener {
         if (event.getEventID().equals(expectedEventID)) {
             eventReceived = true;
         } else {
-            fail("Unexpected event: id = " + event.getEventID() + ": "+ msg);
+            fail("Unexpected event: id = " + event.getEventID() + ": " + msg);
         }
     }
 
index 9e371251decfe8ae35a448f9f52a53417921d78c..3549523476bd75c55bd1c42b40edf460be601207 100644 (file)
@@ -71,7 +71,7 @@ class Stats {
     public void dumpFinalStats() {
         long duration = System.currentTimeMillis() - startTime;
         System.out.println("Final statistics");
-        System.out.println("Pages produced: " +totalPagesProduced);
+        System.out.println("Pages produced: " + totalPagesProduced);
         long ppm = 60000 * totalPagesProduced / duration;
         System.out.println("Average speed: " + ppm + "ppm");
     }
index f5d2f84cf073fa6d6b1eda07c3037fc520b13f23..bd5c8ade132a722887eeb67baecf6ce9f40abbb9 100644 (file)
@@ -27,38 +27,38 @@ import org.apache.fop.pdf.CMapBuilder;
 
 /** Simple sanity test of the PDFCmap class */
 public class PDFCMapTestCase extends TestCase {
+    private static final String EOL = "\n";
 
     public void testPDFCMapFillInPDF() throws Exception {
-        final String EOL = "\n";
-        final String expected =
-            "%!PS-Adobe-3.0 Resource-CMap" + EOL
-            +"%%DocumentNeededResources: ProcSet (CIDInit)" + EOL
-            +"%%IncludeResource: ProcSet (CIDInit)" + EOL
-            +"%%BeginResource: CMap (test)" + EOL
-            +"%%EndComments" + EOL
-            +"/CIDInit /ProcSet findresource begin" + EOL
-            +"12 dict begin" + EOL
-            +"begincmap" + EOL
-            +"/CIDSystemInfo 3 dict dup begin" + EOL
-            +"  /Registry (Adobe) def" + EOL
-            +"  /Ordering (Identity) def" + EOL
-            +"  /Supplement 0 def" + EOL
-            +"end def" + EOL
-            +"/CMapVersion 1 def" + EOL
-            +"/CMapType 1 def" + EOL
-            +"/CMapName /test def" + EOL
-            +"1 begincodespacerange" + EOL
-            +"<0000> <FFFF>" + EOL
-            +"endcodespacerange" + EOL
-            +"1 begincidrange" + EOL
-            +"<0000> <FFFF> 0" + EOL
-            +"endcidrange" + EOL
-            +"endcmap" + EOL
-            +"CMapName currentdict /CMap defineresource pop" + EOL
-            +"end" + EOL
-            +"end" + EOL
-            +"%%EndResource" + EOL
-            +"%%EOF" + EOL
+        final String expected
+            = "%!PS-Adobe-3.0 Resource-CMap" + EOL
+            + "%%DocumentNeededResources: ProcSet (CIDInit)" + EOL
+            + "%%IncludeResource: ProcSet (CIDInit)" + EOL
+            + "%%BeginResource: CMap (test)" + EOL
+            + "%%EndComments" + EOL
+            + "/CIDInit /ProcSet findresource begin" + EOL
+            + "12 dict begin" + EOL
+            + "begincmap" + EOL
+            + "/CIDSystemInfo 3 dict dup begin" + EOL
+            + "  /Registry (Adobe) def" + EOL
+            + "  /Ordering (Identity) def" + EOL
+            + "  /Supplement 0 def" + EOL
+            + "end def" + EOL
+            + "/CMapVersion 1 def" + EOL
+            + "/CMapType 1 def" + EOL
+            + "/CMapName /test def" + EOL
+            + "1 begincodespacerange" + EOL
+            + "<0000> <FFFF>" + EOL
+            + "endcodespacerange" + EOL
+            + "1 begincidrange" + EOL
+            + "<0000> <FFFF> 0" + EOL
+            + "endcidrange" + EOL
+            + "endcmap" + EOL
+            + "CMapName currentdict /CMap defineresource pop" + EOL
+            + "end" + EOL
+            + "end" + EOL
+            + "%%EndResource" + EOL
+            + "%%EOF" + EOL
         ;
 
         final StringWriter w = new StringWriter();
index 0384b42df7a1c33f4c4489fd78e68e7eaeeae550..94e8d67d241a9f2e2aecd0abc6b8a36d05c80d55 100644 (file)
@@ -43,7 +43,7 @@ import org.xml.sax.helpers.XMLFilterImpl;
 public class DigestFilter extends XMLFilterImpl {
 
     private MessageDigest digest;
-    private byte value[];
+    private byte[] value;
     private boolean isNamespaceAware;
 
     public DigestFilter(String algorithm) throws NoSuchAlgorithmException {
@@ -133,7 +133,7 @@ public class DigestFilter extends XMLFilterImpl {
      */
     public void setFeature(String feature, boolean value)
         throws SAXNotRecognizedException, SAXNotSupportedException {
-        if(feature.equals("http://xml.org/sax/features/namespaces")) {
+        if (feature.equals("http://xml.org/sax/features/namespaces")) {
             isNamespaceAware = value;
         }
         super.setFeature(feature, value);