Hello there

I've been having some trouble 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.

I thought of opening a JIRA issue with this, but I'm actually not sure:
- is it the server's fault that there is an XSDSchema without a "Schema 
for Schema"?
- if it is the server's fault, should GeoTools shield itself from that 
kind of behavior? (I'd say yes)

Cheers
Milton

-- 

Milton Jonathan
Grupo GIS e Meio Ambiente
Tecgraf/PUC-Rio
Tel: +55-21-3527-2502

------------------------------------------------------------------------------
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

Reply via email to