https://issues.apache.org/bugzilla/show_bug.cgi?id=54229

            Bug ID: 54229
           Summary: Gradients with an href that points to nothing throw an
                    NPE
           Product: Batik
           Version: 1.7
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Bridge
          Assignee: [email protected]
          Reporter: [email protected]
    Classification: Unclassified

If the xlink:href attribute on a gradient points to a non-existent element, an
NPE is thrown when rendering.

For example:

<radialGradient id="MyGradient" xlink:href="#Nonexistent">
  <stop offset="0%" stop-color="green" />
  <stop offset="50%" stop-color="blue" />
  <stop offset="100%" stop-color="red" />
</radialGradient>


thows:

java.lang.NullPointerException
    at
org.apache.batik.bridge.SVGUtilities.getChainableAttributeNS(SVGUtilities.java:255)
    at
org.apache.batik.bridge.AbstractSVGGradientElementBridge.createPaint(AbstractSVGGradientElementBridge.java:92)
    at
org.apache.batik.bridge.PaintServer.convertURIPaint(PaintServer.java:359)
    at org.apache.batik.bridge.PaintServer.convertPaint(PaintServer.java:259)
    at
org.apache.batik.bridge.PaintServer.convertFillPaint(PaintServer.java:228)
    at
org.apache.batik.bridge.PaintServer.convertFillAndStroke(PaintServer.java:146)
    at
org.apache.batik.bridge.SVGShapeElementBridge.createShapePainter(SVGShapeElementBridge.java:117)
    at
org.apache.batik.bridge.SVGRectElementBridge.createShapePainter(SVGRectElementBridge.java:153)
    at
org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(SVGShapeElementBridge.java:91)
    at
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:224)
    at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
    at
org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219)
    at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171)
    at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:82)
    at org.apache.batik.swing.svg.GVTTreeBuilder.run(GVTTreeBuilder.java:96)

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to