xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gad...@apache.org
Subject svn commit: r1617052 [1/2] - in /xmlgraphics/fop/trunk: ./ src/java/org/apache/fop/afp/ src/java/org/apache/fop/afp/apps/ src/java/org/apache/fop/afp/goca/ src/java/org/apache/fop/afp/ioca/ src/java/org/apache/fop/afp/modca/ src/java/org/apache/fop/are...
Date Sun, 10 Aug 2014 06:55:03 GMT
Author: gadams
Date: Sun Aug 10 06:55:01 2014
New Revision: 1617052

URL: http://svn.apache.org/r1617052
Log:
Fix or suppress 5- to 9-instance findbug warnings.

Modified:
    xmlgraphics/fop/trunk/findbugs-exclude.xml
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPGraphics2D.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPPaintingState.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/apps/FontPatternExtractor.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/goca/GraphicsChainedSegment.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ioca/IDEStructureParameter.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/AbstractResourceGroupContainer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/ObjectAreaPosition.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/ResourceEnvironmentGroup.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Block.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/LineArea.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/LinkResolver.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/AbstractTextArea.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineArea.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineParent.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/UnresolvedPageNumber.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/Main.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/datatypes/URISpecification.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/datatypes/ValidationPercentBaseContext.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/NullCharIterator.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyTokenizer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Marker.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/ColorProperty.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyMaker.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontCache.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontReader.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontTriplet.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/apps/AbstractFontReader.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/apps/TTFReader.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OFDirTabEntry.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OTFFile.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OpenFont.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/PFMFile.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/HyphenationTree.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/Hyphenator.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractPageSequenceLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/CollapsingBorderModel.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFGState.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFPaintingState.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFResources.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLGenerator.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLGraphics2D.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRendererConfigurator.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/ImageRawJPEGAdapter.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSDocumentHandler.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSFontUtils.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSImageUtils.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSRendererConfigurator.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/ResourceHandler.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/TextAttributesConverter.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfColorTable.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfFontManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfHeader.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfStyleSheetTable.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/rtflib/rtfdoc/RtfTemplate.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/txt/TXTRenderer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/GraphicsConfiguration.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFTextUtil.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/tools/TestConverter.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/tools/anttasks/FileCompare.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/tools/anttasks/RunTest.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/tools/fontlist/FontListMain.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/util/AbstractPaintingState.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/util/ColorUtil.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/util/QName.java

Modified: xmlgraphics/fop/trunk/findbugs-exclude.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/findbugs-exclude.xml?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/findbugs-exclude.xml (original)
+++ xmlgraphics/fop/trunk/findbugs-exclude.xml Sun Aug 10 06:55:01 2014
@@ -1,22 +1,149 @@
 <?xml version="1.0" encoding="utf-8"?>
 <FindBugsFilter>
+
+  <!--
+  !
+  ! This file is divided into two parts:
+  ! 1. APPROVED EXCLUSIONS
+  ! 2. TEMPORARY (UNAPPROVED) EXCLUSIONS
+  !
+  ! Approved exclusions come in two sub-types:
+  ! 1. general exclusion of a named bug pattern, meaning that all instances that matches the bug
+  !    pattern identifier are excluded;
+  ! 2. specific exclusions for a named bug pattern, meaning that all instance exclusions are
+  !    explicitly enumerated;
+  !
+  ! All specific exclusions must be accompanied inline (i.e., in the affected source code) by
+  ! a commented out annotation of the form:
+  !
+  ! // @SuppressFBWarnings("pattern identifier")
+  !
+  ! where pattern identifier is one of findbugs' named patterns. At an appropriate point in the
+  ! future, these commented out annotations will be uncommented and exclusion patterns removed
+  ! from this file.
+  !
+  ! Temporary (unapproved) exclusions are short-term work arounds that should be removed as
+  ! soon as possible by either (1) fixing (eliminating) cause of warning, or (2) conversion to
+  ! approved exclusion.
+  !
+  ! The organization of pattern matches employs the following levels (from top down):
+  ! 1. bug pattern
+  ! 2. or clause matching instances
+  ! 3. class name, if applies to class/interface
+  ! 4. and clause matching class/instance and single or or clause of multiple {method,field} members
+  !
+  ! for example,
+  !
+  ! <Match>
+  !   <Bug pattern="pattern identifier"/>
+  !   <Or>
+  !     <And>
+  !       <Class name="dotted class name"/>
+  !       <Member name="unqualified member name"/>
+  !     </And>
+  !   </Or>
+  ! </Match>
+  !
+  -->
+
+  <!-- START - APPROVED EXCLUSIONS -->
   <Match>
-    <!-- 131 warnings -->
-    <Bug pattern="BC_UNCONFIRMED_CAST"/>
+    <Bug pattern="CN_IDIOM_NO_SUPER_CALL"/>
+    <Or>
+      <And>
+        <Class name="org.apache.fop.render.intermediate.IFGraphicContext"/>
+        <Method name="clone"/>
+      </And>
+    </Or>
+  </Match>
+  <Match>
+    <Bug pattern="DM_EXIT"/>
+    <Or>
+      <And>
+        <Class name="org.apache.fop.cli.CommandLineOptions"/>
+        <Or>
+          <Method name="parseCustomOutputOption"/>
+          <Method name="parseOptions"/>
+        </Or>
+      </And>
+      <And>
+        <Class name="org.apache.fop.cli.Main"/>
+        <Or>
+          <Method name="startFOP"/>
+          <Method name="startFOPWithDynamicClasspath"/>
+        </Or>
+      </And>
+      <And>
+        <Class name="org.apache.fop.tools.fontlist.FontListMain"/>
+        <Or>
+          <Method name="parseArguments"/>
+        </Or>
+      </And>
+    </Or>
   </Match>
   <Match>
-    <!-- 8 warnings -->
-    <Bug pattern="CI_CONFUSED_INHERITANCE"/>
+    <Bug pattern="EQ_ALWAYS_TRUE"/>
+    <Or>
+      <And>
+        <Class name="org.apache.fop.fo.properties.ToBeImplementedProperty"/>
+        <Method name="equals"/>
+      </And>
+    </Or>
   </Match>
   <Match>
-    <Bug pattern="CN_IDIOM_NO_SUPER_CALL"/>
+    <Bug pattern="MS_EXPOSE_REP"/>
     <Or>
       <And>
-        <Class name="org.apache.fop.render.intermediate.IFGraphicContext"/>
-        <Method name="clone"/>
+        <Class name="org.apache.fop.fo.FOPropertyMapping"/>
+        <Method name="getGenericMappings"/>
+      </And>
+    </Or>
+  </Match>
+  <Match>
+    <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE"/>
+    <Or>
+      <Class name="org.apache.fop.apps.MimeConstants"/>
+      <Class name="org.apache.fop.events.EventListener"/>
+      <Class name="org.apache.fop.render.Graphics2DImagePainter"/>
+    </Or>
+  </Match>
+  <Match>
+    <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS"/>
+    <Or>
+      <Class name="org.apache.fop.render.ps.PSFontUtils"/>
+      <Class name="org.apache.fop.render.ps.PSImageUtils"/>
+      <Class name="org.apache.fop.svg.GraphicsConfiguration"/>
+      <Class name="org.apache.fop.svg.PDFTextUtil"/>
+      <Class name="org.apache.fop.util.QName"/>
+    </Or>
+  </Match>
+  <Match>
+    <Bug pattern="SE_INNER_CLASS"/>
+    <Or>
+      <Class name="org.apache.fop.afp.AFPPaintingState$AFPData"/>
+      <Class name="org.apache.fop.area.inline.AbstractTextArea$TextAdjustingInfo"/>
+      <Class name="org.apache.fop.area.inline.InlineArea$InlineAdjustingInfo"/>
+      <Class name="org.apache.fop.area.LineArea$LineAdjustingInfo"/>
+      <Class name="org.apache.fop.pdf.PDFPaintingState$PDFData"/>
+      <Class name="org.apache.fop.util.AbstractPaintingState$StateStack"/>
+    </Or>
+  </Match>
+  <Match>
+    <Bug pattern="SF_SWITCH_FALLTHROUGH"/>
+    <Or>
+      <And>
+        <Class name="org.apache.fop.render.awt.viewer.PreviewPanel$Reloader"/>
+        <Method name="run"/>
       </And>
     </Or>
   </Match>
