Zewo / Reflection

DEPRECATED
MIT License
599 stars 46 forks source link

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

Open ubald opened 7 years ago

ubald commented 7 years ago

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 commented 7 years ago

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.