SchemaIndexImpl has problems if XSDSchema.getSchemaForSchema() returns null
---------------------------------------------------------------------------
Key: GEOT-2961
URL: http://jira.codehaus.org/browse/GEOT-2961
Project: GeoTools
Issue Type: Bug
Components: data wfs, ext xml-xsd
Affects Versions: 2.6.1
Reporter: Milton Jonathan
Fix For: 2.6.2
Problems were seen with a particular WFS server when trying to access its data
using the GeoTools WFS DataStore (unfortunately, the server is not a public one
for you guys to test).
What happens is that SchemaIndexImpl seems to get into trouble (ending in a
NPE) because that server returns XSDSchemas that do not have a "Schema For
Schema" (which I admit not to know what it is).
The problems seem to start in SchemaIndexImpl's constructor: it receives an
array of schemas and creates interally a copy of the array with one extra
entry, computed by calling "schemas[0].getSchemaForSchema()" (I have no idea
why). In this case, it ends up that this last entry remains null. As such, a
NPE ends up being thrown by its own buildElementIndex() method, which never
checks for a null schema in the array.
It is not clear if it is the server's fault that there is an XSDSchema without
a "Schema for Schema". In any case, GeoTools should probably shield itself from
that kind of behavior.
--
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
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel