but it could catch the user unaware for any registered non-leaf
class. When a class has a field of a specific final type then
the type information is implicit in the outer object... and
the proper serialization information can be written. It is then
sometimes useful to register a generic serializer for something
like Enum to catch these cases. However, there are many times where
the type cannot be implicitly known and so must be specifically
registered. Prior to this fix, having a generic Enum serializer
registered would cause problems on the reading end because it
wouldn't know what real enum class to use.
Now we catch the issue on the write side where enough information
is known to properly report this to the user. Only a few Bothans
died to bring this info.