garydgregory commented on PR #1198: URL: https://github.com/apache/commons-lang/pull/1198#issuecomment-2047428265
Hello @stefansimon76 - There is too much copy-pasta in this PR, the same code is duplicated at least 3 times. - The whole point of the feature is to use reflection as the API name makes obvious, so you must enable the app to run with reflection, ignoring reflection exceptions will only hide the fact that the app is misconfigured. So this will likely break existing app behavior. - The reason we are calling `AccessibleObject.setAccessible()` is to perform a single security check instead of one per field, this PR loses this feature. - The valid remaining question IMO is: Is there a benefit to pruning the array of fields passed to `AccessibleObject.setAccessible()`? Semantically it seems "yes" but practically, the added complexity might not be worth it base on a quick look at the implementation of `AccessibleObject.setAccessible()`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
