The encode of LineStringPropertyType in GMLComplexType verify the class of value like a point

Description

In GMLComplexType, it exist an inner class LineStringPropertyType.
This innerclass contains an method encode like :
public void encode(Element element, Object value, PrintHandler output,
Map hints) throws IOException, OperationNotSupportedException {
if ((value == null) || !(value instanceof Point)) {
throw new OperationNotSupportedException("Value is "+value == null?"null":value.getClass().getName());
}

if (element == null) {
output.startElement(GMLSchema.NAMESPACE, "lineStringProperty",
null);
GMLComplexTypes.encode(null, (LineString) value, output);
output.endElement(GMLSchema.NAMESPACE, "lineStringProperty");
} else {
output.startElement(element.getNamespace(), element.getName(),
null);
GMLComplexTypes.encode(null, (LineString) value, output);
output.endElement(element.getNamespace(), element.getName());
}
}
In the first if, we check the parameter value but class of value is never Point but LineString.
In other inner class for propertyType the check of value in encode is correct.

Environment

CentOS, liferay vaadin, jboss, geoserver

Assignee

Unassigned

Reporter

jadot

Triage

None

Components

Fix versions

Affects versions

Priority

High
Configure