←back to thread

207 points mfiguiere | 2 comments | | HN request time: 0.421s | source
Show context
bironran ◴[] No.43539321[source]
A cursory glance at "setAccessible" usage reveals popular libraries such as serializers like gson and jaxb, class manipulation and generation like cglib, aspectj and even jdk.internal.reflect, testing frameworks and libraries including junit, mockito and other mocking libraries, lombok, groovy, spring, and the list goes on and on.

My bet is that this will be yet another "checked exception" or "module system", where many applications now need to add "--add-opens". If you'll use ANY of many of the more popular frameworks or libraries you'll end up giving this assurance away, which will make library developers not able to rely on it and we're back to square one.

replies(4): >>43539649 #>>43539702 #>>43540421 #>>43540453 #
1. PaulHoule ◴[] No.43540453[source]
My impression is that this will be painful for the code I work on because the libraries you mention depend on being able to modify private and/or final fields.
replies(1): >>43540491 #
2. xxs ◴[] No.43540491[source]
private fields are no issue