EsotericSoftware/kryo — pull request #271 by Kleptine (2014-11-30 00:56:45+00:00)
Title: Removing Fields on Contained Generics

Kryo would previously throw an error when you tried used a serializer with removed fields where the class contained a generic, and you removed a field on that generic.

The removed field was being stored in removedFields, but when rebuildCachedFields() was called a second time (from setGenerics) it tried to remove the already removed field a second time, throwing an exception.

This only happens on generics as far as I can tell because setGenerics causes rebuildCachedFields to be called the second time.

Kryo isn't properly keeping track of what fields had been removed, so that's still a bit broken, but for now we just make sure not to rebuild the cache when applying generics. This fixes the symptom, but not the problem.