ECQL featureId decoding/encoding consistency

Description

From Andrew Hulbert via email:

It throws a ClassCastException before it printlns in the ICQL.toCQL method (line 230):

StringBuilder output = (StringBuilder) filter.accept( toCQL, StringBuilder() );

Exception here:

java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.StringBuilder
at org.geotools.filter.text.ecql.ECQL.toCQL(ECQL.java:230)
at geomesa.core.FilterFailTest.test(FilterFailTest.java:26)

Specifically, its caused by the fact that the filter Id that is returned by the FilterFactory is visited by the class FilterToECQL line 100 which is the method that returns a String rather than a StringBuilder like it does for other Filters.

Test:
@Test
void test(){
FilterFactory ff = CommonFactoryFinder.getFilterFactory(GeoTools.getDefaultHints());
Filter filter = ff.id( Collections.singleton(ff.featureId()));

.out.println(ECQL.toCQL(filter)) ;
}

Environment

None

Assignee

Unassigned

Reporter

codehaus

Triage

None

Components

Fix versions

Affects versions

Priority

Medium
Configure