ServiceInfo XStream deserialization may lead to null pointer exceptions
-----------------------------------------------------------------------
Key: GEOS-3846
URL: http://jira.codehaus.org/browse/GEOS-3846
Project: GeoServer
Issue Type: Bug
Reporter: Andrea Aime
Assignee: Justin Deoliveira
Fix For: 2.0.2
Looking into why WPS capabilities generation would throw an NPE after the first
GS restart with WPS enabled I found the keywords array in the WPSServiceImpl to
be null.
Investigation shows that XStream is not calling the default constructor when
doing deserialization
(http://xstream.codehaus.org/faq.html#Serialization_no_ctor_running) meaning
the collections are not getting initialized.
I know XStreamServiceLoader.initialize is meant to be used for this purpose,
but looking around I see that only the versions array is taken care of, meaning
other services are just as vulnerable to this failure should someone remove the
<service>.xml file and restart GeoServer.
I think we can fix this by having XStreamServiceLoader.initialize take care of
initializing all collections in ServiceInfoImpl, and recommend subclasses to
call back to the parent implementation before adding their own specific bits.
Opinions?
--
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
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel