We have introduced many new methods on the journey to symbology encoding 1.1 support:
We need to ensure that each one of these is mutable:
- setName( String )
- setDescription( Description )
One implementation detail encountered while fixing this bug is how to "cast" from an org.opengis.style.Description to a org.geotools.styling.Description that has set methods.
It was a choice between:
- DescriptionImpl.cast( org.opengis.style.Description ); or
- new DescriptionImpl( org.opengis.style.Description )
I have gone with the initial approach of a cast method - so that I can perform an instanceof check and avoid doing any extra creation.