Be aware
java.lang.reflect.Method.invoke
is ignored for checking the immediate caller
of the Secure Coding Guidelines for Java SE, it is stated that the Method.invoke
implementation is ignored when determining the immediate caller, because otherwise the action would be performed with all permissions. So far that's clear to me, but then it is stated:
Therefore, avoid
Method.invoke
I understand it is good that the Method.invoke
implementation is ignored when determining the immediate caller, but why it should be avoided? What would be the reason to avoid it?