+  <!-- END - APPROVED EXCLUSIONS -->
+
+  <!-- START - TEMPORARY (UNAPPROVED) EXCLUSIONS -->
+  <Match>
+    <!-- 131 warnings -->
+    <Bug pattern="BC_UNCONFIRMED_CAST"/>
+  </Match>
   <Match>
     <!-- 15 warnings -->
     <Bug pattern="DB_DUPLICATE_SWITCH_CLAUSES"/>
@@ -30,10 +157,6 @@
     <Bug pattern="DM_CONVERT_CASE"/>
   </Match>
   <Match>
-    <!-- 5 warnings -->
-    <Bug pattern="DM_EXIT"/>
-  </Match>
-  <Match>
     <!-- 20 warnings -->
     <Bug pattern="DM_FP_NUMBER_CTOR"/>
   </Match>
@@ -50,36 +173,10 @@
     <Bug pattern="EI_EXPOSE_REP2"/>
   </Match>
   <Match>
-    <Bug pattern="EQ_ALWAYS_TRUE"/>
-    <Or>
-      <And>
-        <Class name="org.apache.fop.fo.properties.ToBeImplementedProperty"/>
-        <Method name="equals"/>
-      </And>
-    </Or>
-  </Match>
-  <Match>
     <!-- 12 warnings -->
     <Bug pattern="FE_FLOATING_POINT_EQUALITY"/>
   </Match>
   <Match>
-    <!-- 6 warnings -->
-    <Bug pattern="ITA_INEFFICIENT_TO_ARRAY"/>
-  </Match>
-  <Match>
-    <!-- 9 warnings -->
-    <Bug pattern="LI_LAZY_INIT_STATIC"/>
-  </Match>
-  <Match>
-    <Bug pattern="MS_EXPOSE_REP"/>
-    <Or>
-      <And>
-        <Class name="org.apache.fop.fo.FOPropertyMapping"/>
-        <Method name="getGenericMappings"/>
-      </And>
-    </Or>
-  </Match>
-  <Match>
     <!-- 12 warnings -->
     <Bug pattern="MS_OOI_PKGPROTECT"/>
   </Match>
@@ -92,18 +189,6 @@
     <Bug pattern="NM_CONFUSING"/>
   </Match>
   <Match>
-    <Bug pattern="NM_SAME_SIMPLE_NAME_AS_INTERFACE"/>
-    <Or>
-      <Class name="org.apache.fop.apps.MimeConstants"/>
-      <Class name="org.apache.fop.events.EventListener"/>
-      <Class name="org.apache.fop.render.Graphics2DImagePainter"/>
-    </Or>
-  </Match>
-  <Match>
-    <!-- 5 warnings -->
-    <Bug pattern="NM_SAME_SIMPLE_NAME_AS_SUPERCLASS"/>
-  </Match>
-  <Match>
     <!-- 46 warnings -->
     <Bug pattern="PZLA_PREFER_ZERO_LENGTH_ARRAYS"/>
   </Match>
@@ -116,10 +201,6 @@
     <Bug pattern="REC_CATCH_EXCEPTION"/>
   </Match>
   <Match>
-    <!-- 8 warnings -->
-    <Bug pattern="RI_REDUNDANT_INTERFACES"/>
-  </Match>
-  <Match>
     <!-- 11 warnings -->
     <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE"/>
   </Match>
@@ -128,23 +209,6 @@
     <Bug pattern="SE_BAD_FIELD"/>
   </Match>
   <Match>
-    <!-- 6 warnings -->
-    <Bug pattern="SE_INNER_CLASS"/>
-  </Match>
-  <Match>
-    <!-- 9 warnings -->
-    <Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED"/>
-  </Match>
-  <Match>
-    <Bug pattern="SF_SWITCH_FALLTHROUGH"/>
-    <Or>
-      <And>
-        <Class name="org.apache.fop.render.awt.viewer.PreviewPanel$Reloader"/>
-        <Method name="run"/>
-      </And>
-    </Or>
-  </Match>
-  <Match>
     <!-- 21 warnings -->
     <Bug pattern="SIC_INNER_SHOULD_BE_STATIC"/>
   </Match>
@@ -153,22 +217,6 @@
     <Bug pattern="SIC_INNER_SHOULD_BE_STATIC_ANON"/>
   </Match>
   <Match>
-    <!-- 5 warnings -->
-    <Bug pattern="SR_NOT_CHECKED"/>
-  </Match>
-  <Match>
-    <!-- 6 warnings -->
-    <Bug pattern="SS_SHOULD_BE_STATIC"/>
-  </Match>
-  <Match>
-    <!-- 8 warnings -->
-    <Bug pattern="UCF_USELESS_CONTROL_FLOW"/>
-  </Match>
-  <Match>
-    <!-- 6 warnings -->
-    <Bug pattern="UPM_UNCALLED_PRIVATE_METHOD"/>
-  </Match>
-  <Match>
     <!-- 12 warnings -->
     <Bug pattern="URF_UNREAD_FIELD"/>
   </Match>
@@ -176,12 +224,6 @@
     <!-- 58 warnings -->
     <Bug pattern="UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR"/>
   </Match>
-  <Match>
-    <!-- 5 warnings -->
-    <Bug pattern="UWF_UNWRITTEN_FIELD"/>
-  </Match>
-  <Match>
-    <!-- 6 warnings -->
-    <Bug pattern="WMI_WRONG_MAP_ITERATOR"/>
-  </Match>
+  <!-- END - TEMPORARY (UNAPPROVED) EXCLUSIONS -->
+
 </FindBugsFilter>

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPGraphics2D.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPGraphics2D.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPGraphics2D.java Sun Aug 10 06:55:01 2014
@@ -32,7 +32,6 @@ import java.awt.Paint;
 import java.awt.Rectangle;
 import java.awt.Shape;
 import java.awt.Stroke;
-import java.awt.TexturePaint;
 import java.awt.geom.AffineTransform;
 import java.awt.geom.Ellipse2D;
 import java.awt.geom.Line2D;
@@ -333,14 +332,14 @@ public class AFPGraphics2D extends Abstr
             return true;
         }
         LOG.debug("NYI: applyPaint() " + paint + " fill=" + fill);
-        if (paint instanceof TexturePaint) {
+//      if (paint instanceof TexturePaint) {
 //            TexturePaint texturePaint = (TexturePaint)paint;
 //            BufferedImage bufferedImage = texturePaint.getImage();
 //            AffineTransform at = paintingState.getTransform();
 //            int x = (int)Math.round(at.getTranslateX());
 //            int y = (int)Math.round(at.getTranslateY());
 //            drawImage(bufferedImage, x, y, null);
-        }
+//      }
         return false;
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPPaintingState.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPPaintingState.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPPaintingState.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/AFPPaintingState.java Sun Aug 10 06:55:01 2014
@@ -20,6 +20,8 @@
 package org.apache.fop.afp;
 
 import java.awt.Point;
+import java.io.IOException;
+import java.io.ObjectInputStream;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -34,8 +36,7 @@ import org.apache.fop.util.AbstractPaint
  * This keeps information about the current painting state when writing to an
  * AFP datastream.
  */
