NPE in WMS.getFeatureTypeTimes when feature has null time attribute
-------------------------------------------------------------------

                 Key: GEOS-4865
                 URL: https://jira.codehaus.org/browse/GEOS-4865
             Project: GeoServer
          Issue Type: Bug
          Components: WMS
    Affects Versions: 2.1.2
            Reporter: Ian Schneider
            Assignee: Andrea Aime
         Attachments: fixWMSNPE.patch

The unique values computed by the UniqueVisitor include null in this case. This 
fails when adding the computed HashSet (can contain null) to a TreeSet (cannot 
contain nulls).

Attached (teeny) patch removes the null value from the unique set before 
adding. 

As an aside, when looking at UniqueVisitor, it appears that null values are not 
added to the set (at least not in visit(Feature). In this case, the 
JDBCDataStore uses the setValue(Object) method that does not strip nulls from 
the resulting set. Recommend fixing the semantics of setValue though not sure 
what would break...

Of course, removing a null from a set invites breakage when someone decides the 
UniqueVisitor set implementation should be TreeSet. Perhaps another nice change 
would be to allow providing the set implementation for UniqueVisitor - this 
would also avoid the extra set copying that is occurring...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to