>> Removing this capability would remove this support. I would assume that 
>> would cause users a lot of headache, since from a user's point-of-view, they 
>> are just changing the method body, which should be supported!

> It will depend on how the user is generating the modified classfile 
> bytes for the redefinition. And we certainly want to hear about such cases.
> David

While I don't have any metrics readily available to back up my claim, my 
assumption is that users debugging their application via their IDE (be that 
IntelliJ IDEA, Eclipse, NetBeans, etc), and using its built-in support to 
recompile and redefine classes, would be one of the biggest use-cases for 
redefineClass and the adding/removing of private methods due to changing 
lambdas in method bodies. IDEs generally javac or ecj, or something derived 
from that, to do the compilation, to generate the bytes to redefine.

Many users are aware of the limitations that you cannot add/remove members of a 
class (many using tools like JRebel to overcome those limitations), but I doubt 
many realize that adding/changing a lambda in a method does exactly this!

Removing the capability of adding/removing private methods would thus have an 
impact on these users.

/Michael

Reply via email to