I found a method similar to the following:
private void methodA(String firstArg, String secondArg) {
final String queueFirstArg = firstArg;
final String queueSecondArg = secondArg;
executor.execute(new Runnable() {
public void run() {
methodB(queueFirstArg, queueSecondArg);
}
}
}
It looks like bad code and making both arguments 'final' would be enough. Am I missing something? Is there any benefit in using that approach?