Fix ReflectionCache to be serializable - #634
Conversation
|
@k163377 There are existing tests that can help. so you need not write a file, but just write as and with that I think 2 things need to be tested, if not already:
Of these (1) might fail, and figuring out which things it refers to are not serializable can be some work. So here, just adding test for (2) would make sense, I think. ... although there is also difference between empty cache with no entries (not referencing things that might not be Serializable) and cache with entries. This is why test (1) is often done only after serializing once, deserializing once, to let referenced components be initialized. But on verifying that a class is JDK serializable/deserializable, all that is needed is for write-then-read to succeed without exception. I hope this helps. |
|
Oh, also; when testing a non-empty cache, I am pretty sure you will find out that actual cache |
|
@cowtowncoder |
With few fixes.
Maybe fixes #295
I honestly don't understand the required specifications, but is this correct?
The following test confirms that the
LRUMapset toreflectionCacheSizeis retained, but not its contents.