podam icon indicating copy to clipboard operation
podam copied to clipboard

CharSequence are not instanciated by default PodamFactory

Open marcelmaatkamp opened this issue 4 years ago • 3 comments

Apache Avro uses CharSequence for string-type attributes when (de-)serializing java pojo's. Testing these with Podam requires a 'CharSequenceTypeManufacturer' which is currently missing:

WARN u.c.jemos.podam.api.PodamFactoryImpl - Cannot instantiate a class interface java.lang.CharSequence. Resorting to uk.co.jemos.podam.api.NullExternalFactory external factory

marcelmaatkamp avatar Oct 20 '22 17:10 marcelmaatkamp

I have made a pull-request #309 which implements CharSequenceTypeManufacturerImpl and a test-case.

marcelmaatkamp avatar Oct 20 '22 17:10 marcelmaatkamp

Hi,

CharSequence is an interface implemented by String and we already have StringTypeManufacturerImpl, which is able to produce objects of desired types.

In the pull requests you test getClassInfo(), but not actual manufacturing.

Thanks, Daniil

daivanov avatar Oct 23 '22 18:10 daivanov

Fixed in7.2.11-RELEASE or later

daivanov avatar Oct 29 '22 21:10 daivanov