-public class AFPPaintingState extends org.apache.fop.util.AbstractPaintingState implements
-        Cloneable {
+public class AFPPaintingState extends org.apache.fop.util.AbstractPaintingState {
 
     private static final long serialVersionUID = 8206711712452344473L;
 
@@ -57,7 +58,7 @@ public class AFPPaintingState extends or
     private float bitmapEncodingQuality;
 
     /** color image handler */
-    private transient ColorConverter colorConverter = GrayScaleColorConverter.getInstance();
+    private transient ColorConverter colorConverter;
 
     /**
      * true if certain image formats may be embedded unchanged in their native
@@ -98,13 +99,23 @@ public class AFPPaintingState extends or
     private boolean fs45;
 
     /** the current page */
-    private transient AFPPagePaintingState pagePaintingState = new AFPPagePaintingState();
+    private transient AFPPagePaintingState pagePaintingState;
 
     // /** reference orientation */
     // private int orientation = 0;
 
     /** a unit converter */
-    private final transient AFPUnitConverter unitConv = new AFPUnitConverter(this);
+    private final transient AFPUnitConverter unitConv;
+
+    public AFPPaintingState() {
+        colorConverter = GrayScaleColorConverter.getInstance();
+        pagePaintingState = new AFPPagePaintingState();
+        unitConv = new AFPUnitConverter(this);
+    }
+
+    private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
+        ois.defaultReadObject();
+    }
 
     /**
      * Sets the rotation to be used for portrait pages, valid values are 0
@@ -722,6 +733,7 @@ public class AFPPaintingState extends or
     /**
      * Block level state data
      */
+    // @SuppressFBWarnings("SE_INNER_CLASS")
     private class AFPData extends org.apache.fop.util.AbstractPaintingState.AbstractData {
         private static final long serialVersionUID = -1789481244175275686L;
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/apps/FontPatternExtractor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/apps/FontPatternExtractor.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/apps/FontPatternExtractor.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/apps/FontPatternExtractor.java Sun Aug 10 06:55:01 2014
@@ -67,7 +67,9 @@ public class FontPatternExtractor {
             DataInputStream din = new DataInputStream(bin);
             long len = din.readInt() & 0xFFFFFFFFL;
             println("Length: " + len);
-            din.skip(4); //checksum
+            if (din.skip(4) != 4) { //checksum
+                throw new IOException("premature EOF when skipping checksum");
+            }
             int tidLen = din.readUnsignedShort() - 2;
             byte[] tid = new byte[tidLen];
             din.readFully(tid);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/goca/GraphicsChainedSegment.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/goca/GraphicsChainedSegment.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/goca/GraphicsChainedSegment.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/goca/GraphicsChainedSegment.java Sun Aug 10 06:55:01 2014
@@ -30,7 +30,7 @@ import org.apache.fop.afp.util.BinaryUti
 public final class GraphicsChainedSegment extends AbstractGraphicsDrawingOrderContainer {
 
     /** The maximum segment data length */
-    protected static final int MAX_DATA_LEN = 8192;
+    public static final int MAX_DATA_LEN = 8192;
 
     private byte[] predecessorNameBytes;
     private boolean appended;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ioca/IDEStructureParameter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ioca/IDEStructureParameter.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ioca/IDEStructureParameter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ioca/IDEStructureParameter.java Sun Aug 10 06:55:01 2014
@@ -43,7 +43,7 @@ public class IDEStructureParameter imple
     private boolean subtractive;
 
     /** setting for GRAYCODE flag */
-    private boolean grayCoding;
+    // private boolean grayCoding; // never written
 
     /** the image color model */
     private byte colorModel = COLOR_MODEL_RGB;
@@ -133,9 +133,11 @@ public class IDEStructureParameter imple
         if (subtractive) {
             flags |= 1 << 7;
         }
+        /* graCoding is never written
         if (grayCoding) {
             flags |= 1 << 6;
         }
+        */
 
         DataOutputStream dout = new DataOutputStream(os);
         dout.writeByte(0x9B); //ID

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/AbstractResourceGroupContainer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/AbstractResourceGroupContainer.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/AbstractResourceGroupContainer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/AbstractResourceGroupContainer.java Sun Aug 10 06:55:01 2014
@@ -26,14 +26,12 @@ import java.util.Iterator;
 
 import org.apache.fop.afp.Completable;
 import org.apache.fop.afp.Factory;
-import org.apache.fop.afp.Streamable;
 
 
 /**
  * An abstract container of resource objects
  */
-public abstract class AbstractResourceGroupContainer extends AbstractPageObject
-implements Streamable {
+public abstract class AbstractResourceGroupContainer extends AbstractPageObject {
 
     /** The container started state */
     protected boolean started;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/ObjectAreaPosition.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/ObjectAreaPosition.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/ObjectAreaPosition.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/ObjectAreaPosition.java Sun Aug 10 06:55:01 2014
@@ -42,8 +42,8 @@ public class ObjectAreaPosition extends 
     private final int x;
     private final int y;
     private final int rotation;
-    private int xOffset;
-    private int yOffset;
+    // private int xOffset; // never written
+    // private int yOffset; // never written
     private byte refCSys = 0x01; //Page or overlay coordinate system
 
     /**
@@ -108,12 +108,12 @@ public class ObjectAreaPosition extends 
         byte yorient = (byte)(rotation / 2 + 45);
         data[19] = yorient; // YoaOrent
 
-        byte[] xoffset = BinaryUtils.convert(xOffset, 3);
+        byte[] xoffset = BinaryUtils.convert(/*xOffset*/ 0, 3);
         data[22] = xoffset[0]; // XocaOSet
         data[23] = xoffset[1];
         data[24] = xoffset[2];
 
-        byte[] yoffset = BinaryUtils.convert(yOffset, 3);
+        byte[] yoffset = BinaryUtils.convert(/*yOffset*/ 0, 3);
         data[25] = yoffset[0]; // YocaOSet
         data[26] = yoffset[1];
         data[27] = yoffset[2];
@@ -136,7 +136,7 @@ public class ObjectAreaPosition extends 
             + ", y=" + y
             + ", rotation=" + rotation
             + ", rotation=" + rotation
-            + ", xOffset=" + xOffset
-            + ", yOffset=" + yOffset;
+            + ", xOffset=" + /*xOffset*/ 0
+            + ", yOffset=" + /*yOffset*/ 0;
     }
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/ResourceEnvironmentGroup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/ResourceEnvironmentGroup.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/ResourceEnvironmentGroup.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/modca/ResourceEnvironmentGroup.java Sun Aug 10 06:55:01 2014
@@ -21,7 +21,6 @@ package org.apache.fop.afp.modca;
 
 import java.io.IOException;
 import java.io.OutputStream;
-import java.util.List;
 
 import org.apache.fop.afp.Completable;
 
@@ -35,7 +34,8 @@ public class ResourceEnvironmentGroup ex
     private static final String DEFAULT_NAME = "REG00001";
 
     /** the pre-process presentation objects contained in this resource environment group */
-    private List/*<PreprocessPresentationObject>*/ preProcessPresentationObjects;
+    // never written
+    // private List/*<PreprocessPresentationObject>*/ preProcessPresentationObjects;
 
     /** the resource environment group state */
     private boolean complete;
@@ -47,13 +47,15 @@ public class ResourceEnvironmentGroup ex
         this(DEFAULT_NAME);
     }
 
-    private List/*<PreprocessPresentationObject>*/ getPreprocessPresentationObjects() {
+    /* not used
+    private List getPreprocessPresentationObjects() {
         if (preProcessPresentationObjects == null) {
             this.preProcessPresentationObjects
-                = new java.util.ArrayList/*<PreprocessPresentationObject>*/();
+                = new java.util.ArrayList();
         }
         return this.preProcessPresentationObjects;
     }
+    */
 
     /**
      * Constructor for the ResourceEnvironmentGroup, this takes a
@@ -92,7 +94,7 @@ public class ResourceEnvironmentGroup ex
     protected void writeContent(OutputStream os) throws IOException {
         writeObjects(mapDataResources, os);
         writeObjects(mapPageOverlays, os);
-        writeObjects(preProcessPresentationObjects, os);
+        // writeObjects(preProcessPresentationObjects, os); always empty list
     }
 
     /** {@inheritDoc} */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Block.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Block.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Block.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Block.java Sun Aug 10 06:55:01 2014
@@ -19,9 +19,10 @@
 
 package org.apache.fop.area;
 
+import java.io.IOException;
+import java.io.ObjectInputStream;
 import java.util.Locale;
 
-
 // block areas hold either more block areas or line
 // areas can also be used as a block spacer
 // a block area may have children positioned by stacking
@@ -63,12 +64,20 @@ public class Block extends BlockParent {
     private int positioning = STACK;
 
     /** if true, allow BPD update */
-    protected transient boolean allowBPDUpdate = true;
+    protected transient boolean allowBPDUpdate;
 
     private Locale locale;
 
     private String location;
 
+    public Block() {
+        allowBPDUpdate = true;
+    }
+
+    private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
+        ois.defaultReadObject();
+    }
+
     /**
      * Add the block to this block area.
      *

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/LineArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/LineArea.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/LineArea.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/LineArea.java Sun Aug 10 06:55:01 2014
@@ -44,6 +44,7 @@ public class LineArea extends Area {
      * that can be used in order to re-compute adjustement and / or indents when a
      * page-number or a page-number-citation is resolved
      */
+    // @SuppressFBWarnings("SE_INNER_CLASS")
     private final class LineAdjustingInfo implements Serializable {
 
         private static final long serialVersionUID = -6103629976229458273L;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/LinkResolver.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/LinkResolver.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/LinkResolver.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/LinkResolver.java Sun Aug 10 06:55:01 2014
@@ -19,6 +19,8 @@
 
 package org.apache.fop.area;
 
+import java.io.IOException;
+import java.io.ObjectInputStream;
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
@@ -35,6 +37,10 @@ public class LinkResolver implements Res
     private Area area;
     private transient List<Resolvable> dependents;
 
+    public LinkResolver() {
+        this(null, null);
+    }
+
     /**
      * Create a new link resolver.
      *
@@ -46,6 +52,10 @@ public class LinkResolver implements Res
         area = a;
     }
 
+    private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
+        ois.defaultReadObject();
+    }
+
     /**
      * @return true if this link is resolved
      */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/AbstractTextArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/AbstractTextArea.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/AbstractTextArea.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/AbstractTextArea.java Sun Aug 10 06:55:01 2014
@@ -31,6 +31,7 @@ public abstract class AbstractTextArea e
      * that can be used in order to re-compute adjustments when a
      * page-number or a page-number-citation is resolved
      */
+    // @SuppressFBWarnings("SE_INNER_CLASS")
     protected class TextAdjustingInfo extends InlineAdjustingInfo {
 
         private static final long serialVersionUID = -2412095162983479947L;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineArea.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineArea.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineArea.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineArea.java Sun Aug 10 06:55:01 2014
@@ -41,6 +41,7 @@ public class InlineArea extends Area {
      * that can be used in order to re-compute adjustments when a
      * page-number or a page-number-citation is resolved
      */
+    // @SuppressFBWarnings("SE_INNER_CLASS")
     protected class InlineAdjustingInfo implements Serializable {
 
         private static final long serialVersionUID = -5601387735459712149L;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineParent.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineParent.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineParent.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/InlineParent.java Sun Aug 10 06:55:01 2014
@@ -19,6 +19,8 @@
 
 package org.apache.fop.area.inline;
 
+import java.io.IOException;
+import java.io.ObjectInputStream;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -51,6 +53,10 @@ public class InlineParent extends Inline
      */
     private int maxAfterEdge;
 
+    private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
+        ois.defaultReadObject();
+    }
+
     @Override
     public void addChildArea(Area c) {
         assert c instanceof InlineArea;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/UnresolvedPageNumber.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/UnresolvedPageNumber.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/UnresolvedPageNumber.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/inline/UnresolvedPageNumber.java Sun Aug 10 06:55:01 2014
@@ -19,6 +19,8 @@
 
 package org.apache.fop.area.inline;
 
+import java.io.IOException;
+import java.io.ObjectInputStream;
 import java.util.List;
 
 import org.apache.fop.area.PageViewport;
@@ -49,6 +51,10 @@ public class UnresolvedPageNumber extend
     //Transient fields
     private transient Font font;
 
+    public UnresolvedPageNumber() {
+        this(null, null, FIRST);
+    }
+
     /**
      * Create a new unresolved page number.
      *
@@ -74,6 +80,10 @@ public class UnresolvedPageNumber extend
         pageType = type;
     }
 
+    private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
+        ois.defaultReadObject();
+    }
+
     /**
      * Get the id references for this area.
      *

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java Sun Aug 10 06:55:01 2014
@@ -397,6 +397,7 @@ public class CommandLineOptions {
                 i = i + parseUnknownOption(args, i);
             } else {
                 printUsage(System.err);
+                // @SuppressFBWarnings("DM_EXIT")
                 System.exit(1);
             }
         }
@@ -702,6 +703,7 @@ public class CommandLineOptions {
                 for (int j = 0; j < mimes.length; j++) {
                     System.out.println("  " + mimes[j]);
                 }
+                // @SuppressFBWarnings("DM_EXIT")
                 System.exit(0);
             }
         }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/Main.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/Main.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/Main.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/Main.java Sun Aug 10 06:55:01 2014
@@ -144,6 +144,7 @@ public final class Main {
         } catch (Exception e) {
             System.err.println("Unable to start FOP:");
             e.printStackTrace();
+            // @SuppressFBWarnings("DM_EXIT")
             System.exit(-1);
         }
     }
@@ -166,6 +167,7 @@ public final class Main {
         try {
             options = new CommandLineOptions();
             if (!options.parse(args)) {
+                // @SuppressFBWarnings("DM_EXIT")
                 System.exit(0);
             }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/datatypes/URISpecification.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/datatypes/URISpecification.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/datatypes/URISpecification.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/datatypes/URISpecification.java Sun Aug 10 06:55:01 2014
@@ -61,9 +61,11 @@ public final class URISpecification {
     private static final String PUNCT = ",;:$&+=";
     private static final String RESERVED = PUNCT + "?/[]@";
 
+    /* not used
     private static boolean isValidURIChar(char ch) {
         return true;
     }
+    */
 
     private static boolean isDigit(char ch) {
         return (ch >= '0' && ch <= '9');

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/datatypes/ValidationPercentBaseContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/datatypes/ValidationPercentBaseContext.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/datatypes/ValidationPercentBaseContext.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/datatypes/ValidationPercentBaseContext.java Sun Aug 10 06:55:01 2014
@@ -47,13 +47,10 @@ public final class ValidationPercentBase
         return 100000;
     }
 
-    private static PercentBaseContext pseudoContextForValidation;
+    private static PercentBaseContext pseudoContextForValidation = new ValidationPercentBaseContext();
 
     /** @return a base context for validation purposes. See class description. */
     public static PercentBaseContext getPseudoContext() {
-        if (pseudoContextForValidation == null) {
-            pseudoContextForValidation = new ValidationPercentBaseContext();
-        }
         return pseudoContextForValidation;
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOPropertyMapping.java Sun Aug 10 06:55:01 2014
@@ -287,62 +287,61 @@ public final class FOPropertyMapping imp
         return enums[enumValue];
     }
 
+    static {
+        /* this method was never called before */
+        generics = new PropertyMaker[PROPERTY_COUNT + 1];
+        FOPropertyMapping gp = new FOPropertyMapping();
+
+        /* Create the shorthand first. They are
+         * referenced by the real properties.
+         */
+        gp.createShorthandProperties();
+        gp.createGenerics();
+        gp.createAccessibilityProperties();
+        gp.createAbsolutePositionProperties();
+        gp.createAuralProperties();
+        gp.createBorderPaddingBackgroundProperties();
+        gp.createFontProperties();
+        gp.createHyphenationProperties();
+        gp.createMarginBlockProperties();
+        gp.createMarginInlineProperties();
+        gp.createRelativePosProperties();
+        gp.createAreaAlignmentProperties();
+        gp.createAreaDimensionProperties();
+        gp.createBlockAndLineProperties();
+        gp.createCharacterProperties();
+        gp.createColorProperties();
+        gp.createFloatProperties();
+        gp.createKeepsAndBreaksProperties();
+        gp.createLayoutProperties();
+        gp.createLeaderAndRuleProperties();
+        gp.createDynamicProperties();
+        gp.createMarkersProperties();
+        gp.createNumberToStringProperties();
+        gp.createPaginationAndLayoutProperties();
+        gp.createTableProperties();
+        gp.createWritingModeProperties();
+        gp.createMiscProperties();
+
+        // Hardcode the subproperties.
+        addSubpropMakerName("length", CP_LENGTH);
+        addSubpropMakerName("conditionality", CP_CONDITIONALITY);
+        addSubpropMakerName("block-progression-direction", CP_BLOCK_PROGRESSION_DIRECTION);
+        addSubpropMakerName("inline-progression-direction", CP_INLINE_PROGRESSION_DIRECTION);
+        addSubpropMakerName("within-line", CP_WITHIN_LINE);
+        addSubpropMakerName("within-column", CP_WITHIN_COLUMN);
+        addSubpropMakerName("within-page", CP_WITHIN_PAGE);
+        addSubpropMakerName("minimum", CP_MINIMUM);
+        addSubpropMakerName("maximum", CP_MAXIMUM);
+        addSubpropMakerName("optimum", CP_OPTIMUM);
+        addSubpropMakerName("precedence", CP_PRECEDENCE);
+    }
+
     /**
      * Return the array of Makers.
      * @return the maker array.
      */
     public static PropertyMaker[] getGenericMappings() {
-
-        if (generics == null) {
-            /* this method was never called before */
-            generics = new PropertyMaker[PROPERTY_COUNT + 1];
-            FOPropertyMapping gp = new FOPropertyMapping();
-
-            /* Create the shorthand first. They are
-             * referenced by the real properties.
-             */
-            gp.createShorthandProperties();
-            gp.createGenerics();
-            gp.createAccessibilityProperties();
-            gp.createAbsolutePositionProperties();
-            gp.createAuralProperties();
-            gp.createBorderPaddingBackgroundProperties();
-            gp.createFontProperties();
-            gp.createHyphenationProperties();
-            gp.createMarginBlockProperties();
-            gp.createMarginInlineProperties();
-            gp.createRelativePosProperties();
-            gp.createAreaAlignmentProperties();
-            gp.createAreaDimensionProperties();
-            gp.createBlockAndLineProperties();
-            gp.createCharacterProperties();
-            gp.createColorProperties();
-            gp.createFloatProperties();
-            gp.createKeepsAndBreaksProperties();
-            gp.createLayoutProperties();
-            gp.createLeaderAndRuleProperties();
-            gp.createDynamicProperties();
-            gp.createMarkersProperties();
-            gp.createNumberToStringProperties();
-            gp.createPaginationAndLayoutProperties();
-            gp.createTableProperties();
-            gp.createWritingModeProperties();
-            gp.createMiscProperties();
-
-            // Hardcode the subproperties.
-            addSubpropMakerName("length", CP_LENGTH);
-            addSubpropMakerName("conditionality", CP_CONDITIONALITY);
-            addSubpropMakerName("block-progression-direction", CP_BLOCK_PROGRESSION_DIRECTION);
-            addSubpropMakerName("inline-progression-direction", CP_INLINE_PROGRESSION_DIRECTION);
-            addSubpropMakerName("within-line", CP_WITHIN_LINE);
-            addSubpropMakerName("within-column", CP_WITHIN_COLUMN);
-            addSubpropMakerName("within-page", CP_WITHIN_PAGE);
-            addSubpropMakerName("minimum", CP_MINIMUM);
-            addSubpropMakerName("maximum", CP_MAXIMUM);
-            addSubpropMakerName("optimum", CP_OPTIMUM);
-            addSubpropMakerName("precedence", CP_PRECEDENCE);
-        }
-
         // @SuppressFBWarnings("MS_EXPOSE_REP")
         return generics;
     }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/NullCharIterator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/NullCharIterator.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/NullCharIterator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/NullCharIterator.java Sun Aug 10 06:55:01 2014
@@ -26,16 +26,13 @@ import java.util.NoSuchElementException;
  */
 public class NullCharIterator extends CharIterator {
 
-    private static CharIterator instance;
+    private static CharIterator instance = new NullCharIterator();
 
     /**
      * Obtain the singleton instance of the null character iterator.
      * @return the char iterator
      */
     public static CharIterator getInstance() {
-        if (instance == null) {
-            instance = new NullCharIterator();
-        }
         return instance;
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyTokenizer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyTokenizer.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyTokenizer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/expr/PropertyTokenizer.java Sun Aug 10 06:55:01 2014
@@ -333,6 +333,7 @@ class PropertyTokenizer {
      * as defined by XSL (space, newline, CR, tab).
      * @param c The character to check
      */
+    /* not used
     private static boolean isSpace(char c) {
         switch (c) {
         case ' ':
@@ -344,6 +345,7 @@ class PropertyTokenizer {
             return false;
         }
     }
+    */
 
     /**
      * Return a  boolean value indicating whether the argument is a valid name

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Marker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Marker.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Marker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Marker.java Sun Aug 10 06:55:01 2014
@@ -361,13 +361,13 @@ public class Marker extends FObjMixed {
                 = new PropertyCache<MarkerAttribute>();
 
         /** namespace */
-        protected String namespace;
+        private String namespace;
         /** qualfied name */
-        protected String qname;
+        private String qname;
         /** local name */
-        protected String name;
+        private String name;
         /** value */
-        protected String value;
+        private String value;
 
         /**
          * Main constructor

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/ColorProperty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/ColorProperty.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/ColorProperty.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/ColorProperty.java Sun Aug 10 06:55:01 2014
@@ -38,7 +38,7 @@ public final class ColorProperty extends
     /**
      * The color represented by this property.
      */
-    protected final Color color;
+    private final Color color;
 
 
     /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyMaker.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyMaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyMaker.java Sun Aug 10 06:55:01 2014
@@ -510,12 +510,6 @@ public class PropertyMaker implements Cl
                 }
             }
         }
-        if (pret != null) {
-            /*
-             * log.debug("Return shorthand value " + pret.getString() +
-             * " for " + getPropName());
-             */
-        }
         return pret;
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontCache.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontCache.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontCache.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontCache.java Sun Aug 10 06:55:01 2014
@@ -84,11 +84,8 @@ public final class FontCache implements 
      */
     private Map<String, Long> failedFontMap;
 
-    /**
-     * Default constructor
-     */
-    public FontCache() {
-        //nop
+    private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
+        ois.defaultReadObject();
     }
 
     private static File getUserHome() {

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontReader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontReader.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontReader.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontReader.java Sun Aug 10 06:55:01 2014
@@ -294,7 +294,7 @@ public class FontReader extends DefaultH
             multiFont.setWidthArray(wds);
 
         } else if ("bfranges".equals(localName)) {
-            multiFont.setCMap(bfranges.toArray(new CMapSegment[0]));
+            multiFont.setCMap(bfranges.toArray(new CMapSegment[bfranges.size()]));
         }
         text.setLength(0); //Reset text buffer (see characters())
     }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontTriplet.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontTriplet.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontTriplet.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontTriplet.java Sun Aug 10 06:55:01 2014
@@ -19,6 +19,8 @@
 
 package org.apache.fop.fonts;
 
+import java.io.IOException;
+import java.io.ObjectInputStream;
 import java.io.Serializable;
 
 
@@ -41,6 +43,10 @@ public class FontTriplet implements Comp
     //This is only a cache
     private transient String key;
 
+    public FontTriplet() {
+        this(null, null, 0);
+    }
+
     /**
      * Creates a new font triplet.
      * @param name font name
@@ -65,6 +71,10 @@ public class FontTriplet implements Comp
         this.priority = priority;
     }
 
+    private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
+        ois.defaultReadObject();
+    }
+
     /** @return the font name */
     public String getName() {
         return name;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/apps/AbstractFontReader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/apps/AbstractFontReader.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/apps/AbstractFontReader.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/apps/AbstractFontReader.java Sun Aug 10 06:55:01 2014
@@ -38,18 +38,12 @@ import org.apache.commons.logging.LogFac
 public abstract class AbstractFontReader {
 
     /** Logger instance */
-    protected static Log log;
+    protected static final Log log = LogFactory.getLog(AbstractFontReader.class);
 
     /**
      * Main constructor.
      */
     protected AbstractFontReader() {
-        // Create logger if necessary here to allow embedding of TTFReader in
-        // other applications. There is a possible but harmless synchronization
-        // issue.
-        if (log == null) {
-            log = LogFactory.getLog(AbstractFontReader.class);
-        }
     }
 
     /**
@@ -78,7 +72,7 @@ public abstract class AbstractFontReader
                 arguments.add(args[i]);
             }
         }
-        return (String[])arguments.toArray(new String[0]);
+        return (String[])arguments.toArray(new String[arguments.size()]);
     }
 
     /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/apps/TTFReader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/apps/TTFReader.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/apps/TTFReader.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/apps/TTFReader.java Sun Aug 10 06:55:01 2014
@@ -462,11 +462,12 @@ public class TTFReader extends AbstractF
                 h2 = ttf.getAnsiKerning().get(kpx1);
             }
 
-            for (Integer kpx2 : h2.keySet()) {
+            for (Map.Entry<Integer, Integer> e : h2.entrySet()) {
+                Integer kpx2 = e.getKey();
                 if (isCid || kpx2.intValue() < 256) {
                     el2 = doc.createElement("pair");
                     el2.setAttribute("kpx2", kpx2.toString());
-                    Integer val = h2.get(kpx2);
+                    Integer val = e.getValue();
                     el2.setAttribute("kern", val.toString());
                     el.appendChild(el2);
                 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OFDirTabEntry.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OFDirTabEntry.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OFDirTabEntry.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OFDirTabEntry.java Sun Aug 10 06:55:01 2014
@@ -54,8 +54,7 @@ public class OFDirTabEntry {
         tag[2] = in.readTTFByte();
         tag[3] = in.readTTFByte();
 
-        in.skip(4);    // Skip checksum
-
+        checksum = in.readTTFLong();
         offset = in.readTTFULong();
         length = in.readTTFULong();
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OTFFile.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OTFFile.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OTFFile.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OTFFile.java Sun Aug 10 06:55:01 2014
@@ -53,7 +53,7 @@ public class OTFFile extends OpenFont {
     protected void updateBBoxAndOffset() throws IOException {
         List<Mapping> gidMappings = getGIDMappings(fileFont);
         Map<Integer, String> sidNames = constructNameMap(gidMappings);
-        UnicodeMapping[] mappings = unicodeMappings.toArray(new UnicodeMapping[0]);
+        UnicodeMapping[] mappings = unicodeMappings.toArray(new UnicodeMapping[unicodeMappings.size()]);
         for (int i = 0; i < mappings.length; i++) {
             int glyphIdx = mappings[i].getGlyphIndex();
             Mapping m = gidMappings.get(glyphIdx);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OTFSubSetFile.java Sun Aug 10 06:55:01 2014
@@ -29,6 +29,7 @@ import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.Set;
 
 import org.apache.fontbox.cff.CFFStandardString;
 import org.apache.fontbox.cff.encoding.CFFEncoding;
@@ -386,7 +387,8 @@ public class OTFSubSetFile extends OTFFi
 
             List<Integer> uniqueGroups = new ArrayList<Integer>();
             for (int gid : subsetGlyphs.keySet()) {
-                Integer[] ranges = fdSelect.getRanges().keySet().toArray(new Integer[0]);
+                Set<Integer> rangeKeys = fdSelect.getRanges().keySet();
+                Integer[] ranges = rangeKeys.toArray(new Integer[rangeKeys.size()]);
                 for (int i = 0; i < ranges.length; i++) {
                     int nextRange = -1;
                     if (i < ranges.length - 1) {

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OpenFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OpenFont.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OpenFont.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/OpenFont.java Sun Aug 10 06:55:01 2014
@@ -641,6 +641,7 @@ public abstract class OpenFont {
     /**
      * Print first char/last char
      */
+    /* not used
     private void printMaxMin() {
         int min = 255;
         int max = 0;
@@ -655,6 +656,7 @@ public abstract class OpenFont {
         log.info("Min: " + min);
         log.info("Max: " + max);
     }
+    */
 
 
     /**
@@ -1606,9 +1608,10 @@ public abstract class OpenFont {
                 Map<Integer, Integer> akpx = new HashMap<Integer, Integer>();
                 Map<Integer, Integer> ckpx = kerningTab.get(unicodeKey1);
 
-                for (Integer unicodeKey2 : ckpx.keySet()) {
+                for (Map.Entry<Integer, Integer> e : ckpx.entrySet()) {
+                    Integer unicodeKey2 = e.getKey();
                     Integer cidKey2 = unicodeToGlyph(unicodeKey2.intValue());
-                    Integer kern = ckpx.get(unicodeKey2);
+                    Integer kern = e.getValue();
 
                     Iterator uniMap = mtxTab[cidKey2.intValue()].getUnicodeIndex().listIterator();
                     while (uniMap.hasNext()) {
@@ -1828,7 +1831,7 @@ public abstract class OpenFont {
                 ret.add(new Integer(i));
             }
         }
-        return ret.toArray(new Integer[0]);
+        return ret.toArray(new Integer[ret.size()]);
     }
 
     /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/PFMFile.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/PFMFile.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/PFMFile.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/type1/PFMFile.java Sun Aug 10 06:55:01 2014
@@ -118,26 +118,38 @@ public class PFMFile {
      * @throws IOException In case of an I/O problem
      */
     private void loadHeader(PFMInputStream inStream) throws IOException {
-        inStream.skip(80);
+        if (inStream.skip(80) != 80) {
+            throw new IOException("premature EOF when skipping 80 bytes");
+        }
         dfItalic = inStream.readByte();
-        inStream.skip(2);
+        if (inStream.skip(2) != 2) {
+            throw new IOException("premature EOF when skipping 2 bytes");
+        }
         inStream.readShort(); // dfWeight =
         dfCharSet = inStream.readByte();
-        inStream.skip(4);
+        if (inStream.skip(4) != 4) {
+            throw new IOException("premature EOF when skipping 4 bytes");
+        }
         dfPitchAndFamily = inStream.readByte();
         dfAvgWidth = inStream.readShort();
         dfMaxWidth = inStream.readShort();
         dfFirstChar = inStream.readByte();
         dfLastChar = inStream.readByte();
-        inStream.skip(8);
+        if (inStream.skip(8) != 8) {
+            throw new IOException("premature EOF when skipping 8 bytes");
+        }
         long faceOffset = inStream.readInt();
 
         inStream.reset();
-        inStream.skip(faceOffset);
+        if (inStream.skip(faceOffset) != faceOffset) {
+            throw new IOException("premature EOF when skipping faceOffset bytes");
+        }
         windowsName = inStream.readString();
 
         inStream.reset();
-        inStream.skip(117);
+        if (inStream.skip(117) != 117) {
+            throw new IOException("premature EOF when skipping 117 bytes");
+        }
     }
 
     /**
@@ -153,29 +165,41 @@ public class PFMFile {
         }
         final long extMetricsOffset = inStream.readInt();
         final long extentTableOffset = inStream.readInt();
-        inStream.skip(4); //Skip dfOriginTable
+        if (inStream.skip(4) != 4) { //Skip dfOriginTable
+            throw new IOException("premature EOF when skipping dfOriginTable bytes");
+        }
         final long kernPairOffset = inStream.readInt();
-        inStream.skip(4); //Skip dfTrackKernTable
+        if (inStream.skip(4) != 4) { //Skip dfTrackKernTable
+            throw new IOException("premature EOF when skipping dfTrackKernTable bytes");
+        }
         long driverInfoOffset = inStream.readInt();
 
         if (kernPairOffset > 0) {
             inStream.reset();
-            inStream.skip(kernPairOffset);
+            if (inStream.skip(kernPairOffset) != kernPairOffset) {
+                throw new IOException("premature EOF when skipping kernPairOffset bytes");
+            }
             loadKernPairs(inStream);
         }
 
         inStream.reset();
-        inStream.skip(driverInfoOffset);
+        if (inStream.skip(driverInfoOffset) != driverInfoOffset) {
+            throw new IOException("premature EOF when skipping driverInfoOffset bytes");
+        }
         postscriptName = inStream.readString();
 
         if (extMetricsOffset != 0) {
             inStream.reset();
-            inStream.skip(extMetricsOffset);
+            if (inStream.skip(extMetricsOffset) != extMetricsOffset) {
+                throw new IOException("premature EOF when skipping extMetricsOffset bytes");
+            }
             loadExtMetrics(inStream);
         }
         if (extentTableOffset != 0) {
             inStream.reset();
-            inStream.skip(extentTableOffset);
+            if (inStream.skip(extentTableOffset) != extentTableOffset) {
+                throw new IOException("premature EOF when skipping extentTableOffset bytes");
+            }
             loadExtentTable(inStream);
         }
 
@@ -231,8 +255,10 @@ public class PFMFile {
             log.warn("Size of extension block was expected to be "
                 + "52 bytes, but was " + size + " bytes.");
         }
-        inStream.skip(12); //Skip etmPointSize, etmOrientation, etmMasterHeight,
-                           //etmMinScale, etmMaxScale, emtMasterUnits
+        if (inStream.skip(12) != 12) { //Skip etmPointSize, etmOrientation, etmMasterHeight,
+                                       //etmMinScale, etmMaxScale, emtMasterUnits
+            throw new IOException("premature EOF when skipping etmPointSize, ... bytes");
+        }
         etmCapHeight = inStream.readShort();
         etmXHeight = inStream.readShort();
         etmLowerCaseAscent = inStream.readShort();

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/HyphenationTree.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/HyphenationTree.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/HyphenationTree.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/HyphenationTree.java Sun Aug 10 06:55:01 2014
@@ -27,7 +27,6 @@ import java.io.FileReader;
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
-import java.io.Serializable;
 import java.net.MalformedURLException;
 import java.util.ArrayList;
 import java.util.Collections;
@@ -45,8 +44,7 @@ import org.apache.commons.io.IOUtils;
  *
  * <p>This work was authored by Carlos Villegas (cav@uniscope.co.jp).</p>
  */
-public class HyphenationTree extends TernaryTree
-            implements PatternConsumer, Serializable {
+public class HyphenationTree extends TernaryTree implements PatternConsumer {
 
     private static final long serialVersionUID = -7842107987915665573L;
 
@@ -78,6 +76,10 @@ public class HyphenationTree extends Ter
         vspace.alloc(1);    // this reserves index 0, which we don't use
     }
 
+    private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {
+        ois.defaultReadObject();
+    }
+
     /**
      * Packs the values by storing them in 4 bits, two values into a byte
      * Values range is from 0 to 9. We use zero as terminator,

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/Hyphenator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/Hyphenator.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/Hyphenator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/hyphenation/Hyphenator.java Sun Aug 10 06:55:01 2014
@@ -43,7 +43,7 @@ import org.apache.fop.apps.io.InternalRe
 public final class Hyphenator {
 
     /** logging instance */
-    protected static final Log log = LogFactory.getLog(Hyphenator.class);
+    private static final Log log = LogFactory.getLog(Hyphenator.class);
 
     private static HyphenationTreeCache hTreeCache;
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractPageSequenceLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractPageSequenceLayoutManager.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractPageSequenceLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractPageSequenceLayoutManager.java Sun Aug 10 06:55:01 2014
@@ -376,9 +376,9 @@ public abstract class AbstractPageSequen
             if (currentPageNum % 2 == 0) { // we are now on an even page
                 curPage = makeNewPage(true);
             }
-        } else if (forcePageCount == Constants.EN_NO_FORCE) {
+        } /*  else if (forcePageCount == Constants.EN_NO_FORCE) {
             // i hope: nothing special at all
-        }
+        } */
 
         if (curPage != null) {
             finishPage();

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java Sun Aug 10 06:55:01 2014
@@ -141,9 +141,9 @@ public abstract class BlockStackingLayou
     protected void addChildToArea(Area childArea,
                                      BlockParent parentArea) {
         // This should be a block-level Area (Block in the generic sense)
-        if (!(childArea instanceof Block)) {
+        /* if (!(childArea instanceof Block)) {
             //log.error("Child not a Block in BlockStackingLM!");
-        }
+        } */
 
         parentArea.addBlock((Block) childArea);
         flush(); // hand off current area to parent

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java Sun Aug 10 06:55:01 2014
@@ -39,8 +39,7 @@ import org.apache.fop.util.ListUtil;
  * and filling them with block-level areas generated by its children.
  * TODO Reintroduce emergency counter (generate error to avoid endless loop)
  */
-public class FlowLayoutManager extends BlockStackingLayoutManager
-                               implements BlockLevelLayoutManager {
+public class FlowLayoutManager extends BlockStackingLayoutManager {
 
     /**
      * logging instance

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java Sun Aug 10 06:55:01 2014
@@ -48,7 +48,7 @@ public class ListItemContentLayoutManage
     private Block curBlockArea;
 
     private int xOffset;
-    private int itemIPD;
+    // private int itemIPD; // FIXME: never written!
 
     /**
      * Create a new Cell layout manager.
@@ -178,8 +178,8 @@ public class ListItemContentLayoutManage
             curBlockArea.setPositioning(Block.ABSOLUTE);
             // set position
             curBlockArea.setXOffset(xOffset);
-            //TODO: Check - itemIPD never set?
-            curBlockArea.setIPD(itemIPD);
+            // FIXME - itemIPD is never written!
+            curBlockArea.setIPD(/*itemIPD*/0);
             //curBlockArea.setHeight();
             curBlockArea.setBidiLevel(getPartFO().getBidiLevel());
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/CollapsingBorderModel.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/CollapsingBorderModel.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/CollapsingBorderModel.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/CollapsingBorderModel.java Sun Aug 10 06:55:01 2014
@@ -47,8 +47,7 @@ public abstract class CollapsingBorderMo
     /** Indicates that the cell is/end in the last row of a body/table-header/table-footer */
     //public static final int LAST_ROW_IN_GROUP       = 8;
 
-    //These statics are used singleton-style. No MT issues here.
-    private static CollapsingBorderModel collapse;
+    private static CollapsingBorderModel collapse = new CollapsingBorderModelEyeCatching();
     // private static CollapsingBorderModel collapseWithPrecedence = null;
 
     /**
@@ -58,9 +57,6 @@ public abstract class CollapsingBorderMo
     public static CollapsingBorderModel getBorderModelFor(int borderCollapse) {
         switch (borderCollapse) {
             case Constants.EN_COLLAPSE:
-                if (collapse == null) {
-                    collapse = new CollapsingBorderModelEyeCatching();
-                }
                 return collapse;
             case Constants.EN_COLLAPSE_WITH_PRECEDENCE:
                 throw new UnsupportedOperationException("collapse-with-precedence not yet supported");

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java Sun Aug 10 06:55:01 2014
@@ -44,7 +44,6 @@ import org.apache.fop.fo.properties.Comm
 import org.apache.fop.fo.properties.CommonBorderPaddingBackground.BorderInfo;
 import org.apache.fop.layoutmgr.AbstractLayoutManager;
 import org.apache.fop.layoutmgr.AreaAdditionUtil;
-import org.apache.fop.layoutmgr.BlockLevelLayoutManager;
 import org.apache.fop.layoutmgr.BlockStackingLayoutManager;
 import org.apache.fop.layoutmgr.ElementListObserver;
 import org.apache.fop.layoutmgr.ElementListUtils;
@@ -69,8 +68,7 @@ import org.apache.fop.util.ListUtil;
  * LayoutManager for a table-cell FO.
  * A cell contains blocks. These blocks fill the cell.
  */
-public class TableCellLayoutManager extends BlockStackingLayoutManager
-            implements BlockLevelLayoutManager {
+public class TableCellLayoutManager extends BlockStackingLayoutManager {
 
     /**
      * logging instance

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFGState.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFGState.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFGState.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFGState.java Sun Aug 10 06:55:01 2014
@@ -19,8 +19,8 @@
 
 package org.apache.fop.pdf;
 
-import java.util.Iterator;
 import java.util.Map;
+import java.util.Set;
 
 /**
  * Class representing a /ExtGState object.
@@ -186,10 +186,10 @@ public class PDFGState extends PDFObject
         if (vals1.size() != vals2.size()) {
             return false;
         }
-        for (Iterator iter = vals1.keySet().iterator(); iter.hasNext();) {
-            Object str = iter.next();
+        for (Map.Entry<Object, Object> e : (Set<Map.Entry<Object, Object>>) vals2.entrySet()) {
+            Object str = e.getKey();
             Object obj1 = vals1.get(str);
-            if (!obj1.equals(vals2.get(str))) {
+            if (!obj1.equals(e.getValue())) {
                 return false;
             }
         }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFPaintingState.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFPaintingState.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFPaintingState.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFPaintingState.java Sun Aug 10 06:55:01 2014
@@ -244,6 +244,7 @@ public class PDFPaintingState extends or
         return (PDFData)getData();
     }
 
+    // @SuppressFBWarnings("SE_INNER_CLASS")
     private class PDFData extends org.apache.fop.util.AbstractPaintingState.AbstractData {
 
         private static final long serialVersionUID = 3527950647293177764L;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFResources.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFResources.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFResources.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFResources.java Sun Aug 10 06:55:01 2014
@@ -122,8 +122,9 @@ public class PDFResources extends PDFDic
      */
    public void addFonts(PDFDocument doc, FontInfo fontInfo) {
         Map<String, Typeface> usedFonts = fontInfo.getUsedFonts();
-        for (String f : usedFonts.keySet()) {
-            Typeface font = usedFonts.get(f);
+        for (Map.Entry<String, Typeface> e : usedFonts.entrySet()) {
+            String f = e.getKey();
+            Typeface font = e.getValue();
 
             //Check if the font actually had any mapping operations. If not, it is an indication
             //that it has never actually been used and therefore doesn't have to be embedded.

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/afp/AFPRendererConfigurator.java Sun Aug 10 06:55:01 2014
@@ -38,14 +38,12 @@ import org.apache.fop.render.PrintRender
 import org.apache.fop.render.RendererConfig.RendererConfigParser;
 import org.apache.fop.render.afp.AFPFontConfig.AFPFontConfigData;
 import org.apache.fop.render.intermediate.IFDocumentHandler;
-import org.apache.fop.render.intermediate.IFDocumentHandlerConfigurator;
 import org.apache.fop.util.LogUtil;
 
 /**
  * AFP Renderer configurator
  */
-public class AFPRendererConfigurator extends PrintRendererConfigurator implements
-        IFDocumentHandlerConfigurator {
+public class AFPRendererConfigurator extends PrintRendererConfigurator {
     private static Log log = LogFactory.getLog(AFPRendererConfigurator.class);
 
     private final AFPEventProducer eventProducer;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/intermediate/IFRenderer.java Sun Aug 10 06:55:01 2014
@@ -400,9 +400,9 @@ public class IFRenderer extends Abstract
         GoToXYAction action = (GoToXYAction)actionSet.get(targetID);
         //GoToXYAction action = (GoToXYAction)idGoTos.get(targetID);
         if (action == null) {
-            if (pageIndex < 0) {
+            /* if (pageIndex < 0) {
                 //pageIndex = page
-            }
+            } */
             Point position = (Point)idPositions.get(targetID);
             // can the GoTo already be fully filled in?
             if (pageIndex >= 0 && position != null) {
@@ -1094,7 +1094,8 @@ public class IFRenderer extends Abstract
         AbstractTextArea textArea = (AbstractTextArea)space.getParentArea();
         renderTextWithAdjustments(s, (int[]) null, false, font, textArea);
 
-        if (textUtil.combined && space.isAdjustable()) {
+        /* COMBINED is always false
+        if (textUtil.COMBINED && space.isAdjustable()) {
             //Used for justified text, for example
             int tws = textArea.getTextWordSpaceAdjust()
                          + 2 * textArea.getTextLetterSpaceAdjust();
@@ -1102,6 +1103,7 @@ public class IFRenderer extends Abstract
                 textUtil.adjust(tws);
             }
         }
+        */
         super.renderSpace(space);
     }
 
@@ -1124,10 +1126,12 @@ public class IFRenderer extends Abstract
             char ch = s.charAt(i);
             textUtil.addChar(ch);
             int glyphAdjust = 0;
-            if (textUtil.combined && font.hasChar(ch)) {
+            /* COMBINED is always false
+            if (textUtil.COMBINED && font.hasChar(ch)) {
                 int tls = (i < l - 1 ? parentArea.getTextLetterSpaceAdjust() : 0);
                 glyphAdjust += tls;
             }
+            */
             if (dx != null && i < l) {
                 glyphAdjust += dx[i];
             }
@@ -1147,7 +1151,7 @@ public class IFRenderer extends Abstract
     private void renderTextWithAdjustments(String s,
                               int[][] dp, boolean reversed,
                               Font font, AbstractTextArea parentArea) {
-        assert !textUtil.combined;
+        // assert !textUtil.COMBINED;
         for (int i = 0, n = s.length(); i < n; i++) {
             textUtil.addChar(s.charAt(i));
             if (dp != null) {
@@ -1164,7 +1168,7 @@ public class IFRenderer extends Abstract
         private int starty;
         private int tls;
         private int tws;
-        private final boolean combined = false;
+        // private final static boolean COMBINED = false; // no longer referenced
 
         void addChar(char ch) {
             text.append(ch);
@@ -1221,13 +1225,13 @@ public class IFRenderer extends Abstract
         void flush() {
             if (text.length() > 0) {
                 try {
-                    if (combined) {
+                    /* if (COMBINED) { // COMBINED is always false
                         painter.drawText(startx, starty, 0, 0,
                                          trimAdjustments(dp, text.length()), text.toString());
-                    } else {
+                    } else { */
                         painter.drawText(startx, starty, tls, tws,
                                          trimAdjustments(dp, text.length()), text.toString());
-                    }
+                    /* } */
                 } catch (IFException e) {
                     handleIFException(e);
                 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLGenerator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLGenerator.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLGenerator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLGenerator.java Sun Aug 10 06:55:01 2014
@@ -21,20 +21,12 @@ package org.apache.fop.render.pcl;
 
 import java.awt.Color;
 import java.awt.Dimension;
-import java.awt.Graphics2D;
-import java.awt.geom.AffineTransform;
-import java.awt.image.BufferedImage;
-import java.awt.image.BufferedImageOp;
-import java.awt.image.ByteLookupTable;
-import java.awt.image.ColorModel;
 import java.awt.image.DataBuffer;
 import java.awt.image.DataBufferByte;
 import java.awt.image.IndexColorModel;
-import java.awt.image.LookupOp;
 import java.awt.image.MultiPixelPackedSampleModel;
 import java.awt.image.Raster;
 import java.awt.image.RenderedImage;
-import java.awt.image.WritableRaster;
 import java.io.DataOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
@@ -45,7 +37,6 @@ import java.util.Locale;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.io.output.ByteArrayOutputStream;
 
-import org.apache.xmlgraphics.image.GraphicsUtil;
 import org.apache.xmlgraphics.util.UnitConv;
 
 import org.apache.fop.util.bitmap.BitmapImageUtil;
@@ -82,7 +73,7 @@ public class PCLGenerator {
      * true: Standard PCL shades are used (poor quality). false: user-defined pattern are used
      * to create custom dither patterns for better grayscale quality.
      */
-    private final boolean usePCLShades = false;
+    private static final boolean USE_PCL_SHADES = false;
 
     /**
      * Main constructor.
@@ -390,7 +381,7 @@ public class PCLGenerator {
             //y += h;
         }
         setPatternTransparencyMode(false);
-        if (usePCLShades
+        if (USE_PCL_SHADES
                 || Color.black.equals(col)
                 || Color.white.equals(col)) {
             writeCommand("*c" + formatDouble4(w / 100.0) + "h"
@@ -521,7 +512,7 @@ public class PCLGenerator {
         } else if (Color.white.equals(col)) {
             selectCurrentPattern(0, 1); //white
         } else {
-            if (usePCLShades) {
+            if (USE_PCL_SHADES) {
                 selectCurrentPattern(convertToPCLShade(col), 2);
             } else {
                 defineGrayscalePattern(col, 32, DitherUtil.DITHER_MATRIX_4X4);
@@ -647,6 +638,7 @@ public class PCLGenerator {
         }
     }
 
+    /* not used
     private RenderedImage getMask(RenderedImage img, Dimension targetDim) {
         ColorModel cm = img.getColorModel();
         if (cm.hasAlpha()) {
@@ -685,6 +677,7 @@ public class PCLGenerator {
             return null;
         }
     }
+    */
 
     /**
      * Paint a bitmap at the current cursor position. The bitmap is converted to a monochrome

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLGraphics2D.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLGraphics2D.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLGraphics2D.java Sun Aug 10 06:55:01 2014
@@ -55,7 +55,7 @@ public class PCLGraphics2D extends Abstr
     /** The PCL generator */
     protected PCLGenerator gen;
 
-    private final boolean failOnUnsupportedFeature = true;
+    private static final boolean FAIL_ON_UNSUPPORTED_FEATURE = true;
     private boolean clippingDisabled;
 
     /**
@@ -120,7 +120,7 @@ public class PCLGraphics2D extends Abstr
      * @param msg the error message to be displayed
      */
     protected void handleUnsupportedFeature(String msg) {
-        if (this.failOnUnsupportedFeature) {
+        if (this.FAIL_ON_UNSUPPORTED_FEATURE) {
             throw new UnsupportedOperationException(msg);
         }
     }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRendererConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRendererConfigurator.java?rev=1617052&r1=1617051&r2=1617052&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRendererConfigurator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pcl/PCLRendererConfigurator.java Sun Aug 10 06:55:01 2014
@@ -29,7 +29,6 @@ import org.apache.fop.fonts.FontCollecti
 import org.apache.fop.render.PrintRendererConfigurator;
 import org.apache.fop.render.RendererConfig.RendererConfigParser;
 import org.apache.fop.render.intermediate.IFDocumentHandler;
-import org.apache.fop.render.intermediate.IFDocumentHandlerConfigurator;
 import org.apache.fop.render.java2d.Base14FontCollection;
 import org.apache.fop.render.java2d.ConfiguredFontCollection;
 import org.apache.fop.render.java2d.InstalledFontCollection;
@@ -38,8 +37,7 @@ import org.apache.fop.render.java2d.Java
 /**
  * PCL Renderer configurator
  */
-public class PCLRendererConfigurator extends PrintRendererConfigurator
-        implements IFDocumentHandlerConfigurator {
+public class PCLRendererConfigurator extends PrintRendererConfigurator {
 
     /**
      * Default constructor



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message