]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fix findbugs warning.
authorGlenn Adams <gadams@apache.org>
Thu, 17 May 2012 15:53:37 +0000 (15:53 +0000)
committerGlenn Adams <gadams@apache.org>
Thu, 17 May 2012 15:53:37 +0000 (15:53 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1339667 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/afp/modca/GraphicsObject.java

index 05cdf5eb83465044647c601ad37a71f9bd4cf012..6dc6bb53f541f46619866241a8f72a935d71acee 100644 (file)
@@ -195,7 +195,8 @@ public class GraphicsObject extends AbstractDataObject {
      * @param lineWidth the line width multiplier
      */
     public void setLineWidth(float lineWidth) {
-        if (lineWidth != graphicsState.lineWidth) {
+        float epsilon = Float.MIN_NORMAL;
+        if ( Math.abs ( graphicsState.lineWidth - lineWidth ) > epsilon ) {
             addObject(new GraphicsSetFractionalLineWidth(lineWidth));
             graphicsState.lineWidth = lineWidth;
         }