]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
FOP-2192: fix checkstyle and findbugs warnings
authorGlenn Adams <gadams@apache.org>
Fri, 18 Jan 2013 17:45:40 +0000 (17:45 +0000)
committerGlenn Adams <gadams@apache.org>
Fri, 18 Jan 2013 17:45:40 +0000 (17:45 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1435269 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/complexscripts/fonts/GlyphPositioningSubtable.java
src/java/org/apache/fop/complexscripts/fonts/GlyphSubstitutionSubtable.java
src/java/org/apache/fop/complexscripts/scripts/ScriptProcessor.java
src/java/org/apache/fop/layoutmgr/inline/ImageLayout.java
src/java/org/apache/fop/pdf/PDFText.java
src/java/org/apache/fop/pdf/PDFTextUtil.java
src/java/org/apache/fop/render/ps/PSTextPainter.java
status.xml

index 5bf073bf4123a0e7d566439449635b0f4afc6264..d1dae32756d854037d8ca7377ed6f5d648d0c99a 100644 (file)
@@ -34,7 +34,7 @@ import org.apache.fop.complexscripts.util.ScriptContextTester;
  */
 public abstract class GlyphPositioningSubtable extends GlyphSubtable implements GlyphPositioning {
 
-    private static final GlyphPositioningState state = new GlyphPositioningState();
+    private static final GlyphPositioningState state = new GlyphPositioningState();   // CSOK: ConstantName
 
     /**
      * Instantiate a <code>GlyphPositioningSubtable</code>.
index 4468545667da5a9ae6a6a4a49980f181cfdab5ff..2ea24778580edc4a254dfb4d09af10d1a289193f 100644 (file)
@@ -33,7 +33,7 @@ import org.apache.fop.complexscripts.util.ScriptContextTester;
  */
 public abstract class GlyphSubstitutionSubtable extends GlyphSubtable implements GlyphSubstitution {
 
-    private static final GlyphSubstitutionState state = new GlyphSubstitutionState();
+    private static final GlyphSubstitutionState state = new GlyphSubstitutionState();   // CSOK: ConstantName
 
     /**
      * Instantiate a <code>GlyphSubstitutionSubtable</code>.
index 95d9a4e0088764bec73bec3e718f6d3239fe3318..d8223bf478090709b706510c4f0409825f32a5b4 100644 (file)
@@ -33,7 +33,9 @@ import org.apache.fop.complexscripts.util.ScriptContextTester;
 
 // CSOFF: InnerAssignmentCheck
 // CSOFF: LineLengthCheck
+// CSOFF: NoWhitespaceAfterCheck
 // CSOFF: ParameterNumberCheck
+// CSOFF: SimplifyBooleanReturnCheck
 
 /**
  * <p>Abstract script processor base class for which an implementation of the substitution and positioning methods
index 2ef70b15ef3e3f30d9125fa15180b4717a39432d..530ad024cb20436d8faae585dc984e623f184c51 100644 (file)
@@ -179,13 +179,13 @@ public class ImageLayout implements Constants {
         //Adjust viewport if not explicit
         if (ipd == -1) {
             ipd = constrainExtent(cwidth,
-                    props.getInlineProgressionDimension(), (foundNonAuto) ?
-                            props.getContentWidth() : new DefaultLength());
+                    props.getInlineProgressionDimension(), (foundNonAuto)
+                            props.getContentWidth() : new DefaultLength());
         }
         if (bpd == -1) {
             bpd = constrainExtent(cheight,
-                    props.getBlockProgressionDimension(), (foundNonAuto) ?
-                            props.getContentHeight() : new DefaultLength());
+                    props.getBlockProgressionDimension(), (foundNonAuto)
+                            props.getContentHeight() : new DefaultLength());
         }
 
         this.clip = false;
index e581800e0d5c63972122f8b55de4d6533e14009c..a1b3cff1656088822311e7a682a0ef836d3360aa 100644 (file)
@@ -213,7 +213,7 @@ public class PDFText extends PDFObject {
      */
     public static final void toUnicodeHex(char c, StringBuffer sb) {
         for (int i = 0; i < 4; ++i) {
-            sb.append(DIGITS[(c >> (12-4*i)) & 0x0F]);
+            sb.append(DIGITS[(c >> (12 - 4 * i)) & 0x0F]);
         }
     }
 
index 1b960ebb5af4813b4c581ba3950127edd23c5baf..aae214fd37d62d7ba09187a4fcf77f0675424797 100644 (file)
@@ -186,7 +186,7 @@ public abstract class PDFTextUtil {
         sb.append('/');
         sb.append(fontName);
         sb.append(' ');
-        PDFNumber.doubleOut(fontSize,6,sb);
+        PDFNumber.doubleOut(fontSize, 6, sb);
         sb.append(" Tf\n");
         write(sb);
         this.startText = useMultiByte ? "<" : "(";
index 9abe37ed7574d89e362fcb07d9bda7ad97ec57ed..eb218802632af6d216f16d1c63a065eaffdd7bcc 100644 (file)
@@ -38,6 +38,10 @@ import java.util.List;
 import org.apache.batik.gvt.font.GVTGlyphVector;
 import org.apache.batik.gvt.text.TextPaintInfo;
 import org.apache.batik.gvt.text.TextSpanLayout;
+
+import org.apache.xmlgraphics.java2d.ps.PSGraphics2D;
+import org.apache.xmlgraphics.ps.PSGenerator;
+
 import org.apache.fop.fonts.Font;
 import org.apache.fop.fonts.FontInfo;
 import org.apache.fop.fonts.FontMetrics;
@@ -46,8 +50,6 @@ import org.apache.fop.fonts.MultiByteFont;
 import org.apache.fop.svg.NativeTextPainter;
 import org.apache.fop.util.CharUtilities;
 import org.apache.fop.util.HexEncoder;
-import org.apache.xmlgraphics.java2d.ps.PSGraphics2D;
-import org.apache.xmlgraphics.ps.PSGenerator;
 
 /**
  * Renders the attributed character iterator of a {@link org.apache.batik.gvt.TextNode TextNode}.
index caec3a862c490c2b74226a7be50d9c8b2842429b..925ba4c1717f1d7eefcdb64e6cbec58f24c5aeb8 100644 (file)
@@ -59,6 +59,9 @@
       documents. Example: the fix of marks layering will be such a case when it's done.
     -->
     <release version="FOP Trunk" date="TBD">
+      <action context="Code" dev="GA" type="fix" fixes-bug="FOP-2192">
+       Fix checkstyle and findbugs warnings.
+      </action>
       <action context="Renderers" dev="GA" type="fix" fixes-bug="FOP-2191">
        Cache matched lookups, assembled lookup spec uses; reduce glyph processing state allocation.
       </action>