-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
With few fixes.
Maybe fixes #295
I honestly don't understand the required specifications, but is this correct?
The following test confirms that the
LRUMap
set toreflectionCacheSize
is retained, but not its contents.