Skip to content
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

Reflection.properties returns different results on first and following calls #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ubald
Copy link

@ubald ubald commented Jan 18, 2017

Sorry for doing it like this, issues are disabled.

So using Reflection.properties or Reflection.get caches the results, but only the result of the top class are cached. So the first call returns all properties in the class hierarchy, but the second call only return properties of the top class. It should always return the same thing, my preference being all the properties.

@ubald ubald changed the title Reflection.properties returns different results on first and successive calls Reflection.properties returns different results on first and following calls Jan 18, 2017
@ubald
Copy link
Author

ubald commented Jan 18, 2017

I fixed it by moving some code around in order to first get all the properties and then store that result. Instead of having a mix of fetching+caching only the top level and fetching the rest without caching it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant