To fix a test case I need to identify whether the function is called from a particular caller function. I can\'t afford to add a boolean parameter because it would break the int
Here's a function I wrote to Log the function name of the function that calls it. It runs up the stack trace until it finds a function named logIt, then displays the next name. It's a dirty hack, so don't do it unless you're using it to debug.
private static void logIt() {
StackTraceElement[] stacktrace = Thread.currentThread().getStackTrace();
boolean logged = false;
boolean foundMe = false;
for(int i=0; i