NPE when CSS parameter "stroke-dasharray" is referenced from GML
----------------------------------------------------------------

                 Key: GEOT-2929
                 URL: http://jira.codehaus.org/browse/GEOT-2929
             Project: GeoTools
          Issue Type: Bug
          Components: core styling
    Affects Versions: 2.5.7
            Reporter: Jan Schroeter


Using the following (legal) SLD fragment results in a NullPointerException:

<Rule>
  <LineSymbolizer>
    <Stroke>

<CssParameter 
name="stroke-dasharray"><ogc:PropertyName>strokeDashArray</ogc:PropertyName></CssParameter>

    </Stroke>
  </LineSymbolizer>
                        
</Rule>

The idea behind the SLD is to store the style information in the GML and 
reference it from the SLD. This works pretty well for a lot of other CSS 
parameters but not for this one.

When parsing this SLD with SLDParser.readXML() the following NPE is thrown:

java.lang.NullPointerException
        at java.util.StringTokenizer.<init>(StringTokenizer.java:182)
        at java.util.StringTokenizer.<init>(StringTokenizer.java:204)
        at org.geotools.styling.SLDParser.parseStroke(SLDParser.java:1879)
        at 
org.geotools.styling.SLDParser.parseLineSymbolizer(SLDParser.java:958)
        at org.geotools.styling.SLDParser.parseRule(SLDParser.java:888)
        at 
org.geotools.styling.SLDParser.parseFeatureTypeStyle(SLDParser.java:800)
        at org.geotools.styling.SLDParser.parseStyle(SLDParser.java:746)
        at org.geotools.styling.SLDParser.readDOM(SLDParser.java:319)
        at org.geotools.styling.SLDParser.readXML(SLDParser.java:295)

I observed this bug using GeoTools 2.5.7 and have not checked 2.6 yet (sorry).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to