| Hi all, I am writing a client application using the WFS-Plugin to send WFS-T requests. The features I am sending have multiple geometry attributes, some might be null. On null geometries the GML encoding fails with the following stacktrace:
From the code:
public void encode(Element element, Object value, PrintHandler output,
Map hints) throws IOException, OperationNotSupportedException {
if ((value == null) || !(value instanceof MultiPolygon)) {
throw new OperationNotSupportedException("Value is
"+value == null?"null":value.getClass().getName());
}
...
}
(Instead of the desired OperationNotSupportedException a NPE is thrown because of operator precedence.) Question:
- Why the exception? It would have been quite easy to just skip null
values and write nothing instead.
- What is the suggested solution? I have tried to encode an empty
Multipolygon instead but it fails, too.
Best regards any many thanks, Andreas |