droidparts
droidparts copied to clipboard
ArrayCollectionConverter is used instead of ByteArrayConverter for byte[]
ArrayCollectionConverter is used instead of ByteArrayConverter for byte[] leading to crash:
SQLiteException: Unable to convert BLOB to string
After I've migrated from 2.7.7 to 3.2.5 I am getting this error.
Looks like (converter.getDBColumnType() == BLOB)
at L171 doesn't evaluate to true, since ByteConverter returns INTEGER, thus ArrayCollectionConverter tries to get a String at L175.
At this moment I solve this by calling ConverterRegistry.registerConverter(new ByteArrayConverter());
which puts it at index 0 of the registry.
Maybe the ArrayCollectionConverter.canHandle(Class<?> cls)
should return false for byte[]?