You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by cj...@apache.org on 2001/04/26 16:51:16 UTC

cvs commit: xml-batik/sources/org/apache/batik/svggen SVGComposite.java SVGCustomComposite.java

cjolif      01/04/26 07:51:16

  Modified:    sources/org/apache/batik/svggen SVGComposite.java
                        SVGCustomComposite.java
  Log:
  recently introduced HashMap accepts the null key =>
  explicitely throw a NullPointerException for null composite.
  Was detected by the SVGAcurracyTestValidator...
  
  Revision  Changes    Path
  1.5       +2 -2      xml-batik/sources/org/apache/batik/svggen/SVGComposite.java
  
  Index: SVGComposite.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/svggen/SVGComposite.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- SVGComposite.java	2001/04/26 14:17:11	1.4
  +++ SVGComposite.java	2001/04/26 14:51:16	1.5
  @@ -30,7 +30,7 @@
    *   extension mechanism.
    *
    * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  - * @version $Id: SVGComposite.java,v 1.4 2001/04/26 14:17:11 cjolif Exp $
  + * @version $Id: SVGComposite.java,v 1.5 2001/04/26 14:51:16 cjolif Exp $
    * @see                org.apache.batik.svggen.SVGAlphaComposite
    */
   public class SVGComposite implements SVGConverter {
  @@ -99,7 +99,7 @@
        *         equivalent of the input Composite
        */
       public SVGCompositeDescriptor toSVG(Composite composite) {
  -        if(composite instanceof AlphaComposite)
  +        if (composite instanceof AlphaComposite)
               return svgAlphaComposite.toSVG((AlphaComposite)composite);
           else
               return svgCustomComposite.toSVG(composite);
  
  
  
  1.6       +3 -1      xml-batik/sources/org/apache/batik/svggen/SVGCustomComposite.java
  
  Index: SVGCustomComposite.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/svggen/SVGCustomComposite.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SVGCustomComposite.java	2001/04/26 14:17:16	1.5
  +++ SVGCustomComposite.java	2001/04/26 14:51:16	1.6
  @@ -21,7 +21,7 @@
    * a set of SVG properties and definitions.
    *
    * @author <a href="mailto:vincent.hardy@eng.sun.com">Vincent Hardy</a>
  - * @version $Id: SVGCustomComposite.java,v 1.5 2001/04/26 14:17:16 cjolif Exp $
  + * @version $Id: SVGCustomComposite.java,v 1.6 2001/04/26 14:51:16 cjolif Exp $
    * @see                org.apache.batik.svggen.SVGComposite
    */
   public class SVGCustomComposite extends AbstractSVGConverter {
  @@ -52,6 +52,8 @@
        *         composite equivalent to the input Composite.
        */
       public SVGCompositeDescriptor toSVG(Composite composite) {
  +        if (composite == null)
  +            throw new NullPointerException();
           SVGCompositeDescriptor compositeDesc =
               (SVGCompositeDescriptor)descMap.get(composite);
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org