vhardy      2003/07/13 16:18:17

  Modified:    test-resources/org/apache/batik/svggen regsvggen.xml
               sources/org/apache/batik/svggen SVGGeneratorContext.java
  Added:       test-sources/org/apache/batik/svggen DoubleString.java
  Log:
  Fixed bug 21547 on SVGGeneratorContext.doubleString
  
  Revision  Changes    Path
  1.1                  xml-batik/test-sources/org/apache/batik/svggen/DoubleString.java
  
  Index: DoubleString.java
  ===================================================================
  /*****************************************************************************
   * Copyright (C) The Apache Software Foundation. All rights reserved.        *
   * ------------------------------------------------------------------------- *
   * This software is published under the terms of the Apache Software License *
   * version 1.1, a copy of which has been included with this distribution in  *
   * the LICENSE file.                                                         *
   *****************************************************************************/
  
  package org.apache.batik.svggen;
  
  import java.awt.geom.Rectangle2D;
  
  import org.apache.batik.test.AbstractTest;
  import org.apache.batik.test.TestReport;
  
  import org.apache.batik.dom.GenericDOMImplementation;
  
  import org.w3c.dom.Document;
  import org.w3c.dom.DOMImplementation;
  
  /**
   * Checks that no NullPointerException is thrown by default
   *
   * @author <a href="mailto:[EMAIL PROTECTED]">Vincent Hardy</a>
   * @version $Id: DoubleString.java,v 1.1 2003/07/13 23:18:17 vhardy Exp $
   */
  public class DoubleString extends AbstractTest {
      public TestReport runImpl() throws Exception {
          // Get a DOMImplementation
          DOMImplementation domImpl =
              GenericDOMImplementation.getDOMImplementation();
          
          // Create an instance of org.w3c.dom.Document
          Document document = domImpl.createDocument(null, "svg", null);
          
          SVGGraphics2D g = new SVGGraphics2D(document);
          Rectangle2D r = new Rectangle2D.Float(0.5f, 0.5f, 2.33f, 2.33f);
          g.fill(r);
  
          return reportSuccess();
      }
  }
  
  
  
  1.21      +4 -1      xml-batik/test-resources/org/apache/batik/svggen/regsvggen.xml
  
  Index: regsvggen.xml
  ===================================================================
  RCS file: /home/cvs/xml-batik/test-resources/org/apache/batik/svggen/regsvggen.xml,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- regsvggen.xml     4 Jul 2003 15:25:43 -0000       1.20
  +++ regsvggen.xml     13 Jul 2003 23:18:17 -0000      1.21
  @@ -53,4 +53,7 @@
           <property name="ReferenceScore" class="java.lang.Double" 
value="0.3724747761938356" />
       </test>
   
  +    <!-- SVGGeneratorTests.doubleString NullPointerException regression test -->
  +    <test id="DoubleString" class="org.apache.batik.svggen.DoubleString" />
  +
   </testSuite>
  
  
  
  1.17      +2 -2      
xml-batik/sources/org/apache/batik/svggen/SVGGeneratorContext.java
  
  Index: SVGGeneratorContext.java
  ===================================================================
  RCS file: 
/home/cvs/xml-batik/sources/org/apache/batik/svggen/SVGGeneratorContext.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- SVGGeneratorContext.java  4 Jul 2003 15:25:37 -0000       1.16
  +++ SVGGeneratorContext.java  13 Jul 2003 23:18:17 -0000      1.17
  @@ -431,7 +431,7 @@
   
       protected static DecimalFormat decimalFormats[] = new DecimalFormat[13];
   
  -    {
  +    static {
           decimalFormats[0] = new DecimalFormat("#", dsf);
   
           String format = "#.";
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to