Reflection icon indicating copy to clipboard operation
Reflection copied to clipboard

Reflection.properties returns different results on first and following calls

Open ubald opened this issue 8 years ago • 1 comments

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 avatar Jan 18 '17 03:01 ubald

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.

ubald avatar Jan 18 '17 03:01 ubald