Github user uschindler commented on the pull request:
https://github.com/apache/lucene-solr/pull/206#issuecomment-150497999
Hi,
a useful alternative to using commons-beanutils is using the JDK internal
bean classes. See
https://github.com/apache/lucene-solr/blob/trunk/solr/core/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java#L166-L232
for an example. We read the properties of MXBeans in the SystemInfoHandler
here. You can get a BeanInfo from the class and then use the property
descriptors to get/set properties. And that is what you are doing.
Because the JDK code is partly buggy for historical reasons, make sure to
use the correct flags added with JDK 7 when inspecting and getting the property
descriptors (disabling caches which are broken).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]